321 Коммитов

Автор SHA1 Сообщение Дата
Gopesh b9bc6d7bd5 Revert " SWDEV-477849: Remove dependency of libatomic from roctracer"
This reverts commit 3c4467274f.

Change-Id: I63a0166f629fa6f3b71f03b4e540e4d8ee160910


[ROCm/roctracer commit: 82ebb1c3ec]
2024-10-28 01:20:02 -05:00
itrowbri 3c4467274f SWDEV-477849: Remove dependency of libatomic from roctracer
Change-Id: I2d94218936d33d832d1fddfe14454de5c1bc64f5


[ROCm/roctracer commit: 4ca1a68fd9]
2024-10-16 13:49:52 -05:00
gobhardw f75a24e657 SWDEV-471998: roctracer test fix
Change-Id: I8e88d087f66ecb265154b29f19e3544706578724


[ROCm/roctracer commit: fee1f00ddc]
2024-07-25 12:20:17 +05:30
gobhardw 7abb5a9b57 SWDEV-447472-updating tests
Change-Id: I27b0cddc0eb0ec3f6ed30aaef0d88971cd674033


[ROCm/roctracer commit: f3cad4c05b]
2024-05-14 17:33:35 +05:30
Ammar ELWazir d20003ed92 Fixing ROCTracer to match versioning changes in HIP Runtime
Change-Id: Ibde2419314824f12acb4cf51dc675cb14a51851c


[ROCm/roctracer commit: aa3c07c257]
2024-01-03 12:29:24 -06:00
Ammar ELWazir 5ec73566be Updating Golden Traces
Change-Id: I1234bcbe7eff8e53855e23e246d821102672006d


[ROCm/roctracer commit: c46a118cfb]
2023-10-27 00:51:55 +00:00
Ammar ELWazir e0eb2f96b2 Adding Kernel Names instead Kernel Execution
Change-Id: I102a8e741eeee18d240a62ff33e9b94e8f57d5ff


[ROCm/roctracer commit: 7e8348b017]
2023-10-26 12:33:01 -04:00
Jatin Chaudhary 77ef46fb63 SWDEV-412457 - <thread> header needs to be included
Change-Id: Ia291e5e4cc28050e05e6d7e5d7904698db56dce5


[ROCm/roctracer commit: b2671813eb]
2023-09-26 14:52:25 +01:00
Ammar ELWazir 2b78928d60 SWDEV-415259: Replacing HCC with AMD
__HIP_PLATFORM_HCC__ with __HIP_PLATFORM_AMD__

Change-Id: I2e79cff5a0216125b4ce2aa90104d4a1696bad08


[ROCm/roctracer commit: 67b3717da9]
2023-08-17 09:23:45 -04:00
gobhardw ff0c5c2862 SWDEV-406619: enabling symbol lookup in .dynsym of code object
Change-Id: I35e6d85d59cbe1350db4734dcee33a71f0d4f87f


[ROCm/roctracer commit: 9bda77f171]
2023-07-12 14:10:28 +05:30
gobhardw 86beea665a Fixing RPM build errors for roctracer
Change-Id: I55e67c5c31e266fe187bb28712a0c616ebe68107


[ROCm/roctracer commit: 23695fbd79]
2023-07-01 00:22:09 +05:30
Ammar ELWazir a113218672 SWDEV-340925 & ROCMOPS-4997: Fixing Tests package for roctracer
Change-Id: I9913e1df86398ef79a5afcf4b89b5a132d61422c


[ROCm/roctracer commit: 2a9595bc8f]
2023-06-08 14:48:28 +00:00
Laurent Morichetti e8cb732660 Cleanup the include files
Use #include "header" instead of #include <header> so that the header
files are found when the application #includes <roctracer/roctracer.h>
with -I /opt/rocm/include.

Change-Id: I24feac9a5030d3600aee98084340e246c3990db5


[ROCm/roctracer commit: 05ee3ff973]
2022-09-13 08:23:40 -07:00
Laurent Morichetti cb7d599829 Fix hsa_support::timestamp_ns if HSA is not yet initialized
Default to the HSA runtime's hsa_system_get_info if the saved HSA
functions table is not yet initialized.

Change-Id: I3659095a5ad662f7ca8b0d92bd035901c6d66bb0


[ROCm/roctracer commit: 87ffbd27f4]
2022-09-08 21:02:31 -07:00
Laurent Morichetti 8548060d8d Bring the HSA_EVT callbacks back to the roctracer
Change-Id: I26080b264d7989880ba7e9f00502cc680b2256d7


