Γράφημα Υποβολών

2959 Υποβολές

Συγγραφέας SHA1 Μήνυμα Ημερομηνία
Felix Kuehling d8d8e3ddd6 libhsakmt: Add a new device ID for gfx90a
It is gfx90a VF device ID, for virtualization support.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: I9e51d6b58c702d185e6758a9c511e9b8bc72c2f5
2021-04-30 13:42:27 -04:00
Alex Sierra 0a2d7d8319 kfdtest: SetGetAttributes default access attr returned based on xnack
After unregistered memory is added, now default access attribute
is returned based on xnack configuration.

Change-Id: I8ef44fe1e165ba009622e8112436c1f7a683f6cb
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
2021-04-27 14:18:15 -04:00
Harish Kasiviswanathan 9b95185a61 libhsakmt: Add DIDs for gfx1032
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: I61e938db3763bc2cdb4e0ea74f9aaae810b5d27b
2021-04-27 09:43:32 -04:00
Eric Huang a6703395f6 kfdtest: remove scc bit for cache coherence tests
It is to address gfx90a HW memory model changes.

Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Change-Id: Ie5c5c5ee5ddfb75c0b4f625baf59ce37b4cc7c31
2021-04-26 19:55:49 -04:00
Philip Yang 7d53e94750 kfdtest: skip KFDSVMEvictTest.QueueTest on gfx10
KFDSVMEvictTest.QueueTest shader asm code need update to support gfx10
and gfx9, skip the test to unblock CI test.

Change-Id: Id2842127cf5fc98a652afa82035a4b3603bf5c33
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2021-04-26 10:34:03 -04:00
Sean Keely 0b7d9db964 Correct scratch in use computation.
Old logic did not consider memory held in the scratch cache to be
free when deciding whether or not to reclaim.

Change-Id: I7f7c7549c72d743edbf7c53489fe9a453dc4177a
2021-04-22 20:07:25 -04:00
Sean Keely ee8b1b64ad Report HMM driver support status.
Implements HSA_AMD_SYSTEM_INFO_SVM_SUPPORTED.

Change-Id: If5182edcc1fa067fa514aa2c1bd326c4c42d1b64
2021-04-21 21:44:42 -05:00
Sean Keely 77046a1aaa Revert "Revert SVM and XNACK support."
This reverts commit 5bd153974d.

Conflicts:
	opensrc/hsa-runtime/core/util/flag.h

Change-Id: I16daf41588e6139126d66af54b0693de2e7e39f3
2021-04-21 14:49:43 -05:00
Harish Kasiviswanathan e06d549337 kfdtest: Remove GFX9 assembler meta information
Fixes assembler error. The SP3 backend if already set to FamilyId

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: If127a71693b293e2748b06efb668a359b939cd14
2021-04-21 14:27:16 -04:00
Sean Keely 3127d1ffdc Ensure ROCr created threads have no CPU affinity.
Change-Id: I53828dbaf055b65b61bdd11f0eadfcc806596821
2021-04-19 19:47:06 -05:00
Joseph Greathouse c1c46d9c97 Update GWS tests for gfx1030
gfx10 GPUs such as gfx1030 need new assembly code to test
the GWS. Removed scalar stores and added proper usage of DLC and
VSCNT waits. Removed gfx9-specific assembler meta-values.

Change-Id: I2bbdb77692ace2dba10997f721ba9decaa9be82a
2021-04-19 10:21:21 -04:00
Mike Li 77f1bfa277 Add cache information for GPU
Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
Change-Id: I93606e676ae944fa3d72886654566c75ab8f9806
2021-04-19 09:55:30 -04:00
Konstantin Zhuravlyov 1bdc2f6854 Update documentation of hsa_ven_amd_loader_iterate_executables
Clarify behavior of hsa_ven_amd_loader_iterate_executables during
concurrent calls of executable creation and destruction.

Change-Id: Idc3e3981d4fcc0d58d9f1b7a7578deed20aa490b
2021-04-16 20:51:48 -04:00
Konstantin Zhuravlyov 15e54d684d Expose iterator for executables
Change-Id: I0c5d39fc33c15a6eb8ee10ff181c2dcf2e042675
2021-04-16 20:51:48 -04:00
Konstantin Zhuravlyov e826c365ea Remove loaders.c/hpp
Change-Id: Ida507c2dd2de9172f250172f9c45a639953cb412
2021-04-16 20:51:48 -04:00
Mengbing Wang cf10c3bc35 Add allocation size limit of 1/2 vram size in rocrtstPerf.Memory_Async_Copy test.
Add the hard limit of allocation size to be 1/2 available vram
to avoid allocation failure when allocation size equals to vram size.

