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

29 Коммитов

Автор SHA1 Сообщение Дата
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
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
Harish Kasiviswanathan 44adc3dafd kfdtest: Add Uncached flag to HsaMemoryBuffer constructor
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: I14b0a73ffb04f4798547fe7003de1440736b413d
2021-02-23 12:20:29 -05:00
Eric Huang 198b5bd450 kfdtest: add function to determine XGMI link to cpu
Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Change-Id: I7650f7857f0eecd2ad587634ae11c1cf5116bd97
2021-02-23 12:20:29 -05:00
Yong Zhao be09658247 Program mmCOMPUTE_PGM_RSRC3 on gfx90a
Change-Id: If387d137ebd388f5aea930a5f7bca3413dcbfcce
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2021-02-23 12:19:42 -05:00
Gang Ba 8e94dde685 kfdtest: check peer accessible with new function
check GPU peer accessible with p2p_links in system

Signed-off-by: Gang Ba <gaba@amd.com>
Change-Id: I026f16564303b687811d6648f0b7f84be6819979
2020-11-26 10:34:06 -05:00
Yong Zhao 21cda69ba9 kfdtest: Adapt the CWSR test for emulators
The original test takes forever to run on emulators because emulators
are much slower than Asic. So intelligently detect the emulator scenarios
and reduce the run time by slashing the iteration times.

Change-Id: I087f43c04c2b23b5ab2ecaad07533b767c337e94
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2020-02-13 11:35:37 -05:00
Huang Rui 06464b917d libhsakmt: add NumCpQueues and NumSdmaQueuesPerEngine data field (v3)
NumCpQueues and NumSdmaQueuesPerEngine should be got by kfd driver not hardcode.
So add two data fields in HsaNodeProperties then thunk is able to get it from sysfs
that exposed by kfd.

v2: change NumCpQueues/NumSdmaQueuesPerEngine to one byte.
v3: merge two commits as one to avoid ABI update two times.

Change-Id: Ie386e4685f13493e22db6e207a399db6a4c5b9dc
Signed-off-by: Huang Rui <ray.huang@amd.com>
2020-01-03 23:27:42 -05:00
Yong Zhao a4d570fa2b kfdtest: Expand KFDQMTest.MultipleCpQueues to cover all CP queues
Because of that, rename the test to AllCpQueues.

Change-Id: I57105f863db2558e850c703d151ffebcce2c7a17
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-11-15 08:25:14 -05:00
Yong Zhao 174484aac3 kfdtest: Use GetSystemTickCountInMicroSec() as much as possible
GetSystemTickCountInMicroSec() wraps the function gettimeofday().

Change-Id: I7b767a6efdd1db491fc8113313945b578ac69382
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-11-07 18:21:04 -05:00
Philip Yang 2fa7d23a82 kfdtest: use flag NoNUMABind for more test cases
If NUMA system no available memory on node 0, mbind will fail on node
0, so set flag NoNUMABind=1 to bypass mbind for all test cases which use
node 0 and allocate system memory.

Change-Id: I7962938ad2bed5a293ca5e6a8500c7f7e15ff453
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2019-11-06 18:33:46 -05:00
Yong Zhao da9a404ac3 kfdtest: Add a function to wait indefinitely until user input
This will facilitate the need of halting the execution during debugging.

Change-Id: I058c81bbc9f655bbc477b2b542d6b43aa423324c
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-10-23 11:07:43 -04:00
Eric Huang 0174377351 kfdtest: add xgmi path for p2p tests
When large bar is not available, we can use
xgmi to do p2p tests.

Change-Id: Ib7b59fb8a4d41f605739a0428973f6b2f1a3450f
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
2019-10-17 10:21:10 -04:00
Oak Zeng 51388973a1 Add gfx908 to asic family
Change-Id: I838aa4be45ddfb34c5d36c519e28b4218fc32ba4
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-10-04 10:45:02 -04:00
Oak Zeng 63eb3948be More parameter check in HsaMemoryBuffer constructor
if parameter "zero" is set, check buffer host access.

Change-Id: I9893062726fc240777405167a638cbea18fdf559
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-10-01 14:44:29 -04:00
Felix Kuehling 01957d4da3 kfdtest: Use CoarseGrain for VRAM buffers
Change-Id: I320099e61fc8f1012184fc68c248da4e224bc3ca
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2019-09-04 14:45:01 -04:00
shaoyunl 33bd5c520b KFDTest: Test 8 SDMA queues per engine for gfx1010
Change-Id: I709112ab10b1f5684e6411f44682bdef14745b50
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
2019-07-25 10:54:44 -04:00
shaoyunl 395750264d KFDTest : Add family ID when building SDMA packet
Some SDMA packet format might be different among asic versions

