Граф коммитов

712 Коммитов

Автор SHA1 Сообщение Дата
Pramendra Kumar 43c4613984 Revert "Adding rocm-llvm-dev package as req."
This reverts commit f014c03f30.

Reason for revert: <Imapcting driver install to QA due to timeout>

Change-Id: If5d98341e9ac3e803965064e3f5dc435b9310a0b


[ROCm/roctracer commit: f3df78f746]
2024-10-10 06:59:50 -04:00
Tim 7b27294298 Fix Issue [SWDEV-485618]: README Outdated: Include File
Changes to the README.md:
-Fixed the dead links in the examples.
-Updated the example to point to the ones in roctracer_spec.md instead of tests.

Changes to the roctracer_spec.md:
-Changed #include from #include <*.h> to #include <roctracer/*.h> to
reflect the latest code structure.

Change-Id: Iab44fc327821c1a01f0b949d3c9a3c20ca587599


[ROCm/roctracer commit: 725d289a2b]
2024-10-01 09:52:09 -04:00
Ammar ELWazir f014c03f30 Adding rocm-llvm-dev package as req.
Change-Id: I59ffaf952d53e1c27d6e9d0ab5b810a08ff3074f


[ROCm/roctracer commit: b42028fcc0]
2024-08-28 10:22:44 -05:00
gobhardw f75a24e657 SWDEV-471998: roctracer test fix
Change-Id: I8e88d087f66ecb265154b29f19e3544706578724


[ROCm/roctracer commit: fee1f00ddc]
2024-07-25 12:20:17 +05:30
meserve-amd 6ad8d8f2c9 SWDEV-470344: Fix build time parsing of unions
- Fixes issue where types defined inside of a union were being skipped
  for ostream operator generation
- Also fixes issue where these types were not correctly defined in the
  resulting operators' parameters
- Fixes edge case where types with "union" in their name were being
  skipped as if they were union types

Change-Id: I717e56c1d0250eeae402bb83e39dec9990cff70d


[ROCm/roctracer commit: 9755c71cfc]
2024-07-01 13:55:53 -05:00
amd-jmacaran 9d259fb6dd Enable ROCm External CI pipeline triggers
Change-Id: Ibb246bb12ed5b0d36447b7a310cff95ade359b78


[ROCm/roctracer commit: 228cd05a72]
2024-05-21 12:37:35 -04:00
gobhardw 7abb5a9b57 SWDEV-447472-updating tests
Change-Id: I27b0cddc0eb0ec3f6ed30aaef0d88971cd674033


[ROCm/roctracer commit: f3cad4c05b]
2024-05-14 17:33:35 +05:30
gobhardw 8569462182 Fixiing roctracer tests for MI300
Change-Id: Id8d2bdd78c857ed40ba331db652177beb91d6230


[ROCm/roctracer commit: 08341ded44]
2024-04-01 18:35:55 +00:00
Giovanni LB c53b6ff6f7 SWDEV-448279: Workaround for UB24 compiler errors
Change-Id: I01e880502edac8e8b941d199e08bc8f1eded0a89


[ROCm/roctracer commit: 4bc8dbd029]
2024-02-28 23:56:14 -03:00
David Galiffi 4afc8625e6 SWDEV-436568: Add CODEOWNERS file
Add @ammarwa and @bgopesh as CODEOWNERS.
This is for GitHub upstream.

Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Change-Id: I788f5ad550f91e8d3ce45bbeb527283bf11c4fd7


[ROCm/roctracer commit: 5d066e5286]
2024-02-07 15:07:47 -05:00
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 2ad5eb8130 SWDEV-430956: resolving the issue with V1 script reading long kernel names
Change-Id: I30069e28dbcc8edf2b4b41a8afd6ca4014427da7


[ROCm/roctracer commit: a7d8bd521c]
2023-11-08 16:33:01 +00:00
Ammar ELWazir 56d5b93339 Fixing initialization of ROCTx for the tool in the default constructor
Change-Id: I12a3bbde4420a9eb8d734c546169a11cb23237dd


[ROCm/roctracer commit: dbfe955d57]
2023-10-30 16:53:21 +00: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
gobhardw ec8c8ccc44 SWDEV-408936 solving rocprof hang due to early initialization
Change-Id: Ia9c52f3b4c7ff191054cef40208f26b28f021378


[ROCm/roctracer commit: d4c2546336]
2023-10-25 20:02:27 +05:30
Benjamin Welton f08a32bed2 Replace direct file out with stringstream
Change-Id: Id0a00d918df88d0031f9c8f847e65b416c09bf77