[ROCm/roctracer commit: c2b87b1fd7]
2022-09-06 19:38:12 -07:00
Laurent Morichetti f7c8382e33 SWDEV-351980 - Use the new hipRegister/RemoveAsyncActivityCallback
Remove the hipInitActivityCallback and use the new hipRegister/
RemoveActivityCallback which allows distinct memory pools to be used
for HIP_OPS activities.

Enable the multi_pool_activities test.

Change-Id: I6f6feaedecc9c36285bea975caf24dbf8f5f624b


[ROCm/roctracer commit: 340c7cb553]
2022-09-06 19:11:11 -07:00
Laurent Morichetti f50c9d4149 SWDEV-351980 - Don't allocate hip_api_data and record
The HIP runtime is now allocating the hip_api_data and record on its
stack so we don't need the thread local record_data_pair stack anymore.

Refactor the API callback function to handle both the case where
synchronous user callbacks are requested and the case where asynchronous
records are requested (enable_callback & enable_activity respectively).
If the callback argument (memory pool) is not null, then activity
records are requested.

Remove CorrelationIdRegister and CorrelationIdLookup. These were used
by the HIP runtime to associate a HIP record id to a ROCtracer
correlation id. Instead, the HIP runtime is now using the correlation
ID returned in the hip_api_data_t.

Added a test to check enabling/disabling concurrent callbacks and
activities.

Change-Id: I5850cfead9861eb3602a3e8fcb7b22580d5fc979


[ROCm/roctracer commit: 88c6e0a700]
2022-09-06 19:11:11 -07:00
Laurent Morichetti 179e03c172 Add multi_pool_activities test
This test checks that asynchronous activities can be enabled in distinct
memory pools. It enables activity reporting for HIP kernel dispatches in
one memory pool, and memory copy reporting in another memory pool.

The output of this test to stdout should be a series of kernel dispatch
records (10) followed by a series of memory copy records (10). The
records should not be interleaved.

Change-Id: Idb5cca7e650b2312a1955909932364f914737856


[ROCm/roctracer commit: cfdfa2a2d4]
2022-08-26 19:28:19 -07:00
Laurent Morichetti 2a5452dbec Remove roctracer_mark
This function has been deprecated since ROCm-2.9, use ROCTX's
roctxMark(const char* message) as a replacement for roctracer_mark.

Change-Id: Ie4aeae1db238453fc4451746cc9a338032ba817f


[ROCm/roctracer commit: bddb9850de]
2022-08-19 10:38:41 -07:00
Laurent Morichetti 690df5dfcb Fix tput
Don't set the color variables if tput is not available, not working, or
if ncolors < 8.

Move the color variables outside of eval to avoid calling tput over and
over again.

Change-Id: Id51a742b77ad0f7c99c1c7c5d05bed0f423b75de


[ROCm/roctracer commit: 993dcf9503]
2022-08-17 17:30:35 -07:00
Laurent Morichetti 6d856ddf53 Add a HIP domain callback stress test
This test verifies that callback argument matches the callback function
as a race condition while setting and reading the pair could result in
mismatched arguments.

Change-Id: I2fe49d98d19bb780b6956ea6718762cfa0de93f8


[ROCm/roctracer commit: 602c67ee00]
2022-07-30 02:51:37 -04:00
Laurent Morichetti 09472d6563 Fix HSA intercept
Move the HSA intercept to the OnLoad function, so that it is available
as soon as the ROCR is loaded.

Layer the HSA API wrappers on top of the basic HSA activity intercept.

Change-Id: Ie636d59755543cda181e76ec29f0b55081136b63


[ROCm/roctracer commit: e282a82e29]
2022-07-27 02:15:43 -04:00
Laurent Morichetti 7f47eb9d02 Add TraceBuffer entry construction/destruction
Change-Id: I354f36b0d7a0baea0efb75d5e81f169b5f969542


[ROCm/roctracer commit: 2513f9f51f]
2022-07-26 16:23:59 -07:00
Ammar ELWazir b2b252ba31 SWDEV-344206: Fixing Roctracer Tests
Making sure not to count duplicates for load_unload_reload_trace and
fixed the ignore-count option in check_trace.py.

Change-Id: I9e674aa624ec3b473bb7c6cc95260e240204627f


[ROCm/roctracer commit: c588c49743]
2022-07-15 12:39:55 -04:00
Ammar ELWazir dc269b6c7e Temporary: Disabling Roctracer test package
When separate debug info is requested, the test package
generation fails because /usr/bin/objcopy does not understand
the HSA code object format. We need a workaround to get
past this issue.

Change-Id: I9a307fcf532ce8219a9301850aae972303d19990