Add printing block size in each round to report progress for long running
test

Add the block size skip info in result form(if any tests skipped).

Affected test:
rocrtstPerf.Memory_Async_Copy

Data Size             Avg Time(us)         Avg BW(GB/s)          MinTime(us)          Peak BW(GB/s)
  128M             638759.570200              0.195692		637569.991000               0.196057
  256M            1270058.822400              0.196841		1268425.758000               0.197095
Notice: Data Size larger than 512M is skipped due to hard limit of 1/2 vram size

Signed-off-by: Mengbing Wang <mengbing.wang@amd.com>
Change-Id: I4c4cea74a608272cc29d222b9399af26b34d7473
2021-04-16 02:23:48 -04:00
Felix Kuehling e8990cf830 kfdtest: add SVM tests
KFD changes are ready, all SVM tests should pass now. Skip SVM tests if
the SVM API is not supported.

Change-Id: I5e358565a0458eea45eae0aaf4969ce3a36574a7
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Alex Sierra <Alex.Sierra@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2021-04-16 00:12:48 -04:00
Philip Yang e8f369b385 libhsakmt: dynamic HMM and xnack detection
New properties SVMAPISupported added in Thunk spec HSA_CAPABILITY, read
from sysfs from KFD topology.

New local memory property flag CoherentHostAccess added to Thunk
HSA_MEMORYPROPERTY, read from sysfs from KFD topology.

Change-Id: I83933f0e5a61508508168873209dba4af0b77295
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2021-04-16 00:10:56 -04:00
Felix Kuehling bb441d0bdd libhsakmt: add XNACK API set/get mode
XNACK API for GPUs that support this mode. This API
makes calls to amdgpu driver to configure xnack mode.
It supports set xnack mode and query the current mode used.

Change-Id: If865fd0e3f900f008243dc49504e1a0694e1791a
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
2021-04-16 00:10:41 -04:00
Felix Kuehling dd72f236c1 libhsakmt: add SVM thunk implementation
Implement SVM (Shared Virtual Memory) in the thunk.

Change-Id: I0380150d1d3da48070f9389a06f416d6059d6948
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Sean Keely <Sean.Keely@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
2021-04-16 00:10:25 -04:00
Felix Kuehling c44a4be776 libhsakmt: add API to support svm and xnack
Add function definitions to support SVM (shared virtual memory)
and xnack set.

Change-Id: Ia97ad9d0c449d8d500d799f702e1a58e87d65a56
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2021-04-16 00:09:49 -04:00
Felix Kuehling ce26348f3a libhsakmt: add kfd_ioctl.h svm and xnack support
Add svm (shared virtual memory) range and xnack mode
APIs.

Change-Id: Ibd8d7fe566dc200730da0c892caa71aad7589ebd
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
2021-04-16 00:09:17 -04:00
Felix Kuehling 43ce63b68b libhsakmt: Query KFD version once after opening /dev/kfd
Query the KFD interface version once and store it in a global variable.
This makes it more efficient for KFD APIs to query the API version
later.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: I267f3465f754e78fb21a7c42c5877cd68eaa9d05
2021-04-16 00:08:54 -04:00
Mike Li d077606e22 Get GPU cache information from KFD
Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
Change-Id: I8dc8c97ae81c3747b7cd88cf2cdb7a9e4694a88d
2021-04-13 10:29:34 -04:00
Tony Tye a97c14abea Add support for gfx909 and gfx90c
Change-Id: I88158789cdda44a173e3ca26d2c96b8e0ea0e221
2021-04-08 22:37:30 +00:00
Kent Russell d748d6dce7 CMakelists: Build thunk as static by default
This can be overwritten by changing BUILD_SHARED_LIBS=true, but we
default it to static to allow for merging into ROCr

Change-Id: Ic286ef7903a5bc788fe3b84bb13b15bdd3a6f60b
2021-04-08 14:38:20 -04:00
Kent Russell 66da1c9cd2 kfdtest.exclude: Add some more SP3-shader tests to GFX10 exclude
These are failing as well, due to the SP3 shader merge. Blacklist them
as well to avoid more segfaults

Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I07e142a1aad9b2a5304230f333eeaf4392bea4b7
2021-04-05 13:50:15 -04:00
Roberto Di Remigio b6d613d284 Treat link flags as a string, rather than a list
Fixes linking failure with gold

