İşleme Grafiği

227 İşleme

Yazar SHA1 Mesaj Tarih
Alysa Liu 4fab4d70e6 rocrtst: migrate from rsmi API to amdsmi API
Replace ROCm SMI (rsmi) API calls with AMDSMI (amdsmi) API calls
in rocrtst.

Signed-off-by: Alysa Liu <Alysa.Liu@amd.com>
2025-07-11 11:22:34 -04:00
Chris Freehill f1bd89bd0d rocr/rocrtst: Update to c++17 2025-06-30 14:02:24 -05:00
Sunday Clement d2b35dfee6 rocrtst: Add new test for querying Clock Counters
added new subtest to Agent Properties test, to check functionality of
query.

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>
2025-06-23 18:45:09 -04:00
David Yat Sin 649ec63a4f rocrtst: Reduce host memory limit to 90%
Further reduce upper bound for rocrtstFunc.Memory_Max_Mem
as previous limit of 95% can still trigger OOM killer.
2025-06-16 21:02:20 -04:00
David Yat Sin 96d0f07b15 rocr: Fix compile warning when using clang 2025-06-12 10:38:58 -04:00
David Yat Sin 11da1293de rocr:Fix compile warnings 2025-05-28 16:12:02 -04:00
Flora Cui e884650952 rocrtst: performance::memory_async_copy test fix on DXG
Signed-off-by: Flora Cui <flora.cui@amd.com>
2025-05-26 15:01:27 +08:00
Aaron Liu 297ea78140 rocrtst/dtif: performance::memory_async_copy test fix on DTIF
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Signed-off-by: Feifei Xu <feifxu@amd.com>
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Reviewed-by: David Yat Sin <David.YatSin@amd.com>
2025-05-13 16:44:31 -04:00
Lang Yu 89926f5b0b rocrtst: fix rocrtst.Test_Example
VerifyResult always returns true. That's not expected.

Signed-off-by: Lang Yu <lang.yu@amd.com>
2025-03-20 12:57:52 +08:00
David Yat Sin 4cb6a6d45d rocrtst: Disable RLIMIT for negative queue tests
The negative queue tests generate an exception which triggers a coredump
generation. Disable RLIMIT so that the coredumps are not generated for
these tests.
2025-03-04 10:29:34 -05:00
David Yat Sin 13c591d250 rocr: Remove gfx940 and gfx941 support 2025-02-19 12:16:24 -05:00
David Yat Sin 806ddfc8eb rocrtst: extend IPC test to support async_handler 2025-02-19 11:19:09 -05:00
David Yat Sin dab8f2fc65 rocr: Add support for gfx950
<squashed with patch for gfx950 generic targets>

Signed-off-by: Chris Freehill <Chris.Freehill@amd.com>

Change-Id: Ifec6d93cf46c7fbf736c6572882299e279260af6
2025-01-26 13:04:58 -05:00
Tim Huang 0f507e7690 rocrtst: add gfx1153 to the default targets
Change-Id: I6cce4f924c236ea83cbe0ab9402c0cabdb202356
Signed-off-by: Tim Huang <tim.huang@amd.com>
2024-12-30 02:06:01 -05:00
Horatio Zhang b02b842368 rocrtst: fix build error for opencl-c.h
<built-in>:2:10: fatal error: '/opt/rocm/llvm/lib/clang/18/includeopencl-c.h' file not found
    2 | #include "/opt/rocm/llvm/lib/clang/18/includeopencl-c.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Change-Id: I56138aba15465b6dd47bb3aad810bdd10f2b2a74
Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com>
2024-12-16 21:28:09 -05:00
Shweta Khatri 2cf3813f9f rocrtst: Disable FreeQueueRingBufferTest temporarily
This test is disabled until kernel patches are added to handle invalid
user actions gracefully. These patches validate and block operations
like freeing active queue buffers, which can corrupt the driver's state
if unhandled.

