نمودار کامیت

360 کامیت‌ها

مولف SHA1 پیام تاریخ
Shikai Guo 4951495fca libhsakmt: add filter node for new chip
When running kfdtest test case, because the filter node of the new chip is
missing in libhsakmt, the test case is not supported, so a new test node
is added in order to spporting kfdtest case.

Signed-off-by: shikaguo <shikai.guo@amd.com>
Change-Id: I0cd9ffd7d4387129cfb0f8de6b669f431949ab49
2022-09-07 15:18:18 +08:00
Graham Sider 4267c4b524 kfdtest: Bump C++ compiler to gnu++17
Required due to LLVM retirement of llvm::apply_tuple, instead using
std::apply which was introduced in C++17.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I6646ebcca7d71d3e1bcf340ccfa3db2c15a3110a
2022-08-24 11:46:18 -04:00
Graham Sider 0055ef46c4 kfdtest: Add KFDCWSRTest.BasicTest* to GFX10 blacklist
Failure with new CWSR tests reported for GFX10, for now add to blacklist.



Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I5b2bd9ec61c64ad66e1c34ba2c192bece808f56f
2022-08-23 16:03:24 -04:00
Graham Sider 0dbac97b75 kfdtest: Overhaul KFDCWSRTest.BasicTest
This patch restructures the CWSR basic test and allows for
creating parameterized CWSR tests. This patch introduces four
parameterizations. These tests behave as follows:

This test dispatches the IterateIsa shader, which continuously
increments a vgpr for (num_witems / WAVE_SIZE) waves. While this shader
is running, dequeue/requeue requests are sent in a loop to trigger
CWSRs.

This test defines a CWSR threshold. Once the number of CWSRs triggered
reaches the threshold, a known-value is filled into the inputBuf to
signal the shader to exit.

4 parameterized tests are defined:

KFDCWSRTest.BasicTest/0
KFDCWSRTest.BasicTest/1
KFDCWSRTest.BasicTest/2
KFDCWSRTest.BasicTest/3

0: 1 work-item, CWSR threshold of 10
1: 256 work-items, CWSR threshold of 50
2: 512 work-items, CWSR threshold of 100
3: 1024 work-items, CWSR threshold of 1000

Tuple Format: (num_witems, cwsr_thresh)

num_witems: Defines the number of work-items.
cwsr_thresh: Defines the number of CWSRs to trigger.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I639eb7bd75b14ee70e190b4bd19dcf34096fc7bf
2022-08-22 19:55:04 -04:00
Kent Russell 90ada94141 kfdtest: Add return statement for ReadSMIEventThread
This didn't return anything, so add a "return 0" at the end, since the
function expects to return an int value

Change-Id: I17c398e431b2ce4571e6ca4abe6d567f110ea2a7
2022-08-02 09:22:49 -04:00
jie1zhan 17fb40f1f6 Fix allocate memory failed in VRAM
: The kernel driver will do align VRAM allocations to 2MB, instead of 4KB.
Change-Id: Iea9d8c0f02999b9ea5fd931da82240a33f7bcc69
2022-07-30 01:18:50 -04:00
Felix Kuehling 9d33827a84 kfdtest: Disable host access for VRAM
KFDExceptionTest.SdmaQueueException allocates VRAM with host access. This
fails on small-BAR GPUs. This error was incorrectly ignored before
412b24137e ("kfdtest: Full TearDown and SetUp in child process").

The test doesn't really need host access to the memory. Therefore the fix
is to disable the HostAccess flag.


Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: Ifec279eeb6c1ecb1160db9b692e6dc8816d761a3
2022-07-21 16:08:19 -04:00
Felix Kuehling cdaaf8236a kfdtest: Remove CMA tests
The CMA feature is deprecated and about to be removed from the DKMS
branch. It was never supported upstream.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: I64b6213eb3adbdc550542e51181cd8ba6ca4cb45
2022-07-21 16:08:19 -04:00
Felix Kuehling 412b24137e kfdtest: Full TearDown and SetUp in child process
With the next patch, child processes need to fully reinitialize the
topology in order to recreate the process apertures. Just calling
hsaKmtOpenKFD is no longer sufficient. Tests based on
KFDMultiProcessTest already did this correctly (KFDHWSTest, eviction
tests). This patch fixes KFDExceptionTest and KFDIPCTest.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: Iaad24e88ddd29c1105bf791a77891cc55a6072ff
2022-07-19 21:21:59 -04:00
Graham Sider c6da7d1353 kfdtest: Remove fixed tests from GFX11 blacklist
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I2dc785ea88a1a9222c6b7886fb75b6c7d699036a
2022-07-18 14:35:17 -04:00
David Francis 39e8a85aac kfdtest: Remove strange load from LoopIsa
LoopIsa is a shader that performs a variety of intensive
calculations in a loop. It is used by tests such as
KFDQMTest.QueuePriorityOn*