Change-Id: Ie9d2a7f68e71a0a793b041d57b8078ead22a93c8
Signed-off-by: Roberto Di Remigio <roberto.diremigio@gmail.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2021-04-05 13:18:33 -04:00
Sean Keely 243e29ba8e Remove emulator SRAMECC override controls.
Change-Id: Iea9e7870dbf517032f34cebec673c90226b96960
2021-04-02 02:11:05 -04:00
Sean Keely 5bd153974d Revert SVM and XNACK support.
KFD is not ready yet.

Change-Id: I61deb292ddb92185d33504c2115169888d56e211
2021-04-02 02:10:59 -04:00
Ramesh Errabolu 25f3dc305f Override Cpu-Gpu link-weight for Alebaran until a proper fix is available
Change-Id: I1fbc38b788f71cc9c9fc62295223286004689bf9
2021-04-02 02:10:54 -04:00
Sean Keely 7333c77e22 Squash merge of cfreehil/amd-temp-gfx90a onto amd-staging.
Includes some workarounds and HMM.
Conflicts:
	opensrc/hsa-runtime/core/runtime/amd_topology.cpp
	opensrc/hsa-runtime/core/util/flag.h

Change-Id: I22976f07964a43dbb228a6231777dbd599112b8d
2021-04-02 02:10:15 -04:00
Sean Keely 4197461b7f Correct hsa_agent_iterate_isas return code for CPUs.
When no isa's are available no callbacks should be invoked.  This
is not an error and should return success.

Change-Id: Ie4048aa8cbe5c3fdf5431f6a865021549ecf8a13
2021-04-01 00:08:22 -04:00
Sean Keely 45fbe5b192 Block ROCm 4.1+ running against 4.0 and prior kfd.
Sramecc is misreported in kfd 4.0 and prior.  To prevent possible
corruption due to d16 instructions, deny use of gfx906 with older
kfds and correct misreport for gfx908.  Denial of gfx906 may be
overridden by setting HSA_IGNORE_SRAMECC_MISREPORT=1.

Change-Id: I7d5c3a716fad01c348f8b88cd508cedbf914c989
2021-04-01 00:03:32 -04:00
Cole Nelson a9ce8683eb CMakeLists.txt: add ENABLE_LDCONFIG to support multi-version install
Depends-On: I58fdf1d0b4e864b5a61ffe8e335d430d424811ab
Change-Id: I8e3e873fde99eaec79651ce6c3581870e9c2112d
Signed-off-by: Cole Nelson <cole.nelson@amd.com>
2021-03-27 15:27:55 -07:00
Cole Nelson 72fa4a17fa hsa-runtime: add ENABLE_LDCONFIG to support multi-version install
Depends-On: I58fdf1d0b4e864b5a61ffe8e335d430d424811ab
Change-Id: I0cb6f8711ea5033e84b7e45ce20e7e23d84005c3
Signed-off-by: Cole Nelson <cole.nelson@amd.com>
2021-03-26 18:37:04 -04:00
Mengbing Wang d5855c1658 limit the memory allocation on vram to 3/4 of vram size.
1. As we cannot ganrantee that 100% apu vram are free to be allocated, limit
the allocation size be no more than 3/4 of vram size.
2. Keep the old 1GB allocation limit for dGPU case.
3. Add the alignment check for alloc_size.

Affected tests:

rocrtstStress.Memory_Concurrent_Allocate_Test
rocrtstStress.Memory_Concurrent_Free_Test

Change-Id: Id0023de132024d02f80980ae4237d9d74d9e27d3
Signed-off-by: Mengbing Wang <mengbing.wang@amd.com>
2021-03-23 18:59:42 +08:00
Chris Freehill 82b2dbe495 Don't overwrite default CMAKE_CXX_FLAGS in tests & samples
Change-Id: I4a2bb0bcc320fb0645e9fc5447775e6a878b960b
2021-03-17 21:25:18 -05:00
Felix Kuehling d287c60246 libhsakmt: New SRAM EDC support bit
The old bit was deprecated, because old buggy user mode depends on it
being always 0. The correct value is now reported in a new bit. New user
mode handles the reported EDC setting correctly, so we can report the
correct value in a new bit.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: Ib5d5ed2519810e650458c6b69c97670dab435ddb
2021-03-11 13:37:45 -05:00
Felix Kuehling 41cd7aea2f Revert "libhsakmt: add kfd_ioctl.h svm and xnack support"
This reverts commit 5ae49f2321.
SVM is not ready yet. This was merged by accident.