Change-Id: Ic7eda7554c23e3972e168480874ca67a92677346
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
2019-07-22 16:36:49 -04:00
shaoyunl 6cad92de6f Added family ID for gfx1010
Change-Id: I1b9a2b5270e70d12f066906f4e6cfea2cbfc2110
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
2019-07-09 11:38:57 -04:00
Yong Zhao b507911ccd kfdtest: Use SDMA engine information directly from the node
Change-Id: Icd391c8e821fb0ff5a1094f21b880a97e6d417a3
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-06-28 00:47:15 -04:00
Yong Zhao 6857602cbc kfdtest: Include SDMA queue info in class KFDBaseComponentTest
This will facilitate us to avoid using family ID to differentiate the
SDMA engines and SDMA queues.

Change-Id: I8d6203cc5d330e9130a1b2624997c86ba53e8ae4
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-01-31 14:00:57 -05:00
Philip Yang b2e026fce3 kfdtest: increase KFDPerformanceTest.P2PBandWidthTest timeout value
KFDPerformanceTest.P2PBandWidthTest[push, push] takes about 3 seconds
on 4 gfx906, the default g_TestTimeout 2 seconds is not enough to wait
for sDMA queue rptr is consumed. Use kfdtest command line option
--timeout=6000, the test is finished and result is reasonable twice as
P2PBandWidthTest[push, none]. Change P2PBandWidthTest wait timeout to 6
seconds.

Add timeout argument to function WaitOnValue, BaseQueue.Wait4PacketConsumption
SDMAQueue.Wait4PacketConsumption, PM4Queue.Wait4PacketConsumption with
default value is g_TestTimeOut.

Change-Id: I0aa04d644339feaeea695e41647ae66568beab9e
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2019-01-04 12:53:55 -05:00
shaoyunl d8009b4fd3 KFDTest: fix failure when run KFDTest on multi-GPU small bar system
On small bar multi-gpu system, hsaKmtMemoryMapToGPU will fail due to latest
kernel P2P sanity check. Swith to use hsaKmtMemoryMapToGPUNodes to fix
the failure

Change-Id: Id8b6329d1243df0e908cc9a171b5c7f9156f4a8b
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
2018-11-19 16:09:31 -05:00
xinhui pan 3e527bc7e8 kfdtest: add PM4EventInterrupt test
Similar with SdmaEventInterrupt, verify event interrupt on pm4 queue.

Change-Id: I0e43f26fd0d965126985820704215d2ef5e52c1a
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2018-08-24 13:21:01 +08:00
Kent Russell fe33461622 kfdtest: Consolidate logic for ASSERT vs EXPECT
ASSERT failures result in immediate termination of the test. EXPECT
returns a failure but continues execution. Reserve ASSERT for required
functionality (node initialization, queue creation, etc) where the rest
of the test cannot run if that call fails. Use EXPECT everywhere else

Change-Id: I1c11326fc3ae22b50fa83b07b3b49af1e1f4e69e
2018-08-23 06:20:18 -04:00
Kent Russell 414042abf7 kfdtest: Clean up comments
Consolidate style (use /* */ for multi-line), fix typos,
use dword instad of DWORD/DWord

Change-Id: I620e45c1687550db41127e45641b7d79d28223a1
2018-08-23 06:20:17 -04:00
Kent Russell dffac0a97e kfdtest: Style cleanup
Clean up the KFDTest style via CPPLint. Some warnings remain regarding
volatile variables being cast to void*. This is the command used:
cpplint.py --linelength=120
--filter=-readability/multiline_string,-readability/todo,-build/include,-runtime/references

multiline_string is due to using ISA code
todo is to avoid errors that we don't have TODO(username) instead of TODO
include is about including the folder in the header includes
references is regarding non-const references '&' being const or using
pointers. That can be addressed later

Change-Id: I3c6622da0a13dd33ab29b2bfff48be25e763b750
2018-08-14 08:17:57 -04:00
Yong Zhao f3e7870784 kfdtest: Evaluate whether a node is APU based on spec
This will facilitate the user cases that some APU asics is used as dGPU.

Change-Id: Ib3a79ae31a03e7a618c7785166f56282a7617127
Signed-off-by: Yong Zhao <yong.zhao@amd.com>
2018-08-02 11:36:40 -04:00
Yong Zhao 6df62c78b8 kfdtest: Add kfdtest source code
The code is a snapshot up to this commit around July 31 2018.

commit b00fadff36a3
Author: xinhui pan <xinhui.pan@amd.com>
Date:   Mon Jul 30 09:53:03 2018 +0800

    kfdtest: skip MMapLarge test on apu

    

Change-Id: I40e9a5a18e5c8f075e5290bb80532f1a3f689058
Signed-off-by: Yong Zhao <yong.zhao@amd.com>
2018-07-31 00:00:34 -04:00