It contained a scalar load, despite not having any buffer to
read from. This load causes page faults on GFX11. It is
unclear why it did not cause page faults on earlier ASICs.

Remove the load.

Signed-off-by: David Francis <David.Francis@amd.com>
Change-Id: I7426d0db48e933f3bb870467ea88476f7a283040
2022-07-13 09:37:01 -04:00
David Francis 4b8c74bf04 kfdtest: Change KFDQMTest.EmptyDispatch to NoopIsa
When the shaders were moved to ShaderStore,
KFDQMTest.EmptyDispatch was erroneously
changed to use LoopIsa instead of NoopIsa.

Change it back.

Signed-off-by: David Francis <David.Francis@amd.com>
Change-Id: Iaf7d0d107e3bf3bd8b7d616b137a1740e309cf91
2022-07-13 09:36:45 -04:00
Kent Russell 9745db3053 KFDTest: Use default packaging name for kfdtest
Previously we omitted the version and arch in the filenames. By adding this,
as well as the ROCM build variable, this will allow for easy version
version detection on systems. Instead of kfdtest = v1.0.0, now it will
feature the build number, allowing for easier identification as to which
version is installed.

Change-Id: I311ed7010486e7c70af669d282910fe29ee8db45
2022-07-12 12:41:20 -04:00
Philip Yang 7799611c01 kfdtest: add KFDSVMRangeTest.HMMProfilingEvent
Open SMI event file handle, prefetch to migrate svm range to GPU, read
HMM profiling events, then check event_id, address, size, pid, event
triggers are the expected value.

Start separate thread to read SMI event, the same way applications use.
Use thread barrier to ensure no event is dropped.

Change-Id: I0683969d18d1579847e125d86aa4257602adb13f
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2022-07-06 10:08:44 -04:00
Graham Sider 350eba3a07 kfdtest: Update gpuName logic for ip discovery
Kernel amd-staging-drm-next branch changes GFX11 fish_colour sysfs
naming to "ip discovery". Update run_kfdtest.sh to use sysfs
gfx_target_version for ASICs that have transitioned to IP discovery
topology.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: If202a0ceeed7324364539a33661f0abcf0973f07
2022-06-23 13:48:26 -04:00
Kent Russell f7978b1ff6 run_kfdtest.sh: Add --exclude flag to exclude additional subtests
Currently, using --gtest_filter will override any exclusions from
kfdtest.exclude. To add an additional test (or set of tests) to the
exclusion list dynamically, the --exclude (-e) flag will allow the user
to pass in a string of GTest-style exclusions to add to the list
generated by kfdtest.exclude

e.g. run_kfdtest.sh -e "*KFDLocalMemoryTest.*:KFDEventTest.*"
will use kfdtest.exclude, but will also exclude all LocalMemory and
Event tests

Change-Id: Ic23ec271ba2cd2240d2e98558c0117ff2a064ed2
2022-06-15 16:08:38 -04:00
Graham Sider 852d29bca2 kfdtest: Add temporary blacklist for GFX11
Add blacklist for tests on GFX11 that are under debug/not functional.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I32f375f29036a2fc1a54f2792b31ebc45f4d668b
2022-06-13 14:32:17 -04:00
Graham Sider c198b91c94 kfdtest: Add case for gfx11 in FamilyIdFromNode
GFX11 set to FAMILY_NV.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I545241c39bbe739e39a8943b242b9fc49a65a7e1
2022-05-19 12:32:02 -04:00
Graham Sider cee64d4825 kfdtest: Add gfx11 to kfdtest.exclude
With this patch gfx11 is supported in amd-staging.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I4bbfc87345a486dd8f2e0091ea7b82c255a8ad15
2022-05-18 10:41:22 -04:00
Graham Sider d5f074902c kfdtest: Update CMake message on LLVM build search
Old CMake message was misleading, update to reflect what it's actually
doing.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I8fd18a9095ea350cc10494b4382706027b447ba3
2022-05-11 13:39:49 -04:00
Graham Sider 30bba89830 kfdtest: Move BasicCuMaskingEven to gfx10 blacklist
KFDQMTest.BasicCuMaskingEven was previously in TEMP_GFX10_BLACKLIST and
was later added to BLACKLIST_GFX10_NV2X.  shows this test
also has problems on NV1X, so move to BLACKLIST_GFX10 to blacklist for
all GFX10 until resolved.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I75426780a52172ed0f2468f0297241902da5002a
2022-05-08 15:19:46 -04:00
Graham Sider 0955f350e3 kfdtest: Clean up kfdtest.exclude
Add BLACKLIST_GFX10 and BLACKLIST_GFX10_NV2X to reduce redundant
individual blacklists. Remove KFDDBGTest from kfdtest.exclude and
CMakeLists.txt as it is deprecated.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I5ffebb012ff8ef4bba5aadfeb3c7478fe43c65f1
2022-05-05 11:23:33 -04:00
Graham Sider fe2098e011 kfdtest: Add DeviceHdpFlush to gfx10 blacklist
DeviceHdpFlush was part of the prior TEMP_GFX10_BLACKLIST and is
soft-hanging after being re-added to the test list. Temporarily move
back to gfx10 blacklists until root-caused ().

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Id37b7105566e8243465e4b21ebc2e2e8c4c79923
2022-05-05 10:09:14 -04:00
Graham Sider ffa6c95858 kfdtest: Hotfix wrong isaBuffer used in DeviceHdpFlush
In DeviceHdpFlush, isaBuffer was accidentally used instead of isaBuffer0
during LLVM re-work--revert.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I98d2322e772f821a39505bb336ceb4e6cd8722ef
2022-05-04 16:13:20 -04:00
Philip Yang c05c66e756 kfdtest: SVM mGPU tests skip GPUs prior to gfx9
Otherwise the test failed because KFD returns failure to map or prefetch
the SVM range to those GPUs which don't support SVM.