[ROCm/roctracer commit: c2ecd15197]
2022-07-15 09:33:08 -07:00
Laurent Morichetti f76ed5eb8e Add the roctracer-tests package
The roctracer-tests package contains all the roctracer test binaries
and scripts needed to run the testsuite outside of the build directory.

Change-Id: Id11f862fb4bdb2425d68f455074172c38814ec92


[ROCm/roctracer commit: 3adc56bd9b]
2022-07-05 17:03:21 -04:00
Laurent Morichetti 46061428fa Use the new ROCR support to automatically load tool libraries
The ROCR now detects already loaded tool libraries and calls OnLoad/
OnUnload in the order specified with HSA_AMD_TOOL_ORDER.

It is no longer necessary to set the HSA_TOOLS_LIB environment variable
to load the roctracer API. The roctracer tool library should be
pre-loaded with LD_PRELOAD.

Change-Id: I6de1b1bd4f93caa08d3554aad2376d242c74fb7e


[ROCm/roctracer commit: d32cf96cd4]
2022-06-24 16:45:03 -07:00
Ammar ELWazir 7cce3923ac Enabling ROCP_STATS_OPT
Enabling the new methodology of ROCP_STATS_OPT of getting HIP activities while the application is running

Change-Id: I94b3311b0740db804643dba0e4f77c1f9de0319b


[ROCm/roctracer commit: 7cbee920b7]
2022-06-21 14:58:28 -05:00
Laurent Morichetti 67fb1f56b3 Enable tests validation in the CI environment
Change-Id: Ied3d203db35083f0045fae052d82ec5e1a867581


[ROCm/roctracer commit: fd1469a573]
2022-06-18 13:50:35 -07:00
Laurent Morichetti 9ce94f467e Fix warnings due to deprecated include path
In file included from roctracer/src/roctracer/tracker.h:24,
                 from roctracer/src/roctracer/roctracer.cpp:44:
/opt/rocm/hsa/include/hsa/amd_hsa_signal.h:26:246: note: ‘#pragma message: amd_hsa_signal.h has moved to ...’
   26 | ssage("amd_hsa_signal.h has moved to ...")
      |                                          ^

Change-Id: I38d151d836688083a4fdb0e86a04fc40923a369f


[ROCm/roctracer commit: 44dbb56fce]
2022-06-18 13:50:33 -07:00
Ranjith Ramakrishnan 7aca8b3f1a SWDEV-295886 - Replaced hard coded path /opt/rocm with ROCM_PATH
HIP cmake module path set to actual cmake file location

Change-Id: I7a3e6eec2b51d0e550e68496eecf268a01a2d015


[ROCm/roctracer commit: 0fa2808779]
2022-06-16 00:11:35 -07:00
Laurent Morichetti c3e991dfb1 Remove EvtStats from the tracer_tool
The same information can be generated from the hcc_ops_trace.txt file,
so in a later commit, will add a stage to the tblextr.py script to
generate the .csv files when ROCP_STATS_OPT=1.

Change-Id: I3d1575e096bedf98c66068d9a4ca141421e5bb9d


[ROCm/roctracer commit: 836bab37d3]
2022-06-09 15:20:14 -07:00
Laurent Morichetti 4af9cdc409 Add a data region to the memory pool
Some records may need to point to data with the same lifetime as the
records themselves. One solution is to store the data at the end of
the memory pool buffer. Records in the buffer grow up, and the data
grows down. When the buffer is flushed both records and data are
recycled.

Change-Id: I278fa84478236bf895f7c2d152d47d4256987392


[ROCm/roctracer commit: ef3b2a8aa8]
2022-06-08 18:34:23 -04:00
Laurent Morichetti af5722a2ce Fix test errors
Check the HIP API calls status, and abort if != success.

Change-Id: Ifc38d8f28092ffdce1674a05a7886f7c0c97a885


[ROCm/roctracer commit: 4c6f249cc1]
2022-06-03 01:39:58 -04:00
Laurent Morichetti d9d54df2e6 Fix HIP cmake shared library linker flags
Change-Id: I026cc7a6bcf607e3f49c5ff76bc399cf2d8c8f0c


[ROCm/roctracer commit: bdfa9fb9f7]
2022-06-01 18:36:59 -04:00
Laurent Morichetti 9bd36c0f9e Fix building the tests with Clang
Change-Id: I85c5617221e6b27553a773e76a05be9409ed10ef


[ROCm/roctracer commit: 426c9def66]
2022-06-01 16:05:43 -04:00
Tony Tye c1cf479c38 Disable CMAKE_HIP_ARCHITECTURES
Prevents cmake errors for the HIP targets such as:

  HIP_ARCHITECTURES is empty for target "MatrixTranspose".

