Commit Graph

1026 Commits

Author SHA1 Message Date
David Francis 9eacd7102e 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


[ROCm/ROCR-Runtime commit: 39e8a85aac]
2022-07-13 09:37:01 -04:00
David Francis f1eabf361e 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


[ROCm/ROCR-Runtime commit: 4b8c74bf04]
2022-07-13 09:36:45 -04:00
Jonathan Kim 14971a0486 libhsakmt: fix runtime disable check
Kernel debug IOCTL got version bumped to v11.
Updated runtime enable but missed runtime disable check update.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I71a8970ccfe7dc517abe7b4ad962369aea6a0496


[ROCm/ROCR-Runtime commit: a31206e98b]
2022-07-12 20:59:08 -04:00
Kent Russell 9c4a3ed9ee 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


[ROCm/ROCR-Runtime commit: 9745db3053]
2022-07-12 12:41:20 -04:00
Eric Huang 1d5b141016 libhsakmt: allocate unified memory for ctx save restore area
To improve performance on queue preemption, allocate ctx s/r
 area in VRAM instead of system memory, and migrate it back
 to system memory when VRAM is full.

Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Change-Id: If775782027188dbe84b6868260e429373675434c


[ROCm/ROCR-Runtime commit: 37be876cad]
2022-07-11 18:06:55 -04:00
Eric Huang 3c6cc14728 libhsakmt: add new flag for svm
It is to add new option for always keeping gpu mapping
and bump KFD version for the feature of unified save
restore memory.

Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Change-Id: Iebee35e6de4d52fa29f82dd19f6bbf5640249492


[ROCm/ROCR-Runtime commit: e1d1a6fbb0]
2022-07-11 18:06:48 -04:00
Philip Yang 843c90527f 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>


[ROCm/ROCR-Runtime commit: 7799611c01]
2022-07-06 10:08:44 -04:00
Jonathan Kim 2018829660 libhsakmt: permit runtime enable version for new hw mode set restrictions
The KFD no longer allow debug ops that modify HW state prior to
trap activation so permit bump in major version.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I072d3998b7b043df9a67f0f6762b0afdfa9382c6


[ROCm/ROCR-Runtime commit: 79cd63fab6]
2022-06-24 10:21:57 -04:00
Graham Sider 98df7779da 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


[ROCm/ROCR-Runtime commit: 350eba3a07]
2022-06-23 13:48:26 -04:00
Graham Sider 149d8b59ab libhsakmt: Make queue memory allocation non-paged
Non-paged allocation for queue memory necessary for binding wptr to
GART. Required to support usermode queue oversubscription with MES on
GFX11.

Change ensures queue memory does not specify ATS.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I10b23b0205c90dad902c711a88cfb5e9b4979617


[ROCm/ROCR-Runtime commit: e17b159230]
2022-06-22 18:37:26 -04:00
Philip Yang be429e8651 libhsakmt: add open SMI event handle
System Management Interface event is read from anonymous file handle,
this helper wrap the ioctl interface to get anonymous file handle for
GPU nodeid.

Define SMI event IDs, event triggers, copy the same value from
kfd_ioctl.h to avoid translation.

Change-Id: I5c8ba5301473bb3b80bb4e2aa33a9f675bedb001
Signed-off-by: Philip Yang <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: 405fbd6f93]
2022-06-20 08:49:13 -04:00
Philip Yang 890410d9cd libhsakmt: hsaKmtGetNodeProperties add gpu_id
Add KFDGpuID to HsaNodeProperties to return gpu_id to upper layer,
gpu_id is hash ID generated by KFD to distinguish GPUs on the system.
ROCr and ROCProfiler will use gpu_id to analyze SMI event message.

Change-Id: I6eabe6849230e04120674f5bc55e6ea254a532d6
Signed-off-by: Philip Yang <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: 88778e13dc]
2022-06-20 08:48:44 -04:00
Kent Russell c173ad8e07 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


[ROCm/ROCR-Runtime commit: f7978b1ff6]
2022-06-15 16:08:38 -04:00
Alex Sierra 62e8a0b66d libhsakmt: add env var to set max VA alignment order
This env variable sets the max VA alignment order size as
"PAGE_SIZE * 2^alignment order" during mapping. By default the order
size is set to 9(2MB).

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: I01ae4e0963f4d21c7c367464e60f865bc58d7fac


