Commit Graph

8920 Commits

Author SHA1 Message Date
Giovanni LB c07eff437f SWDEV-388249: WIP - Fixed few memory leaks
Change-Id: I97eb348c7715ac166f48cee3fd3d1b702d355948
2023-04-24 17:58:46 -03:00
gobhardw 004ade7f62 Fixing typo in build script and tracer tests
Change-Id: I1e030fbd126bb3cf552ad1a8d00708bcc2ac6c08
2023-04-24 13:03:35 +05:30
Giovanni LB 579d59698a SWDEV-393614: Zero-ed record struct on allocation.
Change-Id: I0c1fa995e336e21d66851ac621114b8e88786c94
2023-04-21 11:37:38 -04:00
Ammar ELWazir e499729db8 Fixing Perfetto Plugin Stream ID
As Stream ID is not being processed by the API now for performance issues, we dropped the Stream ID use in Perfetto Plugin

Change-Id: I69a651cc998addbfc1c4f5bc972a58afb1f74dc0
2023-04-21 08:44:52 +00:00
Ammar ELWazir 1322e527a6 Fixing Kernel Names
The lifetime of the kernel descriptor handle is unknown, so we currently uses the record id to identify the kernel name

Change-Id: I8802ce245bb021bcb43dd97cd6334bc88de0faf4
2023-04-21 03:17:33 -04:00
Ammar ELWazir 29b25a3ef5 Adding Async output for API Tracing
If rocprofiler_set_api_trace_sync_callback is not called by the API client then it will be automatically saved in the buffer and it will be in async to the user to see the API trace data, sample for async api tracing is added to samples/tracer

Change-Id: I01266a12b0eec172fdcffd7f04c89c2fe96174bb
2023-04-21 03:17:27 -04:00
Ammar ELWazir 4a33787c01 Fixing Performance Issue with API Tracing V2
Records right now will report basic raw data, no pre-processing in API anymore, and it will be left to the tool to process data from the output of synchronous callbacks of the API tracing records output

Change-Id: I8e5845e49e1228cb2fb60ca188ee748745b6a1af
2023-04-21 03:17:17 -04:00
Giovanni LB c1afcb95e7 PLAT-130888: Added kernel dispatch ID to txt
Change-Id: I7852a98b9b7be0098b45f5a433f6cbba0617eb05
2023-04-20 23:47:26 -04:00
Giovanni LB fd2376fe90 PLAT-130888: Added support for .out files
Change-Id: Ia2fe1966e0264f42ee1159d732d5606438b7bb91
2023-04-20 23:15:07 -04:00
Giovanni LB c64b5e0090 PLAT-130888: Added back shader engine mask.
Change-Id: I8e14bbd16628cc0b682adea845911b93b8e1af51
2023-04-20 19:55:51 -04:00
xinhui pan 77761836ae thunk: Fix and optimise for pointer range search
Previous code might fail to get the correct ln node. And trigger extra
walk through of the tree. Fix it.

While walking through the tree, better to search from right to left as
the node->start likely close to *address*.

Change-Id: If86ddf73e59a1eb88225d1ea90797818e8165488
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2023-04-20 19:36:29 -04:00
colramos f8fe039aa5 Restore token on distro specific CI runs
Signed-off-by: colramos <cole.ramos@amd.com>
2023-04-20 14:49:28 -05:00
Cole Ramos 7cded80ba5 Merge pull request #116 from dipietrantonio/patch-1
Update requirements.txt to include setuptools
2023-04-20 13:29:50 -05:00
colramos 0c86746678 Remove token requirement from distro CI pipeline
Signed-off-by: colramos <cole.ramos@amd.com>
2023-04-20 13:27:32 -05:00
colramos 8a1db9fcbb Remove token requirement from distro CI tests
Signed-off-by: colramos <cole.ramos@amd.com>
2023-04-20 13:22:10 -05:00
David Francis eed5518e4c kfdtest: Enable gfx90a coherency tests on Aqua Vanjaram
These tests should also pass on Aqua Vanjaram, so enable them