[ROCm/roctracer commit: 54777ece26]
2023-10-19 15:28:16 +00:00
Benjamin Welton f15bf42e72 Added ROCTRACER_BUFFER_SIZE to set buffer size
[SWDEV-418917] reported that timing skew was being introduced by
roctracer. Most of the cause of this problem seems to stem from outrunning
the double buffering scheme that we use in memory_pool (part of the
reason for this outrun is due to File writing being slow). A semi-quick
fix that may be able to last until RocProf v2 is complete is to allow
adjustment of the buffer size. ROCTRACER_BUFFER_SIZE env variable was
introduced here which allows setting the buffer size of tracer tool.

By increasing the buffer size, an ~8% reduction in execution time when timing
on the program side. This should also reduce the frequency of large delays
when we outrun the buffer. Note: increasing this size dramatically can cause
slow startups (i.e. above 50MB).

Change-Id: I98c4316cfe93a043623ae2669cfe1a5abb55c990


[ROCm/roctracer commit: 38ba63030d]
2023-10-18 18:06:54 +00:00
Jatin Chaudhary 16d3e732b6 SWDEV-412457 - Add <cassert> header in file that uses assert
Change-Id: I2f9401d3890cc3c5116dba21ee959f1bf4f0b48e


[ROCm/roctracer commit: 4ff80750b3]
2023-09-27 14:29:17 +01: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 c5d35de808 SWDEV-407953: Adding Patch Version from ROCm Standard Option
ROCm Packaging uses ROCM_PATCH_VERSION as a standard option to add the patch version which determines the rocm release for different libraries versions

Change-Id: I1edce84d2963d495c55c83cc0697761d7f696c92


[ROCm/roctracer commit: 421febd4bf]
2023-08-21 13:25:40 -04: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
Ranjith Ramakrishnan 5c6492d1ec SWDEV-366827 - Disable file reorg backward compatibility support by default
Change-Id: Ibf3c409c1741211ea86d52a90227c64ef47ee54b


[ROCm/roctracer commit: 6ab944c009]
2023-08-07 11:01:11 -07:00
Ranjith Ramakrishnan 2d06c8c312 SWDEV-409575 - Append additional RPATH to libraries installed in /opt/rocm-ver/lib/roctracer
RPATH in libraries installed in /opt/rocm-ver/lib/roctracer should be: $ORIGIN:$ORIGIN/..
cmake shared linker flags will provide the rpath $ORIGIN
The patch will append the rpath $ORIGIN/.. to the component specific libraries

Change-Id: Ied2bcb57bf0dd38ee3d1a946a5afc1bb182ff619


[ROCm/roctracer commit: 6fbf7673aa]
2023-07-13 16:43:46 -07: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 e3a756d8f7 SWDEV-288134: Workaround to enable roctracer early
Change-Id: Iae21dbfd9f50dcf2e317130c6dc8328f17eba553


[ROCm/roctracer commit: 04d0bd4874]
2023-06-20 21:59:19 +00:00
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
gobhardw 56a2989ffa SWDEV-398161, SWDEV-398764 Fixed hsa-trace failures for profiling data corrupted
Change-Id: I3d8dbb2a40d948cd06cb1278acc50dc5be4ca0ef


[ROCm/roctracer commit: ee713682a1]
2023-05-15 22:38:23 +05:30
Ranjith Ramakrishnan a53f6af29e SWDEV-383221 - Set the default value of ROCM_HEADER_WRAPPER_WERROR to OFF
Using wrapper header files will result in #warning message by default

Change-Id: Ib8a05d11f2391dfcdac8601da26e1096821cd555


[ROCm/roctracer commit: 245eafea4c]
2023-05-08 16:28:19 -07:00
Ranjith Ramakrishnan 70eb1706af SWDEV-366831 - Compile time flag to switch between #warning and #error message
Using backward compatibility paths will provide an #error message. Compile time option added to enable/disable the #error message.
Disabling the same will provide a #warning message

Change-Id: I6abc236e810ccc38d3636074e0e8f5a9657c2e9a


[ROCm/roctracer commit: ea061be2d1]
2023-03-10 09:12:20 -08:00
AravindanC 5019a364c8 SWDEV-351540 - ASAN packaging for roctracer
Change-Id: If23c92e785fbbeb27034a8958568dd86b847beed


[ROCm/roctracer commit: 4edc9727bd]
2023-02-27 11:32:39 -08:00
Ranjith Ramakrishnan f3abbba3b0 SWDEV-366831 - File reorg backward compatibility message changed to #error
Change-Id: I403c34722e6516c60c217ed1b883066e248c598b


