Граф коммитов

2959 Коммитов

Автор SHA1 Сообщение Дата
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
Alex Sierra 0e908f05bb 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
2022-06-13 15:46:54 -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
Daniel Phillips 6da6058d4a 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
2022-06-13 09:37:32 -04:00
David Yat Sin 4ac840269c Add API for available GPU memory
Add support for AMD Agent to return amount of memory available

Change-Id: I5c32e2cebbaa2993b044250aefe434e4cc02d8c2
Signed-off-by: David Yat Sin <david.yatsin@amd.com>
2022-06-07 10:33:18 -04:00
Ranjith Ramakrishnan 707200e26e : Use GNUInstallDirs
Use GNUInstallDirs variables in post install scripts
License file installed in CMAKE_INSTALL_DOCDIR

Change-Id: I182ca292e03787a6c189e8de31d32244b65b5687
2022-06-01 10:32:19 -07: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
Sean Keely dd671b49e5 Lookup copy agent when blit is selected.
Disallow passing agent 0 to avoid any API change.

Change-Id: I704fb2e04cec50500fac41a405c8a7e83a3c9fb5
2022-05-14 18:08:57 -05:00
Sean Keely 3ebe99f96d Add experimental option to force discovery of all copy agents.
Discards all user provided async copy agent info and relies on
pointer info discovery.

Change-Id: Ife3e708a49ffccbede4983ab47d5ed0032970857
2022-05-14 18:08:57 -05:00
Sean Keely 13a0cdfa77 Use block pointer info in async copy.
Only block info can return an agent which is disabled in the
process.

Change-Id: I34cb1f9eea9217e10a484726c90d930e3414e769
2022-05-14 18:08:57 -05:00
Sean Keely 247606c455 Report owning agent with pointer info block information.
Physical owning agent may not be visible to the current process
due to RVD.

Change-Id: Ib463336a5ed73a479f3aa74eb140932b9e0435fb
2022-05-14 18:08:57 -05:00
Sean Keely c289a43e88 Allow zero agent handle in AsyncCopy APIs.
IPC use cases with RVD set can't convey proper agent handles.
Runtime discovery is required to properly route the copy in this
case.

Change-Id: I4c97e132fb4b6ac1040de1cb17fe5a3e36d6be48
2022-05-14 18:08:49 -05:00
Kent Russell 65aec53bca 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
2022-05-13 09:21:48 -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
Sean Keely ace0599c69 Report pointer info queries to released fragments as type UNKNOWN.
We should not leak suballocation info to users.

Change-Id: I13b2a22bf5517b523ba04ddc039b49da8378b55f
2022-05-09 13:46:16 -05:00
Sean Keely 0ba9b162db Ensure IPC imports always create an allocation map entry.
Simplifies behavior.  A memory type now either always generates an
entry or never does.

Change-Id: Ie98cddea01e801308ac0ba650795fdef92b7e47d
2022-05-09 13:46:16 -05:00
Sean Keely 752cfd5ffd Adjust include paths for new header locations.
Thunk and rocm_smi_lib paths have been updated.

Change-Id: If2948172f8064dd992cbccbc2a80f9161ad4d457
2022-05-09 14:44:32 -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
Ranjith Ramakrishnan bb4da8545a File Reorganization changes with backward compatibility
Wrapper header files and library soft links for backward compatibility
Install interface updated with /opt/rocm/include

Change-Id: If772b24320f9d1de90f9be0930b1f2aa1d073777
2022-05-06 19:12:14 -04:00
Ranjith Ramakrishnan 5f2c75b7d6 File Reorganization with backward compatibility
Header installed in /opt/rocm/include/hsakmt
Wrapper header files for backward compatibility

Change-Id: I5f6ccac996a43a7c20e0f75e48b1c55b610f0a16
2022-05-06 19:11:42 -04:00
Sean Keely 7f370dd84c Drop build dependency on DeviceLibs.
DeviceLibs is still needed but is found and included by clang now.

Change-Id: I03ff7dc91c028d2ee6747aa1779d223a9ba13915
2022-05-06 01:01:05 -04:00
Sean Keely 0ee82742a7 Switch to CLOCK_BOOTTIME for HSA system clock.
This is consistent with KFD and has significantly better latency.
KFD is taking this as the definition of the SystemClockCounter.

Change-Id: I4c1b3bc58c738206265c55ebefd41356c013bfe5
2022-05-05 15:27:29 -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
David Yat Sin cd0788938c Remove unused variable
Change-Id: Ie29eb1cabef38c259280237c32d83aaa126e3b7a
2022-05-04 13:32:06 -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
Yifan Zhang 54c8b7900d add gfx1036 support
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: Ifc1b3cf2e46cf753f57470ebc6b034c1a349d3d2
2022-04-29 17:52:22 -04:00
Shweta Khatri 1b0440e7b3 Assemble trap handler at build time.
Eliminates the need for manually assembling the source of the
second level trap handler to produce the shader binary.  Also
separated blit shaders' binary source and version one second
level trap handler binary sources into different header files.

Change-Id: If29a18ee06dc083ec880ea962f234c6b5cac806a
2022-04-28 20:14:14 -04:00
Jonathan Kim 658b053943 Bypass HDP flush during SDMA copies on A+A GPU-CPU xGMI connections
Host to device SDMA copies do not require an HDP cache flush when
connected by xGMI since data copies over the data fabric and not HDP.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Sean Keely <sean.keely@amd.com>
Change-Id: I78d73a47edcc1a9c0ba59f33cf91485f13f1c45b
2022-04-27 21:45:26 -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
Sean Keely 64dae113b1 Minor typo fixes.
Declare the type of HSA_AMD_AGENT_INFO_COOPERATIVE_COMPUTE_UNIT_COUNT
and add a missing break statement.

Change-Id: I86ce8a2e620438e046b60cee991ce1fbe07a3e88
2022-04-26 15:51:22 -04:00
Sean Keely 2eedf953f3 Handle scratch interleave per SE for gfx10+
On gfx10+ we need to issue a minimum count of active lanes or
groups before ADC moves on.  Ensure that scratch allocations
attempt to reach this limit.

Occupancy throttling due to OOM condition may still drop below this
limit.

Change-Id: I0edf2e40fbe1a95e9a262564cebd2b6a82501a0b
2022-04-26 15:32:03 -04:00
Harish Kasiviswanathan b9651d3118 Merge branch 'sp3-llvm-transistion' into amd-staging
Transistion KFDTest to use open source LLVM compiler instead of SP3
compiler

Change-Id: I26fff6a958bc48cb1f5509a11ec194d2ececf0ce
2022-04-26 13:15:59 -04: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