Change-Id: I8901594a72e785ba5d25a6448718a570e76fe117
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2021-03-10 22:33:49 -05:00
Felix Kuehling 5edd00136d Revert "libhsakmt: add API to support svm and xnack"
This reverts commit a352639df5.
SVM is not ready yet. This was merged by accident.

Change-Id: I1bee102823e7e612be8e8f2e0f50580e8692cc80
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2021-03-10 22:33:49 -05:00
Felix Kuehling 4ebda913cd Revert "libhsakmt: add SVM thunk implementation"
This reverts commit 75e8fe383f.
SVM is not ready yet. This was merged by accident.

Change-Id: I372f7d293fd38429ec570bc0e0add7e612871594
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2021-03-10 22:33:34 -05:00
Felix Kuehling a8f4c43fef Revert "libhsakmt: add XNACK API set/get mode"
This reverts commit 3f45f602d4.
SVM is not ready yet. This was merged by accident.

Change-Id: I7c0d835a0d3a448f2ac1094f818601e5d6363045
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2021-03-10 20:34:43 -05:00
Harish Kasiviswanathan 0f16e6f35f kfdtest: Fix gfx1032 blacklist
BLACKLIST_ALL_ASICS has to the first in the list otherwise "-" negative
flag won't be inserted

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: I9ee150d7f793809641b16012929c4e157595d37f
2021-03-08 21:12:55 -05:00
Harish Kasiviswanathan 95d58346c5 kfdtest: Temporarily disable shader tests on gfx10
Temporarily disable shader related tests until SP3 compiler is fixed

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: I0468d82f845d1d69841ad8fdbd037761b8d4d9af
2021-03-05 19:52:53 -05:00
Laurent Morichetti ea6ee0aa81 New trap handler ABI (v5)
Park the wave, if it is stopped, to avoid halting it at an s_endpgm
instruction if the architecture does not support it.

Free ttmp6 by converting the dispatch_ptr into a queue packet index
(25-bit) and storing it in ttmp7[24:0].

Save the exception PC in ttmp11[22:7] ttmp6[31:0].

Change-Id: Iaa3c5baf5b488c0b534044d338f12bffa63ddce2
2021-03-04 21:44:14 -05:00
Laurent Morichetti 7e0f391a08 Correct the trap handler
ttmp11 no longer has an "excp_raised" field.

Change-Id: I8e673ca404c2b802470bbc9f76e7925782076c5a
2021-03-04 21:21:26 -05:00
Sean Keely 191664cd20 Insert scratch memory into scratch cache on full profile systems.
Scratch cache was not updated for IOMMUv2 systems previously.
This both negates the cache and causes segfault during scratch
release.

Change-Id: I71e81d6b642d65ca135868ff7225ea173529d458
2021-03-03 21:30:16 -05:00
Yifan Zhang 27ae854cda rorctst: check gpu_pool value after hsa_amd_agent_iterate_memory_pools.
hsa_amd_agent_iterate_memory_pools return HSA_STATUS_SUCCESS even if
no memory pool is found. Add a memory pool check.

jenkins@jenkins-System-Product-Name:~/rocrtst_tests/gfx902$ ./rocrtst64 --gtest_filter=rocrtstFunc.MemoryAccessTests
Note: Google Test filter = rocrtstFunc.MemoryAccessTests
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from rocrtstFunc
[ RUN      ] rocrtstFunc.MemoryAccessTests

	#### TEST NAME ####
RocR Memory Access Tests

	#### TEST DESCRIPTION ####
This series of tests check memory allocationon GPU and CPU, i.e. GPU access
to system memory and CPU access to GPU memory.

	#### TEST SETUP ####
The gpu device name is gfx902
Target HW Profile is HSA_PROFILE_FULL
Test can run on any profile. OK.

	#### TEST EXECUTION ####
  *** Memory Subtest: CPUAccessToGPUMemoryTest in Memory Pools ***
Segmentation fault (core dumped)

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: Ic335c4c98990b43f5d4842ab6d74855859a9048a
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
2021-03-03 20:16:26 -05:00
Kent Russell 83d80074f7 Merge gfx90a into amd-staging
Conflicts:
	CMakeLists.txt
	include/hsakmt.h
	src/libhsakmt.h
	src/libhsakmt.ver
	src/queues.c
	src/topology.c
	tests/kfdtest/src/KFDMemoryTest.cpp
	tests/kfdtest/src/KFDTestUtil.hpp

Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: Ic2732e7c0b5e42c1a3a91223f65a65064b602181
2021-03-02 07:48:22 -05:00