[ROCm/roctracer commit: ee3321f2dc]
2023-02-08 17:25:57 -08:00
Kiumars Sabeti ac660e2c92 SWDEV-360818: Reserved fields of hip structures are undefined. Because of that, reserved fields may contain special characters that are not readable by postprocessing Python script. To patch this issue, here we modify script that generates hip_ostream_ops.h to set reserved fields of hip structures to 0.
Change-Id: I0cda5cedfa30b140f121803dd8c066107ae0756e


[ROCm/roctracer commit: 397b3b10af]
2023-01-26 17:44:55 -05:00
Ranjith Ramakrishnan 9ee831c09f Split roctracer to runtime and dev/devel package
SWDEV-356024 - Development package name will have suffix dev or devel based on OS
Devel package contents - Header files, name link of public library files, html files and roctracer manual file
Runtime package contents - Versioned public library files, private library files and license file

Change-Id: I8ced3eab5d8824a66be39b9e777368506516b155


[ROCm/roctracer commit: 9acba8b4a1]
2023-01-17 14:10:58 -08:00
Laurent Morichetti 20cc405de7 SWDEV-361912 - Fix kernel demangling
Older GNU C++ runtimes cannot demangle symbol names generated by recent
versions of LLVM. To work around this issue, use the LLVM demangler to
process kernel names.

Change-Id: I595f900d06360bb5acce542955cf1f5aed81f00e


[ROCm/roctracer commit: 91b449d0d5]
2022-12-05 20:36:04 -08:00
Ranjith Ramakrishnan f3417a617f SWDEV-366823 - Change pragma message to warning
File reorganization feature was implemented with backward compatibility
The backward compatibility support will be deprecated in future release.
Changed the #pragma message to #warning for a smooth transition

Change-Id: I85e14470cce0f3d7c14ecb40e0e9e8b29c977c9f


[ROCm/roctracer commit: ca1726f80d]
2022-11-22 14:10:34 -05:00
Ranjith Ramakrishnan 1d4e650841 SWDEV-369226 - Correct the usage of include file
In the generated header file hsa_prof_str.h , the header file hsa_ostream_ops.h was included using angle brackets
This results in compilation with include path /opt/rocm-ver/include. Corrected the usage by using double quotes

Change-Id: Ie9f1fff78d16a6953a2c99056b2acef42e577204


[ROCm/roctracer commit: b1585c983d]
2022-11-21 16:38:39 -08:00
Ammar ELWazir e4435b0e97 Fixing Readme.txt
API Spec Documentation link fixed

Change-Id: I0d0ef52eaa0e66b161cb042704c083e29b0db06f


[ROCm/roctracer commit: d835435b0d]
2022-11-16 00:39:07 -06:00
Laurent Morichetti 83402eae9c SWDEV-362165 - Escape strings in the API function's arguments
Also escape '\', '"', '\b', '\f', '\n', '\r' and '\t'.

Change-Id: I02cb1a0a511156661ff40700a81b0989a450aacc


[ROCm/roctracer commit: 0d6e5b1cea]
2022-11-07 15:41:51 -08:00
Laurent Morichetti 644e3b5253 Report HSA_OPS activities using the ROCr driver_node_id instead of the device's index
When multiple ranks are used, each rank's first logical device always
has GPU ID 0, regardless of which physical device is selected with
CUDA_VISIBLE_DEVICES. Because of this, when merging trace files from
multiple ranks, GPU IDs from different processes may overlap.

The long term solution is to use the KFD's gpu_id which is stable
across APIs and processes. Unfortunately the gpu_id is not yet exposed
by the ROCr, so for now use the driver's node id.

Change-Id: I2f5af8d2a7e8a89efeb5e0a1b86bdfa547b25fc8


[ROCm/roctracer commit: 799f0323cd]
2022-10-18 20:08:09 -07:00
Laurent Morichetti 4f0a4afd95 Fix a build error when compiling with clang
Fix the following error:

roctx.cpp:91:25: error: reinterpret_cast from 'const void *' to 'decltype(report_activity.load())' (aka 'int (*)(activity_domain_t, unsigned int, void *)') casts away qualifiers
  report_activity.store(reinterpret_cast<decltype(report_activity.load())>(function),
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

by replacing the 'const void *function' argument with the correct type.

Change-Id: I912239daf6f4a3f00fc753306b84833e5c75f74b


[ROCm/roctracer commit: c95d5dd96f]
2022-10-18 18:20:58 -07:00
Laurent Morichetti 348bc1afaf SWDEV-362165 - Escape strings in the API function's arguments
Strings ([const] char *, [const] char[]) passed as arguments to API
functions may not always contain printable characters. All string
arguments should be quoted and escaped in the trace logs.

Change-Id: Ie39058f2190048b1a0090df16d9ac6bc6507e28a


[ROCm/roctracer commit: b556f8681e]
2022-10-15 19:03:36 -07:00
Laurent Morichetti aaf512c9ad Remove the thread local begin_timestamp stack
Using a thread_local object is problematic as the thread local
destructors are called first before any global destructor, making
the object invalid while tearing down the process.

rocblas uses a global destructor to clean up the loaded HIP modules
and ends up calling hip_executable_destroy after the timestamp stack
is destructed. As a result the begin timestamp for that API function
is 0.

The solution is to store the phase_enter timestamp in the phase_data.

Change-Id: If143f4d123dfb111c72fb20365431d07e73fc570


[ROCm/roctracer commit: 8a575d8d6e]
2022-09-30 15:01:08 -07:00
Laurent Morichetti 549d6a5ec5 Fix a profiling data corrupted error
Using rocprof with ROCP_MCOPY_DATA=1 while tracing HSA produces the
following error:

tblextr.py: Memcpy args "(0x7feb16a00000, 123handle=28593376125, 0x7feb12a00010, 123handle=27558560125, 4194304, 0, 0, 123handle=140661639440000125) = 1" cannot be identified
Profiling data corrupted: ' ./out/rpl_data_220930_143009_1826700/input_results_220930_143009/results.txt'

There are two issues:

1) The hsa_agent_t handle argument is misprinted: "123handle=...125"
  Instead of printing '{' and '}', it prints '123' and '125'. The wrong
  operator<<(unsigned char) is used and an integer value is printed
  instead of a char.

  Use std::operator<< instead of hsa_support::detail::operator<< to
  print '{' and '}'

2) The result value is unitialized and in some cases printed as a
  negative integer value. The leading '-' is not matched by the
  mem_manager regular expresion for HSA api calls.

  Correctly capture the HSA function's return value.

Change-Id: If13a1e62eeb4e598447c4b90d53d1b2e3b408696


[ROCm/roctracer commit: 6416434d3b]
2022-09-30 13:36:48 -07:00
Laurent Morichetti f36f7e1b3e Fix an issue with aync copy timestamps
The timestamps coming from the HIP runtime for asynchronus memory
copies are corrupted (begin > end) because the HSA setting to record
timestamps is turned off by the tracer's HSA intercept.

The solution is to intercept hsa_amd_profiling_async_copy_enable and
remember the application/runtime's request so that it can be ORed with
IsEnabled(ACTIVITY_DOMAIN_HSA_OPS, HSA_OP_ID_COPY).

Change-Id: Ib687cbf36711563e86c2bb8bc934c7c51572bfde


[ROCm/roctracer commit: 329c0467cb]
2022-09-28 15:44:40 -07:00
Laurent Morichetti 6ea76c581b Use the "safe" Stack for begin_timestamp
The tracer tool needs to remember the begin timestamps for API
callbacks, and uses a thread_local std::stack for that purpose.

The issue with thread_local objects is that they are destructed
before anything else when the main thread exits. To work around
that issue, we use a "safe" stack in the roctracer API.

Use the same "safe" stack in the tracer tool.

Change-Id: I0d69d4eb44f0205f4102d0d5ef9803a1ec1800a5


[ROCm/roctracer commit: b664937ebd]
2022-09-26 13:44:55 -07:00
Laurent Morichetti e8dc8de195 Fix a typo in HipLoader
rocprof errors out with the following message:
symbol lookup 'KernelNameRef' failed: libamdhip64.so.5: undefined \
  symbol: KernelNameRef

The HipLoader is incorrectly looking for a KernelNameRef symbol
instead of hipKernelNameRef.

Fixed the typo: KernelNameRef -> hipKernelNameRef.

Change-Id: Ia4860e1669707b0c83d67e71b78d362b07a6aaa7


[ROCm/roctracer commit: a287f20961]
2022-09-26 09:31:14 -07:00
Laurent Morichetti f262501ed3 Clean up logger.h
Change-Id: Ibcb58d2236b012d00c3fc421a425c03093de5d50


[ROCm/roctracer commit: bb98bc7d85]
2022-09-16 09:55:09 -07:00
Laurent Morichetti 6dea5c5e3d Fix an array subscript out-of-bounds error
Starting with gcc-11 (verified with gcc-12 as well), an array
out-of-bounds subscript error is reported for accessing the registration
table element at the operation ID index. Validating the index in the
function calling Register/Unregister does not quiet the warning/error
in release builds, so, for gcc-11 and gcc-12, we disable that warning
just for the RegistrationTable class.

Change-Id: I6bc4a02aa072cfa8905ecde5e3960aebf32fc912


[ROCm/roctracer commit: 67ce5fae13]
2022-09-16 09:54:40 -07:00