Change-Id: I352916f6dccd22576e8b1482a41e2099b6d8a8d9


[ROCm/roctracer commit: b63427d694]
2022-06-01 11:17:58 -04:00
Laurent Morichetti b67c618f49 Remove the tracer tool's constructor and destructor functions
Change-Id: I12d88af726074fb15f8159580c85c12888f72172


[ROCm/roctracer commit: e9b3b7c9a0]
2022-05-24 21:50:47 -07:00
Laurent Morichetti ef717b9a2a Add ROCtracer version information
Change-Id: I10b268790d2dc4f3a3ad8624b2f553da6f3ccc8e


[ROCm/roctracer commit: 1c450082af]
2022-05-24 23:52:29 -04:00
Laurent Morichetti 2603a49ce3 Remove internal functions from the ROCtracer API
The roctracer_load, roctracer_unload, and roctrace_flush_buf functions
are not part of the ROCtracer API, and should not be exposed in the API
header file, but keep the functions in the library for backward
compatibility.

Add src/roctracer/backward_compat.cpp to implement retired functions.

Add test/app/backward_compat_test.cpp to test that the retired functions
are still accessible in the latest roctracer library.

Change-Id: I4c94310a7bfccfeae9384dac5db18fc79b4c5b17


[ROCm/roctracer commit: 8ee9d859ed]
2022-05-24 15:52:29 -07:00
Laurent Morichetti 2db9dc7f66 Add a ROCTX test
Change-Id: I90dab2f349ade6cbfc86f0399c8b9ca905de23b3


[ROCm/roctracer commit: 1e7783af58]
2022-05-23 23:10:26 -04:00
Laurent Morichetti fdda233292 Document the ROCTX API
Change-Id: I63a04139d1640ea5d52f6143cf2e9bfc0614a894


[ROCm/roctracer commit: 7ebae10571]
2022-05-23 23:10:02 -04:00
Laurent Morichetti e2d5956703 Don't override the LD_LIBRARY_PATH if IS_CI=1
The tests should be using the newly built libraries in the cwd.

Change-Id: I993e74a6cdbfdc78cf226f3fa5e4b55555f27825


[ROCm/roctracer commit: c74bb1fced]
2022-05-20 14:49:58 -07:00
Laurent Morichetti 0bb77aa022 Fix CMakeLists.txt conventions
Fix indentation, quoting, and white spaces.

Change-Id: I5e5e95b961e83e5957bdd137ef9893615396bb53


[ROCm/roctracer commit: 13fe79ab09]
2022-05-20 12:31:25 -07:00
Laurent Morichetti e9a6364519 Replace the HSA standalone test
Change-Id: I89e6826eef412890185ec600cd806c7b516e62a9


[ROCm/roctracer commit: c66fc25741]
2022-05-20 10:36:38 -07:00
Laurent Morichetti 7e11a61f6f File reorganization
Move the tracer_tool from the 'test' directory to the 'src' directory.

Change-Id: I13768b9610cd359f78a66147f0255ab1e4c657e9


[ROCm/roctracer commit: b34e9c2ee4]
2022-05-20 10:36:38 -07:00
Laurent Morichetti 4cecd8b69d Add symbol versioning
Add symbol versioning to the roctracer64 and roctx64 library, and only
expose the OnLoad and OnUnload tracer_tool symbols.

Change-Id: I7f160fc3e568567fd1146ff5b9c0aef3bdcccf53


[ROCm/roctracer commit: 0377c5a191]
2022-05-20 10:36:38 -07:00
Laurent Morichetti 8b439bd2fa Enable the trace buffer directed test
Change-Id: Icddecf488f99c99434c7c690a9cb47d2d0ccbee6


[ROCm/roctracer commit: d42d7e7543]
2022-05-20 10:36:38 -07:00
Laurent Morichetti edfb1cbc44 CMakeLists.txt cleanup
Add custom_commands to generate the HSA code objects
Remove the configure time file generation and add custom commands to
generate them at build time.

Change-Id: I167dd9befc6c73f32224935eaab74510922b26f4


[ROCm/roctracer commit: 3773384af8]
2022-05-20 10:36:38 -07:00
Ammar ELWazir 0b9de5c48a fixing trace period test for gfx1031
The test was too fast and couldn't trace all the functions

Change-Id: I3e278f6af084a27490a354e7e409eb19e69a63e7


[ROCm/roctracer commit: edbd011bae]
2022-05-20 05:03:35 -04:00