Signed-off-by: David Francis <David.Francis@amd.com>
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Ibbb9cd43d653c63b08c39efd1d7326cfac1f8411
2023-04-19 10:28:05 -04:00
David Francis 30b1f23f7a kfdtest: Add coherency tests for Aqua Vanjaram
Aqua Vanjaram is intended to have fine-grained coherency
from anywhere to anywhere else using read-acquire and
write-release primitives.

Add a test that writes to memory covered by five
different cache lines, then write-releases, while
another thread read-acquires, then reads those
five locations in memory.

There are nine variations of the test to cover
CPU-GPU, same-GPU and across-GPU, vector instructions and
scalar instructions, and data local to the
acquirer or receiver.

Signed-off-by: David Francis <David.Francis@amd.com>
Change-Id: I20d2db5c53bd280e971479aad7e61df6ed5d3623
2023-04-19 10:28:05 -04:00
Cristian Di Pietrantonio d5289d2c4c Update requirements.txt
On some systems setuptools (needed by dash-bootstrap-components) is not installed by default. Weirdly enough, it is not installed as dependency of Dash.

Signed-off-by: Cristian Di Pietrantonio <cristiandipietrantonio@gmail.com>
2023-04-19 14:48:38 +08:00
Philip Yang 0696f06c16 kfdtest: fix KFDSVMRangeTest.MultiGPU tests vector iterator
For vector iterator loop access current node directly, don't need
gpuNodesAll.at(i), which also causes out of range access.

Change vector index loop to iterator loop to simplify the code.

Change-Id: I2627ef8d13b5d2c9cd8c51cf4dacc3e8a97fcfb0
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2023-04-18 17:58:06 -04:00
Galantsev, Dmitrii 418167b43e CMAKE: Fix RPM version
before fix:
CPack: - package: ... rdc-0.6.0-local.9999.el9.x86_64.rpm generated.

after fix:
CPack: - package: ... rdc-0.6.0.50600-local.9999.el9.x86_64.rpm generated.