Change-Id: Ideaec2a686bfabb2fd6ae41b1a690da144121a89
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2022-05-02 16:42:03 -04:00
David Francis 4b041a8ad9 kfdtest: Use correct isa buffer in GPU coherency test
In the LLVM rework, a line was accidentally changed from
isaBuffer1 to isaBuffer, causing VramCacheCoherenceWithRemoteGPU
to fail. Change it back.

Signed-off-by: David Francis <David.Francis@amd.com>
Change-Id: Ie1f3465b5c46556f18682d1b3d1f086bb790c648
2022-05-02 09:13:20 -04:00
Alex Sierra b9e8bc1f52 kfdtest: add log message to KFDExceptionTest
[WHY]
These tests force HW exceptions in the GPU driver. Some of these
exceptions might print page fault error messages at kernel level.
These are expected errors due to the nature of the tests, but still
might cause confusion to users.

[HOW]
Add log message to warn the user about these kernel error messages.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: I8eef87b83939e37230da0c374c2f77d2d484baa9
2022-04-27 15:38:11 -05:00
Graham Sider 7eeba830f8 kfdtest: Add KFDASMTest
Includes a simple AssembleShader test which loops through all shaders
for all supported targets, dispatching a RunAssemble call for each
shader.

Also adds extra safety on a couple shaders that only work on
gfx9/gfx90a.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I3ca1c92136f3871eb62fcb9645694f22287aaeec
2022-04-26 13:14:33 -04:00
Graham Sider 025c6146d9 kfdtest: Remove TEMP_GFX10_BLACKLIST
With LLVM-based assembly these shaders are now valid for GFX10, with the
exception of KFDSVMEvictTest.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Idc872139176bbc1cc8d7ae61a8e4572360ecb5d5
2022-04-26 13:14:33 -04:00
Graham Sider e6e498abf3 kfdtest: Remove SP3/IsaGen
- Remove SP3 lib directory
- Remove IsaGenerator* files
- Update CMakeLists accordingly

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I280161b0b238839ab318c18d6038cdd64fa66208
2022-04-26 13:14:33 -04:00
Graham Sider ffaa3d9246 kfdtest: Remove IsaGen from KFDIPCTest
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I3194e6a6bdab846da9cf346f47a7d7580e2def4d
2022-04-26 13:14:33 -04:00
Graham Sider ac48163885 kfdtest: Remove IsaGen from KFDDBGTest
KFDDBGTest is deprecated, so just removing references to IsaGen.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I9f094d847a8ae43cb3793253b34a7d7ed2179ac1
2022-04-26 13:14:33 -04:00
Graham Sider 4c7cf6e7d2 kfdtest: Remove IsaGen from KFDExceptionTest
Replace with LLVM-based Assembler.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Ia64b8cc77382773b48de576d350bbed3c1efdb74
2022-04-26 13:14:33 -04:00
Graham Sider 780f0b618c kfdtest: Remove IsaGen from KFDHWSTest
Replace with LLVM-based Assembler.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Ibbc4103d9498321b87feadf14a523b0d44d1851c
2022-04-26 13:14:33 -04:00
Graham Sider 8a6743aef4 kfdtest: Remove IsaGen from RDMATest
Replace with LLVM-based Assembler.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I5dff1b9402e294af33cec78a24e2e2decfb5b6d3
2022-04-26 13:14:33 -04:00
Graham Sider 469d5e67d2 kfdtest: Remove IsaGen from KFDSVMRangeTest
Replace with LLVM-based Assembler.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Id05f8a18a188d0ad354b711c1c196b71dffcc756
2022-04-26 13:14:33 -04:00
Graham Sider 549f7cdce2 kfdtest: Remove IsaGen from KFDLocalMemoryTest
Replace with LLVM-based Assembler.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Ie83d27b6a93ac1b5169a830a7f274e360a31023e
2022-04-26 13:14:33 -04:00
Graham Sider 097b11abad kfdtest: Remove KFDSVMEvictTest ReadMemory shader
Use ReadMemoryIsa transferred and updated from KFDEvictTest.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I566f9ec36398bc4d08ab90231688600356df4d6a
2022-04-26 13:14:33 -04:00
Graham Sider 5ceb35f428 kfdtest: Add macros to simplify instr differences
Makes use of macros to simplify shader code with instruction-level
differences depending on GFX version. These macros are extensible and
are prepended to every shader so that they are usable everywhere.