[ROCm/ROCR-Runtime commit: 0e908f05bb]
2022-06-13 15:46:54 -04:00
Graham Sider 65cea3009c 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


[ROCm/ROCR-Runtime commit: 852d29bca2]
2022-06-13 14:32:17 -04:00
Daniel Phillips 8a60a6037e libhsakmt: Add support for hsaKmtAvailableMemory
New API function to report available memory per GPU

Signed-off-by: Daniel Phillips <Daniel.Phillips@amd.com>
Change-Id: I63c1e4ca0020c657977ab3635947ab0ed0a81440


[ROCm/ROCR-Runtime commit: 6da6058d4a]
2022-06-13 09:37:32 -04:00
Ranjith Ramakrishnan 0ace0b2f0d : Use GNUInstallDirs
Use GNUInstallDirs variables in post install scripts
License file installed in CMAKE_INSTALL_DOCDIR

Change-Id: I182ca292e03787a6c189e8de31d32244b65b5687


[ROCm/ROCR-Runtime commit: 707200e26e]
2022-06-01 10:32:19 -07:00
Graham Sider d2f8cf951d kfdtest: Add case for gfx11 in FamilyIdFromNode
GFX11 set to FAMILY_NV.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I545241c39bbe739e39a8943b242b9fc49a65a7e1


[ROCm/ROCR-Runtime commit: c198b91c94]
2022-05-19 12:32:02 -04:00
Graham Sider d87c54107a 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


[ROCm/ROCR-Runtime commit: cee64d4825]
2022-05-18 10:41:22 -04:00
Kent Russell 82d71c56a2 CMakeLists.txt: Remove unneeded dependencies
These were required back due to dependency issues in earlier ROCm
releases. With thunk being static now and with better dependency
definitions being used, we can remove these

Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I266a783993edf32811caf027f4289ede0cbfcb16


[ROCm/ROCR-Runtime commit: 65aec53bca]
2022-05-13 09:21:48 -04:00
Graham Sider 27fed6c0d4 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


[ROCm/ROCR-Runtime commit: d5f074902c]
2022-05-11 13:39:49 -04:00
Graham Sider 9c93b6eaa2 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


[ROCm/ROCR-Runtime commit: 30bba89830]
2022-05-08 15:19:46 -04:00
Ranjith Ramakrishnan f7f243d513 File Reorganization with backward compatibility
Header installed in /opt/rocm/include/hsakmt
Wrapper header files for backward compatibility

Change-Id: I5f6ccac996a43a7c20e0f75e48b1c55b610f0a16


[ROCm/ROCR-Runtime commit: 5f2c75b7d6]
2022-05-06 19:11:42 -04:00
Graham Sider 918b166c29 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


[ROCm/ROCR-Runtime commit: 0955f350e3]
2022-05-05 11:23:33 -04:00
Graham Sider 2d9347fb00 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


[ROCm/ROCR-Runtime commit: fe2098e011]
2022-05-05 10:09:14 -04:00
Graham Sider a411b8e84e 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


[ROCm/ROCR-Runtime commit: ffa6c95858]
2022-05-04 16:13:20 -04:00
Philip Yang ebea654308 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>


[ROCm/ROCR-Runtime commit: c05c66e756]
2022-05-02 16:42:03 -04:00
David Francis be5d26df01 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


[ROCm/ROCR-Runtime commit: 4b041a8ad9]
2022-05-02 09:13:20 -04:00
Alex Sierra 05952910b1 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


[ROCm/ROCR-Runtime commit: b9e8bc1f52]
2022-04-27 15:38:11 -05:00
Harish Kasiviswanathan cc64271f9f Merge branch 'sp3-llvm-transistion' into amd-staging
Transistion KFDTest to use open source LLVM compiler instead of SP3
compiler

Change-Id: I26fff6a958bc48cb1f5509a11ec194d2ececf0ce


[ROCm/ROCR-Runtime commit: b9651d3118]
2022-04-26 13:15:59 -04:00
Graham Sider 0ac0c9527d 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


[ROCm/ROCR-Runtime commit: 7eeba830f8]
2022-04-26 13:14:33 -04:00
Graham Sider bbdd8cdddc 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


[ROCm/ROCR-Runtime commit: 025c6146d9]
2022-04-26 13:14:33 -04:00
Graham Sider 36ee679ca3 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


[ROCm/ROCR-Runtime commit: e6e498abf3]
2022-04-26 13:14:33 -04:00
Graham Sider d31d1ca19a kfdtest: Remove IsaGen from KFDIPCTest
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I3194e6a6bdab846da9cf346f47a7d7580e2def4d