Change-Id: I684816f3b4cad787eec6abbb40598d05c89d4f5d
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-04-18 17:41:37 -04:00
Ammar ELWazir 7621626559 Handling Corrupted kernel names
Change-Id: I660cefa1d6fadfd6cf59fe57b70b718c5e17aa75
2023-04-18 19:28:22 +00:00
coleramos425 c794fb8198 Replace subprocess with shutil (#110)
Signed-off-by: coleramos425 <colramos@amd.com>
2023-04-18 09:50:50 -05:00
Karl W. Schulz db9d8f85f1 Fix typo for Crusher modulefile customization introduced with #113
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2023-04-18 09:29:09 -05:00
coleramos425 b8577e06a5 Merge branch 'main' of github.com:AMDResearch/omniperf into dev 2023-04-18 08:57:01 -05:00
Cole Ramos d5e4c4a3f5 Update BibTeX citation
Signed-off-by: Cole Ramos <colramos@amd.com>
2023-04-18 08:56:20 -05:00
gobhardw 8de0adf6e8 Adding build id to microbenchmark target
Change-Id: Iea2475772f43f56125dd2cb0e4280fb0555ed7ad
2023-04-17 23:05:17 -04:00
Karl W Schulz aacd579421 appease the cmake-format crowd
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2023-04-17 16:53:09 -05:00
Karl W Schulz b91a175b96 Retain full versioning info for modulefile information (closes #113).
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2023-04-17 16:53:09 -05:00
Karl W Schulz f18d38a218 appease the cmake-format crowd
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2023-04-17 15:48:40 -05:00
Karl W Schulz 782efc6c16 Retain full versioning info for modulefile information (closes #113).
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2023-04-17 15:48:36 -05:00
coleramos425 97422b0198 More succinct section headers in docs
Signed-off-by: coleramos425 <colramos@amd.com>
2023-04-17 14:51:56 -05:00
Alex Sierra e82025bffa use mkstemp instead tempnam for temp file
tempnam has been marked as obsolete.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: Ie64d9a351bf386da00a96ceff059f685e11f2cca
2023-04-17 15:38:59 -04:00
Cole Ramos bb3247076e Update VERSION
Signed-off-by: Cole Ramos <colramos@amd.com>
2023-04-17 14:15:14 -05:00
Cole Ramos d47d3ef316 Update CHANGELOG for v1.0.8-pr2
Signed-off-by: Cole Ramos <colramos@amd.com>
2023-04-17 14:14:51 -05:00
Ammar ELWazir dda3261461 SWDEV-394873: Fixing Build IDs for HIP related tests
Change-Id: I49656c0383782c69cc88eb6d874727149375b32c
2023-04-17 14:27:56 -04:00
Ammar ELWazir 6da9f43f61 Duplicate of SWDEV-392986 -Use absolute path of clang-tidy
Using clang-tidy with out any absolute path is resulting in build failure.
Corrected the same. Due to build script issues, find_program was not able to find clang-tidy
So the issue was not exposed. Fixing the build script exposed the build failures

Change-Id: I6e886bf6beba531b97205f264f729544fd5cf303
2023-04-17 14:27:41 -04:00
Cole Ramos 047868c209 Merge pull request #112 from AMDResearch/dev
Prep v1.0.8-pr2 release
2023-04-17 13:27:19 -05:00
gobhardw 813d6fedb2 SWDEV-297576: RSMI based micro benchmark for pcie validation
Change-Id: I87bc09ea8d2f903cafc0291f3565fd626254e475
2023-04-17 14:05:19 -04:00
Philip Yang 21abaef3f8 kfdtest: AppAPU Skip KFDEvictTest, KDFSVMEvictTest, HMMProfilingEvent
AppAPU VRAM is part of system memory managed by Linux kernel, no
VRAM eviction and restore is needed between VRAM and system memory.
Those Evict test failed on AppAPU now, skip those tests on AppAPU.

No page migration between VRAM and system on AppAPU, HMMProfilingEvent
depends on migration event, skip it on AppAPU.

Change-Id: I4c809b97c947e809d136c1f88db2278cf74f5b47
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2023-04-17 13:28:23 -04:00
Philip Yang e2df2c21af kfdtest: Add helper to check if IsAppAPU system
If there is connection between GPU and CPU with weight 13,
KFD_CRAT_INTRA_SOCKET_WEIGHT, then this is AppAPU.

This will be used to skip tests not suitable for AppAPU.

Change-Id: If6fad81528b52afd4ac4cefa508d787b0f6637ca
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2023-04-17 13:28:23 -04:00
Lancelot SIX 183f5d90aa linux os_thread: improve error handling
On Linux, the os_thread abstraction is built on top of pthread.  Many of
the pthread calls might fail and return error codes.  The error
conditions are only checked via assertions (if ever checked) which means
that when doing a release build, no error condition is checked.  The
same goes for dlsym/dlinfo and clock_gettime.

This commit improves the situation this by checking the error conditions
and acting accordingly.  When the error condition is detected in a
function with a mean to indicate some error to its caller, then this
patch prints some error message and returns.  If there is no way to
propagate the error up the call stack, print some error message and
abort the process.

For the os_info::os_info ctor, the only user is CreateThread, which
checks that the built thread is Valid().  If not, nullptr is returned to
the caller.

It could be possible to use exceptions when functions cannot pass
errors, but for now I only use abort as it is what abort would do with
debug build.

Change-Id: I815703c3b95777cc29bb89a7d654ac879c14a759
2023-04-17 09:48:11 -04:00
Lancelot SIX 72219b8237 Runtime::GetSystemInfo: Supress parentheses warning
When building with g++-11.3.0, I have the following warning:

    /home/.../core/runtime/runtime.cpp: In member function ‘hsa_status_t rocr::core::Runtime::GetSystemInfo(hsa_system_info_t, void*)’:
    /home/.../core/runtime/runtime.cpp:693:56: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
      693 |           kfd_version.KernelInterfaceMajorVersion == 1 &&
          |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      694 |               kfd_version.KernelInterfaceMinorVersion >= 12)
          |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This patch adds the parenthesis as suggested.  This silences the
compiler warning.

No functional change expected.

Change-Id: I69c1a73a432b0f2393dbaf36d4424cf0056c535f
2023-04-17 09:43:02 -04:00
Jesse Zhang 4d54d6e706 libhsakmt: Add compute core check for APU
We should check compute core instead of cpu core,
in order to exclude the case of APU.

Signed-off-by: Jesse zhang <jesse.zhang@amd.com>
Change-Id: I2ec2a6807f51f49f80e0e500f5d9af81c2efae37
2023-04-17 09:34:37 +08:00
coleramos425 77559a2f25 Roofline support for SLES15 SP3 and greater (#109)
Signed-off-by: coleramos425 <colramos@amd.com>
2023-04-14 12:50:28 -05:00
Ammar ELWazir a3484f4ee8 Fixing Symbol Versioning for V2
Change-Id: Ieb6f98bec97e9d24ff6acc52b131a1a1a129a829
2023-04-14 13:25:36 -04:00
coleramos425 f6d9233113 Add containers for each supported Linux distro
Signed-off-by: coleramos425 <colramos@amd.com>
2023-04-14 11:32:57 -05:00
Graham Sider 11a04fe1f5 kfdtest: Fix PersistentIterateShader for gfx target 9.4.x
Replace 'flat_load_dword <...> glc' with appropriate macro.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I9fdc7c916c685304457cd9698e741577f6c10c82
2023-04-14 12:05:08 -04:00
Graham Sider e2435d9e93 kfdtest: Add flat compatability macros for gfx target 9.4.x
For GC 9.4.0, modifications were made to various shaders since certain
flat_ instructions no longer support glc/slc modifiers (replaced with
nt/sc1/sc0). Instead of repeating conditionals inside various shader
bodies, we can make use of LLVM AMDGCN macros.

This patch modularizes the shader macros into seperated defines. Prior
to the core raw-string literal, each shader now starts with the
SHADER_START literal (".text\n") plus any number of SHADER_MACRO_*
literals. This allows us to seperate the macro definitions logically and
use the pre-processor to only include the required macro groups on a
per-shader basis.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I19eb3fd14252a0601bb7509249051b68e7fdb02a
2023-04-14 12:05:08 -04:00
David Francis 680c8ca5a9 kfdtest: Make queue evict tests use constant number of wavefronts.
Previously, KFDEvictTest.QueueTest and KFDSVMEvictTest.QueueTest
would create a variable number of wavefronts, one for each 64MB
of memory under test. This ran into limits on the buffers used
by the wavefronts, and may at some point have exceeded the
wavefront limit.

Restrict the number of wavefronts to 512, and adjust the shader
to accomodate a variable buffer size

Signed-off-by: David Francis <David.Francis@amd.com>
Change-Id: I2ec292e2900e2efa62a08313bca3d2f4bdabca8b
2023-04-14 12:05:08 -04:00
Graham Sider 831d1ad352 libhsakmt: Mask stepping version for GC 9.4.3 checks
GC 9.4.3 to set gfx target version to 9.4.x dependent on revision and
capabilities. Due to this, where applicable, mask off the gfx target
stepping version and only check major/minor version (9.4). There are no
collisions due to this change since GC 9.4.3 is the only ASIC that uses
gfx target version 9.4.x.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I72803e594c421f054d18ccfa7e92c507128fa5be
2023-04-14 12:03:23 -04:00