Currently, such operations result in driver state corruption, leading
to segmentation faults and subsequent failures during runtime.

Change-Id: If4c321a14df950a639141fc96048889659c14477
2024-11-26 09:18:47 -05:00
AravindanC 1a0de862aa Update static package dependency of rocrtst
Change-Id: Ic12a6f2ec3bd03d871815810cc79488e7d5c57ab
2024-11-06 07:06:37 -08:00
Chris Freehill 4256630fd0 rocr: Fix several rocrtst memory errors
Change-Id: I9049a3905fb26cf9b8ad0839684a70771a49f616
2024-10-30 20:36:25 -04:00
Chris Freehill 08699069d6 rocr: Quiet some ROCr compile warnings
These are mostly AIE related, but there are a couple of others.

Change-Id: I549e004772160ca282d4c94dc9d94dd2ccae8b1c
2024-10-28 09:08:14 -04:00
David Yat Sin ead3aafcda rocrtst: Fix VirtMemory_Basic_Test permissions
Fix VirtMemory_Basic_Test permissions to adjust for previous change to
the hsa_amd_vmem_set_access behavior change that was done with this
patch:

rocr/vmm: Only modify permisions for specified agents

Change-Id: I97230600b9b9144459b08ca3da3a5bfbdbb98231
2024-10-11 10:41:11 -04:00
Kent Russell d64e33520f rocrtst: Various codeql fixes
Fix some potentially unreleased memory, null value checks, files not
closed, and other such issues reported by codeql

Change-Id: Ia679aff97a773a642d8c8cbadeae30955554a62e
Signed-off-by: Kent Russell <kent.russell@amd.com>
2024-09-27 09:56:18 -04:00
Longlong Yao 3b829d0e62 rocrtst: fix resource leak
Change-Id: Ib57dccad0b639539e1076daba31eef278f2cf638
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
2024-09-23 15:04:43 -04:00
David Yat Sin 588a5a2fd3 rocrtst: Limit pool sizes to 2GB on emulator
Individual simple tests such as CPUAccessToGPUMemoryTest are taking
several hours on emulators as the total amount of VRAM keeps increasing.
Limit the pool sizes to 2GB, only on emulator.

Change-Id: I4b33e8549f89413da255731e6748f606ca64a663
2024-09-19 19:44:53 +00:00
David Yat Sin 3cb25e5236 rocrtst: Add negative test for invalid buffer free
Add a negative test to try to free the ring buffer of a queue and
confirm that a memory error is generated.