[ROCm/ROCR-Runtime commit: ffaa3d9246]
2022-04-26 13:14:33 -04:00
Graham Sider 8753861e5b 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


[ROCm/ROCR-Runtime commit: ac48163885]
2022-04-26 13:14:33 -04:00
Graham Sider 537381a123 kfdtest: Remove IsaGen from KFDExceptionTest
Replace with LLVM-based Assembler.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Ia64b8cc77382773b48de576d350bbed3c1efdb74


[ROCm/ROCR-Runtime commit: 4c7cf6e7d2]
2022-04-26 13:14:33 -04:00
Graham Sider 6b7da770dd kfdtest: Remove IsaGen from KFDHWSTest
Replace with LLVM-based Assembler.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Ibbc4103d9498321b87feadf14a523b0d44d1851c


[ROCm/ROCR-Runtime commit: 780f0b618c]
2022-04-26 13:14:33 -04:00
Graham Sider 904f0ade4f kfdtest: Remove IsaGen from RDMATest
Replace with LLVM-based Assembler.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I5dff1b9402e294af33cec78a24e2e2decfb5b6d3


[ROCm/ROCR-Runtime commit: 8a6743aef4]
2022-04-26 13:14:33 -04:00
Graham Sider ac1ba05c12 kfdtest: Remove IsaGen from KFDSVMRangeTest
Replace with LLVM-based Assembler.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Id05f8a18a188d0ad354b711c1c196b71dffcc756


[ROCm/ROCR-Runtime commit: 469d5e67d2]
2022-04-26 13:14:33 -04:00
Graham Sider 6b35fc4cf6 kfdtest: Remove IsaGen from KFDLocalMemoryTest
Replace with LLVM-based Assembler.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Ie83d27b6a93ac1b5169a830a7f274e360a31023e


[ROCm/ROCR-Runtime commit: 549f7cdce2]
2022-04-26 13:14:33 -04:00
Graham Sider be229daa44 kfdtest: Remove KFDSVMEvictTest ReadMemory shader
Use ReadMemoryIsa transferred and updated from KFDEvictTest.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I566f9ec36398bc4d08ab90231688600356df4d6a


[ROCm/ROCR-Runtime commit: 097b11abad]
2022-04-26 13:14:33 -04:00
Graham Sider d06327982d 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


[ROCm/ROCR-Runtime commit: 5ceb35f428]
2022-04-26 13:14:33 -04:00
Graham Sider e0e0485579 kfdtest: Move KFDGWSTest shaders to ShaderStore
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I9608b8bea32d64d4d0e1a329191f9a62e3a771e7


[ROCm/ROCR-Runtime commit: b2b54dffe6]
2022-04-26 13:14:33 -04:00
Graham Sider 519277fd53 kfdtest: Move KFDEvictTest shaders to ShaderStore
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I4d7d349284ea213becdb4680b804dbd202196e1d


[ROCm/ROCR-Runtime commit: 91cf11967e]
2022-04-26 13:14:33 -04:00
Graham Sider a4b42c2213 kfdtest: Move KFDCWSRTest shaders to ShaderStore
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I7c89fca94e92145a4115d1089348380807a868ee


[ROCm/ROCR-Runtime commit: ad5f98814f]
2022-04-26 13:14:33 -04:00
Graham Sider ea451d26fd kfdtest: Move KFDQMTest shaders to ShaderStore
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Id50aea16528c4bed4530f95644a02f59efddae3e


[ROCm/ROCR-Runtime commit: aced779f1b]
2022-04-26 13:14:33 -04:00
Graham Sider e628983aed kfdtest: Move KFDMemoryTest shaders to ShaderStore
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I3335ca1f9dbe849233cf85253e0e92b56a20b8c9


[ROCm/ROCR-Runtime commit: c926d83b5a]
2022-04-26 13:14:33 -04:00
Graham Sider e67ec56091 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


[ROCm/ROCR-Runtime commit: 34ca37d9e8]
2022-04-26 13:14:33 -04:00
Graham Sider b5eb13f150 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


[ROCm/ROCR-Runtime commit: a7b85fdb08]
2022-04-26 13:14:33 -04:00
Graham Sider e917805a33 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


[ROCm/ROCR-Runtime commit: ba9ccd32a1]
2022-04-26 13:14:33 -04:00