Wykres commitów

109 Commity

Autor SHA1 Wiadomość Data
Apurv Mishra 3115384874 kfdtest: Temporarily blacklist KFDEvictTest suite
blacklist the KFDEvictTest suite until the defects
SWDEV 535386 and 537002, where these test cases fail
inconsistently, are fixed

Signed-off-by: Apurv Mishra <Apurv.Mishra@amd.com>
2025-07-04 11:47:20 -04:00
Apurv Mishra d9a95605cc kfdtest: Disable KFD RAS test case
disable KFD RAS test case as the tests cause GPU reset
which affects the active kfdtest, the tests can only be
run successfully as separate processes

Signed-off-by: Apurv Mishra <Apurv.Mishra@amd.com>
2025-05-27 19:04:04 -04:00
Amber Lin 31d51acb26 kfdtest: blacklist KFDSVMEvictTest.QueueTest
Temporarily blacklist KFDSVMEvictTest.QueueTest on gfx950

Signed-off-by: Amber Lin <Amber.Lin@amd.com>
2025-05-23 01:22:11 -04:00
Philip Yang bd86fb1e63 kfdtest: Add KFDQMTest UserQueueBufValidation
Create CP queue and SDMA queue should fail with invalid queue ring
buffer or ring buffer size.

Test unmap or free queue buffers should fail before queue is destroyed.

Use child process to test unmap CWSR buffer will evict queue.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Change-Id: I5dcd51d6b43445d19a986f8b0b82063e20348a5f
2025-05-22 10:06:42 -04:00
Apurv Mishra f853dda9ba kfdtest: Disable tests that cause unwanted behavior
disable KFDLocalMemoryTest.Fragmentation and
KFDEventTest.MeasureInterruptConsumption as
part of the  KFD test suite improvement feature