Change-Id: I4afd95c69c62f7c3e1138d5d6c4a5fd237631e43
2024-09-19 19:44:53 +00:00
Wang, Yanyao c064218637 Remove hard-coded llvm-project folder for rocrtst
Signed-off-by: Wang, Yanyao <yanyao.wang@amd.com>
Change-Id: I9ba81c1182da812596d7d314f3a6dae7cbcd0c2d
2024-09-19 19:44:53 +00:00
David Yat Sin 4ba4867fa5 rocrtst: Fix segfault on p2p copies
Fix segfault on p2p copies when 2 agents cannot access each other's
memory (usually because the PCI BAR's are out of range). The
AcquireAsyncCopyAccess function should return NULL in that case, so that
the test can be skipped.

Change-Id: If018f3609dd21a01c56eaec94de3bca52c385c4d
2024-09-03 14:06:48 -04:00
David Yat Sin 2360253b3b rocrtst: Skip inaccessible agents when importing dmabuf
If some agents cannot access the memory buffer directly, this will cause
the hsa_amd_interop_map_buffer API call to fail

Change-Id: If2f0e1735c2926440d657831de50775d7f304c8e
2024-08-28 15:58:02 -04:00
Chris Freehill 1c6a4a55f1 rocrtst: change const arg to non-const
In rocrtst helper_funcs.h, a function argument that gets
written to was previously incorrectly marked as const.

Change-Id: If8cc6555ebfa974b9665d9d5b93de01bb45fde2c
2024-08-14 08:18:11 -05:00
Chris Freehill 6fda123836 Change "devel" to "dev" for runtime-rocr
Also, don't call rpm command if distro doesn't support it.

Change-Id: I7f39f9c1f39c5408967d66e2db1f471847c5e668
2024-07-19 22:58:07 -05:00
Lang Yu 7e6c3d1bfa Fix Memory_Atomic_Add_Test issue
Since "libhsakmt: Prevent hsaKmtRegisterMemory* from registering non-userptr",
non-userptr is not allowed to be pinned any more.
Use hsa_amd_agents_allow_access to map host memory.

Change-Id: I898d2f83222907de58cafc1a2b18a636634d1b20
Signed-off-by: Lang Yu <lang.yu@amd.com>
Signed-off-by: Chris Freehill <cfreehil@amd.com>
2024-07-17 22:32:23 -05:00
AravindanC 81825df44d Static package generation for rocrtst
Change-Id: I465d542bc223db9c620fde72137012c61eff1ac3
Signed-off-by: David Yat Sin <David.YatSin@amd.com>
Signed-off-by: Aravindan Cheruvally <Aravindan.Cheruvally@amd.com>
Signed-off-by: Chris Freehill <cfreehil@amd.com>
2024-06-25 12:50:03 -05:00
Yifan Zhang 71494a920b Add support for GC 11.5.2
Change-Id: Iad8604881dc66108933ac2155fef3b74bca9ac3f
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Signed-off-by: Chris Freehill <cfreehil@amd.com>
2024-06-25 12:50:03 -05:00
Shweta Khatri 2e1f363d2f Revert "Added new ROCr Trap Handler Test"
This reverts commit b156e906d9c192bd487d10a8900e3eb6090ef547.

Reason for revert: Memory violation test causing a timeout in subsequent test.

Change-Id: If3a217575af545a47d6d67bebba4a2c640a43b81
Signed-off-by: Chris Freehill <cfreehil@amd.com>
2024-06-25 12:27:09 -05:00
Shweta.Khatri 6f6f02f352 Added new ROCr Trap Handler Test
Intentionally trigger sw exceptions to verify GPU can handle abnormal scenarios

Change-Id: Ie80aa21883a912834ce6d917ecbb21ff6b3145f5
Signed-off-by: Chris Freehill <cfreehil@amd.com>
2024-06-25 12:27:09 -05:00
Sreekant Somasekharan 24463635f9 Initial GFX1201 changes.
Add target gfx1201 to several files.

Change-Id: I5cae7dba00ed58f8fbfa6e7147275bd7d5feaed0
Signed-off-by: Sreekant Somasekharan <sreekant.somasekharan@amd.com>
Signed-off-by: Chris Freehill <cfreehil@amd.com>
2024-06-25 12:27:09 -05:00
David Belanger 2f14acd9c1 Initial GFX12 changes.
Add target gfx1200 to several files.
Add cases for GFX12 in a few switch statements.

Signed-off-by: David Belanger <david.belanger@amd.com>
Change-Id: Ib90032f5b9d5a3306060f13a43d970108a1399df
Signed-off-by: Chris Freehill <cfreehil@amd.com>
2024-06-25 12:27:09 -05:00
Chris Freehill 662f6817d7 Changes to build ROCr & thunk (optionally tests) in rocr-runtime repo
Create a new top-level CMakeLists.txt file to control building thunk
and ROCr. kfdtest and rocrtest are built separately.

Most of the cmake code that existed for thunk, ROCr, rocrtst and kfdtest
still reside in their respective CMakeLists.txt files, except the
CPack packaging directives which have been moved to the top-level
CMakeLists.txt.

Change-Id: I1a537359029504af8b1abb324bc6f0d75d98471e
2024-06-24 14:26:21 -05:00
David Yat Sin d2d95a8948 rocrtst: add test for contiguous mem allocations
This test may fail when run on non-upstream versions of KFD as this
feature will not be upstreamed.

Change-Id: I7131e1f50984739c0df12e4c9afe790bd7e4cdfa
2024-04-30 17:42:15 -04:00
David Yat Sin b77ade9c64 rocrtst: Add non-contiguous VMM map tests
Add rocrtst to test mapping non-contiguous memory to a
single VA range

Change-Id: Id2e57f83512f8b482456b2b1925586951ada7400
2024-02-22 14:12:05 +00:00
David Yat Sin 99e31e43aa rocrtst: Add test for GPU access to memory
Add test to verify whether GPU shaders can read memory created using VMM
APIs.
Split VMM rocrtst to two separate groups: Basic and Access tests

Change-Id: Iead8d46125580c71ccd582e967c8e2e891e75c5e
2024-02-22 14:12:05 +00:00
David Yat Sin 1f50219634 Fix compile error when using clang
Change-Id: Ibacf094934a9b489c052a18eeb6b26639aba3032
2024-02-22 14:12:05 +00:00
David Yat Sin 5b28a1bc17 Fix compile error on certain gcc versions
Change-Id: I8a4fab76d1dcc576eb7706ab45fc786c0cab274a
2024-02-13 15:25:34 -05:00
Shweta Khatri 13800cc6d5 Set max_alloc to 95%,reduce by 1% on fail
Prevents OOM-Killer trigger,if all physical and swap mem gets fully used

Change-Id: I70d558fa9c06fe6217e62d57e11aec6a089aa0bb
2024-02-07 14:46:58 -05:00
David Yat Sin 776da1a3f7 rocrtst: Add some tests for hsa_amd_pointer_info
Add tests to catch whether ROCr breaks ABI compatibility with the
hsa_amd_pointer_info API in case the hsa_amd_pointer_info struct is
extended.

Change-Id: I4e69bf30db9791e59f895b2798b87985c41242e5
2024-02-07 16:56:52 +00:00
James Zhu caedadcc6f rocrtst: change max memory search algorithm.
The old max memory search algorithm is using Binary Search
algorithm to find last successful memory allocation. But each
successful memory allocation takes times. Since the unsuccessful
memory allocation returns very quick. Changing the search algorithm
to find first successful memory allocation starting from MAX, each
testing step with granularity interval will speed up this test.

Change-Id: Idada3c6f750c94f3bb223f4f3bff4e4ebd3e98f7
Signed-off-by: James Zhu <James.Zhu@amd.com>
2024-01-18 13:46:44 -05:00
David Yat Sin 84c30dd735 VMM: rocrtst for exporting/importing dmabuf
This is part of patch series for Virtual Memory API.

Change-Id: I1f1357a39b48b0d0611967ce9dd0b83b6a8db864
2024-01-17 10:25:20 -05:00
David Yat Sin a69c1e9f39 VMM: rocrtst for basic virtual memory APIs
This is part of patch series for Virtual Memory API.

Change-Id: Ic3b44435cb09ad17d833b4a4b2551bd211b494e9
2024-01-17 10:25:09 -05:00
David Yat Sin c81c18bcc5 Temporarily disabling Queue_Validation_InvalidWorkGroupSize
Change-Id: I88c5900151b9f572f956cd7b428119b614331be9
2023-12-14 16:46:19 -05:00
Shweta Khatri acf9e95027 Revert "Restore default code object version usage for ROCr and ROCr Test"
This reverts commit 6ef7fcedd1290b59190f81df1d25142ecb05d282.

Change-Id: Icc0300c25a89fcb99287d013863a00ace7e12129
2023-12-04 15:03:31 +00:00
Lang Yu 991bbdcf24 Revert "Revert "Add support for GC 11.5.0 and 11.5.1""
This reverts commit ebc51dd0eb.

gfx1150/1151 is merged into mainline now.

Change-Id: Id179949318a37888c74abb5a8610d95bc2f22906
2023-12-04 15:03:31 +00:00