This patch introduces three macros used within IterateIsa and
ReadMemoryIsa shaders.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: If954e1b6d2027e9f55bf7e99bd9df2668d1da524
2022-04-26 13:14:33 -04:00
Graham Sider b2b54dffe6 kfdtest: Move KFDGWSTest shaders to ShaderStore
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I9608b8bea32d64d4d0e1a329191f9a62e3a771e7
2022-04-26 13:14:33 -04:00
Graham Sider 91cf11967e kfdtest: Move KFDEvictTest shaders to ShaderStore
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I4d7d349284ea213becdb4680b804dbd202196e1d
2022-04-26 13:14:33 -04:00
Graham Sider ad5f98814f kfdtest: Move KFDCWSRTest shaders to ShaderStore
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I7c89fca94e92145a4115d1089348380807a868ee
2022-04-26 13:14:33 -04:00
Graham Sider aced779f1b kfdtest: Move KFDQMTest shaders to ShaderStore
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Id50aea16528c4bed4530f95644a02f59efddae3e
2022-04-26 13:14:33 -04:00
Graham Sider c926d83b5a kfdtest: Move KFDMemoryTest shaders to ShaderStore
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I3335ca1f9dbe849233cf85253e0e92b56a20b8c9
2022-04-26 13:14:33 -04:00
Graham Sider 34ca37d9e8 kfdtest: Add ShaderStore.cpp/hpp
Initial commit for ShaderStore.hpp. Will contain consts char*'s for
all shaders used within KFDTest.

The LLVM assembler now takes care of the correct instructions to be used
for various GFX versions using directives embedded into the shader assembly.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I2887a03b33d5c2cc382e4f96c2bc3e067715ab54
2022-04-26 13:14:33 -04:00
Graham Sider a7b85fdb08 kfdtest: Update KFDSVMEvictTest to LLVM Asm
- Reformat shaders for legibility
- Move assembly processes to from IsaGen (CompileShader) to Assembler
(RunAssembleBuf)

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Id1eb3856bc74bf0da46685c5dc08e91f5df66d4f
2022-04-26 13:14:33 -04:00
Graham Sider ba9ccd32a1 kfdtest: Update KFDGWSTest to LLVM Asm
- Reformat shaders for legibility
- Move assembly processes to from IsaGen (CompileShader) to Assembler
(RunAssembleBuf)
- Change gds:1 modifier to gds
- Change offset0:0 modifier to offset:0

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I2a863695bcf7344cf184a809704948ba3a0d230f
2022-04-26 13:14:33 -04:00
Graham Sider b44d6762bd kfdtest: Update KFDEvictTest to LLVM Asm
- Reformat shaders for legibility
- Move assembly processes to from IsaGen (CompileShader) to Assembler
(RunAssembleBuf)

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I7333d0e45ccd3f43690a2a01227f89a6e04fcecb
2022-04-26 13:14:33 -04:00
Graham Sider c845b976d0 kfdtest: Update KFDCWSRTest to LLVM Asm
- Reformat shaders for legibility
- Move assembly processes to from IsaGen (CompileShader) to Assembler
(RunAssembleBuf)

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I174f1ea5332c499440b30d9bcf06836274428a0f
2022-04-26 13:14:33 -04:00
Graham Sider 08d38fb140 kfdtest: Update KFDQMTest to LLVM Asm
- Reformat shaders for legibility
- Move assembly processes to from IsaGen (CompileShader) to Assembler
(RunAssembleBuf)

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I669f076b5c34eb90349865eeca1b29e17c9e80d6
2022-04-26 13:14:33 -04:00