Signed-off-by: Apurv Mishra <Apurv.Mishra@amd.com>
2025-05-21 16:29:15 -04:00
Ben Vanik d54124383f kfdtest: Fix SVM profiler QUEUE_RESTORE parsing 2025-05-21 13:17:25 -04:00
Searles, Mark ac1e6d59c2 Update createMCObjectStreamer() to use new LLVM API (#156) (#157)
* Update createMCObjectStreamer() to use new LLVM API

Obsolete interfaces were removed via llvm-project's
f2ff298867d7733122e32eead5a8c524b09dfdb1

* Fix typo: LLVM_VERSION -> LLVM_VERSION_MAJOR

* Fix typo
2025-05-05 13:18:05 -07:00
Apurv Mishra aa0a32a166 kfdtest: Update ROCr homepage in CMakeLists.txt
Signed-off-by: Apurv Mishra <Apurv.Mishra@amd.com>
2025-05-01 11:22:49 -04:00
Amber Lin 5e28208cec kfdtest: Skip SVMEvict with xnack=0
Random driver deadlock on svm_range_evict_svm_bo_worker() is obeserved on
NPS2/DPX mode. It's seen with xnack off and happens more often on the
partition with less VRAM because of TMR.

Temporarily skip SVM Evict tests on Family AV when xnack is disabled.

Signed-off-by: Amber Lin <Amber.Lin@amd.com>
2025-04-25 12:45:36 -04:00
Amber Lin bdb6e43b54 Revert "kfdtest: Temporarily blacklist KFDNegativeTest"
This reverts commit fcf3f91379.

MEC v18 starts to support pipe reset
2025-04-21 14:14:10 -04:00
Jonathan Kim 4c3a0698f8 kfdtest: fix trap on start for gfx 9 and 11
Similar to GFX 12, GFX 9 and 11 need to exit without forwarding
the PC.
2025-04-10 14:48:19 -04:00
Eric Huang df6048429c kfdtest: fix max queues on multi-gpu mode
The max queues per process is 1024 in KFD,
KFDQMTest.OverSubscribeCpQueues fails with multi-gpu mode
on more than 15 gpus, because 65x16=1040 exceeds 1024, so
changing MAX_CP_QUEUES to adapt it will fix the issue.

Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
2025-04-08 12:57:00 -04:00
Eric Huang d3265234e9 kfdtest: fix ptrace error on multi-gpu mode
The parent process can only be ptraced by 1 process
once, to avoid the error we have to add mutex to
synchronize the ptrace call.

Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
2025-04-08 09:58:28 -04:00
Apurv Mishra 10530fa2a7 kfdtest: support for upstream kernel driver
detect if the loaded driver is upstream or DKMS version and
add a filter for for the tests that fail in upstream driver

Signed-off-by: Apurv Mishra <Apurv.Mishra@amd.com>
2025-03-27 16:55:21 -04:00
Jonathan Kim c710a06ee0 kfdtest: fix trap on wave start and end
The debugger override will set the initial request mask to the
previously set request mask so use a different mask to assert
enablement.
Trap on wave start and end also run back to back, so fix the
previous override mask check as well.

In addition, unlike instruction traps, trap on wave start and end
will not require a rewind of the program counter on wave exit.
2025-03-24 20:44:27 -04:00
Emily Deng 42f79776cd kfdtest: Fix the childStatus is 0x7f error for KFDDBGTest.HitMemoryViolation
For the case parent goes faster then child, and child hasn't call the second
raise(SIGSTOP), then parent's "waitpid(childPid, &childStatus, 0)" will return,
and the childStatus will be 0x137f, which is SIGSTOP signal id.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
2025-03-13 13:38:46 +08:00
Emily Deng 91ef44d3ec kfdtest: Fix DeviceSnapshot return fail error for KFDDBGTest.HitMemoryViolation
For the case that the child goes to the second raise(SIGSTOP),
and parent sends PTRACE_CONT, than child exits. Parent will assert at
DeviceSnapshot, as in kfd_ioctl, couldn't get the mm from child pid.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
2025-03-13 13:38:46 +08:00
Apurv Mishra 85c4b0020a kfdtest: limit GFX VRAM allocation to 1/4 sys mem
reduce the allocated memory for GFX VRAM as
KFD Evict test faced intermittent page faults,
which can be due to larger GFX CS BO size
2025-03-12 13:54:04 -04:00
Apurv Mishra de8f8f076d kfdtest: add blacklist for RHEL9 system
add tests for exclusion when running kfdtest
on RHEL9 system, tested with Navi 31

Signed-off-by: Apurv Mishra <apurv.mishra@amd.com>
2025-03-11 16:40:25 -04:00
Amber Lin fcf3f91379 kfdtest: Temporarily blacklist KFDNegativeTest
Blacklist KFDNegativeTest.BasicPipeReset from gfx950 until MEC can
support pipe reset on GC 9.5.0.

Signed-off-by: Amber Lin <Amber.Lin@amd.com>
2025-03-10 10:37:19 -07:00
Jonathan Kim c879fdefcf kfdtest: Add KFD SDMA queue reset testing
The KFD can per-SDMA queue reset similar to compute queue reset.
Add test.
2025-03-06 14:04:42 -05:00
Jonathan Kim ee890e7d2b kfdtest: Add KFD SDMA queue reset testing
The KFD can per-SDMA queue reset similar to compute queue reset.
Add test.
2025-03-06 14:04:42 -05:00
Jonathan Kim d047708317 kfdtest: Allow user to modify packet size for SDMA write packets
This is primarily used for debug and negative testing for SDMA queue
reset and shouldn't be used for normal run cases.
2025-03-06 14:04:42 -05:00
Jonathan Kim 9e57ce48e8 kfdtest: Add create SDMA queue by target engine
KFD supports SDMA queue creation by target engine.
Enable this for testing.
2025-03-06 14:04:42 -05:00
Jonathan Kim a957b24153 kfdtest: Add SDMA poll memory register packet support
The SDMA can wait on poll user memory.  This is being added to
support per-SDMA queue reset testing.
2025-03-06 14:04:42 -05:00
David Belanger 3ceb131df5 kfdtest: Fix ExtendedCuMasking test case
Modify test case to support XL cards.

Change-Id: I6ad45a290d50a5238804ce7417bcdb33a3912872
Signed-off-by: David Belanger <david.belanger@amd.com>
2025-02-27 21:25:19 -05:00
James Zhu f8d8b8011f kfdtest: fix resource leakage
Resource allocated in SetUp/HsaNodeInfo::Init,
needs be delete in TearDown/HsaNodeInfo::Delete.

Signed-off-by: James Zhu <James.Zhu@amd.com>
2025-02-24 19:38:59 -05:00
David Belanger f24d789dee kfdtest: Convert ExtendedCuMask test to multi-GPU framework
Convert test to use multi-GPU framework.

Add mutex to fix intermixed log issue and annotate logging with
gpu node number.

Signed-off-by: David Belanger <david.belanger@amd.com>
Change-Id: Ic2beeadb1eb4b5a9a0710ac1dbd60b9bf1d84c33
2025-01-30 11:41:00 -05:00
Sv. Lockal 5d04bd42f3 Fix build issues for musl libc (#267)
Change-Id: Ia31330b0f96669966712b58986abeca754c2cbb9
2025-01-29 14:31:05 +00:00
Lang Yu d159b29dc6 kfdtest: update AtomicIncIsa for gfx12
"s_waitcnt 0" (deprecated in gfx12) is redundant here.

s_endpgm will wait for all outstanding instructions
to complete before executing.

Change-Id: Ia8b4dd0fd8dd713e7ba2cba9db85b7b12cee1dd4
Signed-off-by: Lang Yu <lang.yu@amd.com>
2025-01-28 20:32:41 -05:00
Amber Lin 0b6e457201 kfdtest: Create gfx950 blacklist
This patch creates the blacklist for gfx950 by copying gfx942 but adding
KFDGWSTest.Semaphore as GWS support is completely removed from gfx950.

Change-Id: I5d7c17e57b8cfd9fae63780ecc9dd55662cfdade
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
2025-01-28 08:26:44 -05:00
Alex Sierra 268054cd28 kfdtest: add support for gfx9.5.0 in shader store
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: I48b98ff631bd1aa1a044b60583ff256e43b17423
2025-01-26 21:45:07 -05:00
Alex Sierra e94ff8a36c kfdtest: Add gfx 9.5 as FAMILY_AV
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: Ib5696eee1d4f64c9c87d714eae7c80fbbd1e2b23
2025-01-26 21:43:55 -05:00
Harish Kasiviswanathan 1d71975fcc kfdtest: Fix KFDASMTest failure on older ASICs
HW_REG_HW_ID1 is only available from gfx12 onwards

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: Ibf4bd62e01ada3dee6dd88762ccb853bab63ff87
2025-01-13 15:22:20 -05:00
Harish Kasiviswanathan f8ae5c47ba kfdtest: Add gfx12 to TargetList for AssembleShaders
Add gfx12 so that it gets tested when KFDASMTest.AssembleShaders is run.
GWS support has been removed for gfx12. Modify shaders to take that into
account.

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: I70e87febb6388852ea54d69cf9201339a7910581
2025-01-13 15:22:15 -05:00
Lang Yu fe5f12342d kfdtest: consolidate LoopIsa
1, Initialize the registers before using them is the best practice.
Though the use case here doesn't care whether the registers are
initialized or not, some emulators complain the "read_before_write"
behavior. Initialize the registers used to silence these complaints.

2, Update s_wait stuff for gfx12.

Change-Id: I462b2b0b5017dd2876a5954169d3b6b2f1c2a75b
Signed-off-by: Lang Yu <lang.yu@amd.com>
2025-01-10 21:27:23 -05:00
Kent Russell cc7ff73e7f kfdtest: Can't initialize variable-sized objects
Do a memset, since we can't initialize variable-sized objects

Change-Id: I57faf4a0581a29f9d30391aa387812c2b7bb5011
Signed-off-by: Kent Russell <kent.russell@amd.com>
2025-01-09 10:36:06 -05:00
Tim Huang 7bad0cb4a1 kfdtest: add blacklist for gfx1153
Change-Id: I1f132858cb79c6d0561477fe8ce69aafd93ad351
Signed-off-by: Tim Huang <tim.huang@amd.com>
2025-01-08 21:20:17 -05:00
David Belanger 9667af97d9 kfdtest: Add ExtendedCuMasking test case
New implementation of CU mask testing that focuses on correctness of
masking.  Unlike previous implementations, this new implementation does not
rely on performance measurements to decide on the results of the test.
Instead, this implementation checks if waves were executed on all the CUs
enabled and only the CUs enabled.

Test case initially supported on GFX12.

Signed-off-by: David Belanger <david.belanger@amd.com>
Change-Id: I5af8b890179bc9a415fc7f47e736f4971fc40c4a
2025-01-08 17:36:59 -05:00
Kent Russell eda54222ea kfdtest: Explicitly include tuple in KFDCWSR
We can inherit it from gtest, but not in ASAN builds. And we should be
including what we use, instead of hoping to inherit it through other
headers

Change-Id: Id47ab06a57e1c71c88f72da5f21a71f37db8a2f3
Signed-off-by: Kent Russell <kent.russell@amd.com>
2025-01-07 13:57:36 -05:00
Xiaogang Chen eafa929520 kfdtest: fix a regession on KFDEvictTest test case
The kfdtest multi-gpu extension only allows using the first gpu(in topology
order) as default gpu for KFDEvictTest test case. We should allow user
to select any gpu in system as default gpu to run KFDEvictTest test case.

Signed-off-by: Xiaogang Chen<Xiaogang.Chen@amd.com>
Change-Id: I8848771d92ae2812fbb96e917454ab3b4a71a2fa
2024-12-18 10:13:54 -06:00
Xiaogang Chen ec457752dc kfdtest: update run_kfdtest.sh when HSA_TEST_GPUS_NUM is enable
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I68e4f4f8fd7397d3b39b3473638836e4531bef2b
2024-12-16 12:47:50 -05:00
Xiaogang Chen cbb38606e3 kfdtest: Convert KFDSVMRangeTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: Ia4d55c38576c39b3768a847c60d70bda88f65740
2024-12-16 12:47:44 -05:00
Xiaogang Chen 641f1f797d kfdtest: Convert KFDLocalMemoryTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: Iaf20ec15e85ed10998e9735881d3c029abedd3a4
2024-12-16 12:47:39 -05:00
Xiaogang Chen 10c9b98f6e kfdtest: Convert KFDMemoryTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I29d7fbb156a88b4df5be5f2fa0c20fbc47b108ed
2024-12-16 12:47:34 -05:00
Xiaogang Chen f229605b06 kfdtest: Convert KFDQMTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: Ia3582ab5b802ead4df267eeb280b8e7d37eb0ac2
2024-12-16 12:47:28 -05:00
Xiaogang Chen dbccf11ef8 kfdtest: Convert KFDExceptionTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I545ac485d13a3a56a3b352926ec71daa5b074862
2024-12-16 12:47:21 -05:00
Xiaogang Chen 0357e2e139 kfdtest: Convert KFDEventTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: Id1dc91f654686f159adb1bc70907e11558ee4be0
2024-12-16 12:47:14 -05:00
Xiaogang Chen fa31caddba kfdtest: Convert KFDCWSRTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I51646ebd95b2ef4820f7b503bd642deb05a86930
2024-12-16 12:47:08 -05:00
Xiaogang Chen 6c6daf66bf kfdtest: Convert KFDGWSTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I0901750b2ce55bd7f44425b01442d98f0faf12fd
2024-12-16 12:47:01 -05:00