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

179 Коммитов

Автор SHA1 Сообщение Дата
Yong Zhao fe97612800 kfdtest: Add basic tests for XGMI SDMA queues
After XGMI SDMA queues were separated from regular SDMA queues, they
were not covered in the current tests. Add tests for them now.

Change-Id: I036e3ca5d583ab7f022a9dc6cda3ef867f4773a0
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2020-01-10 15:32:12 -05:00
Srinivasan Subramanian 5c2fc61d95 Use runpath instead of rpath for libraries
enable-new-dtags option is added

Change-Id: I1f406b3f30ddc6491aad3ef7a84dfd415917b1aa
Signed-off-by: Freddy Paul <Freddy.paul@amd.com>
2020-01-09 18:05:57 -05:00
Pruthvi Madugundu 3f8a07e460 support installtion of multiple ROCM version
Changes to resolve
1) Multiple rocm release installation support
2) Multiple rocm shared lib conflicts

Change-Id: I792feb36cdf4516d108f1ef71abe0c87522f018a
Signed-off-by: Pruthvi Madugundu <pruthvi.madugundu@amd.com>
Signed-off-by: Freddy Paul <Freddy.paul@amd.com>
2020-01-09 18:05:24 -05:00
Yong Zhao 2b70d73f68 kfdtest: Improve the stablility of SignalHandling test
On gfx1012, allocating 1/4 of the system memory on a 32G RAM machine
could fail, resulting in this test to fail. Limit the maximum buffer
to allocate to be smaller than 3G to accommodate this situation.

Change-Id: I38b0a0f7da1f0b9ca851e04d2d0a51767858c801
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2020-01-07 17:28:57 -05:00
Oak Zeng 38b429fd52 Fix GWS test function call parameter issue
Change-Id: I3f4fde9ec8268362cffecb2d95177913b583486f
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2020-01-06 08:11:49 -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
Oak Zeng af7feb93db Add KFD GWS test
Change-Id: Ie90d9119da6cee41ddab10deb427d4ae9fd9a16b
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2020-01-03 15:19:56 -05:00
Yong Zhao facb6c056d kfdtest: Rework the shader used for CWSR test
The shader supports multiple work items. It also eliminates one input buffer.

Change-Id: If0596b306065980b74fb92613e95610defc00164
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2020-01-02 16:05:01 -05:00
Yong Zhao 44db5cb011 kfdtest: Enable KFDExceptionTest on gfx906 and gfx1xxx series
KFDExceptionTest on those platform is passing.

Change-Id: I328ee4fd4ff5b339e560f2f79e754fd34459210a
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-12-18 17:48:16 -05:00
Kent Russell 8b14ea2e83 kfdtest.exclude: Remove BasicCuMaskingEven from gfx908
The initial baseline measurements are proving inconsistent, which
results in the test failing more often with different variant rates

Change-Id: I1f4e04bf7d615cf39de9605bd5141a997b22cdfc
2019-12-18 14:24:53 -05:00
Yong Zhao f7c0172385 kfdtest: Rename two exception test cases
The old names are not accurate enough and we rename them according to
their corresponding fault types.

Change-Id: Icf4d52ba0ab9d49af5d912a0feb82665b1e8d344
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-12-17 19:46:33 -05:00
Yong Zhao 1c2c5a7b9a kfdtest: Delete two useless exception tests
The InvalidPPR* tests are only useful for gfx801 right now, on which
they won't trigger exceptions. So they are not relevent in the
KFDExceptionTest category. In addition, given AccessPPRMem already tests
the PPR memory functionality, we can just delete those two tests.

Change-Id: Id5c6e23c4c0ce47a4f04e9e1f0fa9083e0a9d0e0
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-12-17 19:37:14 -05:00
Yong Zhao 10ffc63d7b kfdtest: Add AllQueues test
This puts all CP and SDMA queues in a single test, which is
currently missing.

Change-Id: I98bf58df1be65fe9daf6311c016a48569a8ab674
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-12-17 19:25:14 -05:00
Eric Huang caa744944e kfdtest: change baseline in BasicCuMaskingEven
To keep normal performance, we have to use symmetrical cu masks
based on shader engines. So change baseline from 1 cu to 1 cu
per SE.

Change-Id: I9e83a87fb670bb406f7983714fa0d8ab673609eb
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
2019-12-11 14:48:55 -05:00
Yong Zhao 8f140fc03d kfdtest: Add some logs to Atomics test
This will help us triage the unexpected hangs on the farm systems.
Meanwhile, simplify the logic.

Change-Id: Ie50b97a34cb86891720dce11f2d178bff9aa2cd5
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-12-02 12:56:03 -05:00
Jonathan Kim 8b01a1c4c5 add queue snapshot test
adds api and test to get newly create queue snapshot per ptraced process.

Change-Id: Ife97123a5b930e837ccaa386801145ef23c2cc2c
Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>
2019-12-02 11:56:04 -05:00
Yong Zhao ad76ffd544 kfdtest: Declare SetUpTestCase() to be public
SetUpTestCase() and TearDownTestCase() are declared as protected,
preventing us from using TEST_P().

Change-Id: I1d049a475a1b3bd44b5f96305a48751b90d572ce
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-12-02 11:38:18 -05:00
Oak Zeng 0b71bbb787 Support XGMI optimized SDMA queue
Change-Id: I6ad62fc94a9838df505879b1ddaccfeb9881a6e8
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-11-26 21:42:47 -05:00
Yong Zhao 4daa25fceb kfdtest: Merge the two largest buffer test helper functions
This is cleaner.

Change-Id: I7740f3e0f93a63b35fefc3cb69712dfad68df552
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-11-25 18:45:23 -05:00
Yong Zhao b6cefa7bda kfdtest: Split BigBufferStressTest into two smaller tests
The previous BigBufferStressTest has too much stuff and takes a long
time to run. By separating largest*BufferTest out into other
tests, we dramatically reduce the time to run BigBufferStressTest and
therefore make reproducing issues much easier.

Meanwhile, rename the test to BigSysBufferStressTest to express more
information.

Change-Id: I5911f113c0bd50627ee6d84bbb4f2972cbed8886
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-11-25 18:28:17 -05:00
Yong Zhao cbe21fa261 kfdtest: Remove the queue submission in BigBufferStressTest
In order to accommodate the flaky queue submission under memory
shortage scenarios, BigBufferStressTest has become very much a hack,
undermining its purpose of testing the basic memory related operations.

Therefore, remove the queue submission part. The EvictTest should serve
the purpose of testing the memory and queue submission functionalities
when memory eviction happens.

Change-Id: I3c3603a0e834267eccb72f46efeabe1e053c8fc5
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-11-25 18:25:23 -05:00
Felix Kuehling 8afdf52001 kfdtest: Change PM4 dispatch to workaround GWS-related FW problem
v2: Remove useless AcquireMem packet after the dispatch
v3: Minimum poll_interval is 4

Change-Id: I352eb21c781ed9e03d62c0febd532da6a9854afa
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2019-11-15 15:27:21 -05:00
Felix Kuehling 0b7fcadc63 kfdtest: Add PM4WaitRegMemPacket
v2: optimize_ace_offload_mode=1, recommended by firmware team

Change-Id: Ia54e37242b4eaaf631c35e61a59f03ee0f85ca35
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2019-11-15 15:27:21 -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
Huang Rui fdba74c2fb libhsakmt: add gfx90c support for thunk
This patch adds the support for gfx90c apu. So far we treat it as "dgpu" and
gfx900. Will update hsa gfxip table while the isa/llvm is implemented on gfx90c.

Change-Id: I6ef164bf3e751fe6dd6287cac212a500dce84b1a
Signed-off-by: Huang Rui <ray.huang@amd.com>
2019-11-14 20:02:53 -05:00
Philip Cox 6742e585be kfdtest: Enable kfd debugger tests on gfx10
Change-Id: If3f86624c76805a6bc0e154d31b957eb63120418
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
2019-11-13 08:29:46 -05:00
Yong Zhao 4b36a1e728 kfdtest: Rename KFDQMTest.MultipleSdmaQueues to AllSdmaQueues
The test actually tested all available SDMA queues, so change the name
to reflect the fact.

Change-Id: Ia23df3e5ac79b692b0b60194b05603ba8dd897a4
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-11-08 19:00:37 -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
Felix Kuehling 07b8c30ce8 kfdtest: Return address of packet from IndirectBuffer::AddPacket
This can be used for allocating space in the IB for write-back data
in a NOP-packet with a payload.

Change-Id: I6202b89a455a65326366a15291789004dfdcc0b9
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2019-11-01 18:31:28 -04:00
Felix Kuehling 664bb13bc4 kfdtest: Add PM4 NOP packet payload capability
Useful for allocating space for write-back data in a queue or IB.

Change-Id: I47bd2dcb8537a91410e9a91413979a8a2c1c5f21
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2019-11-01 18:30:52 -04:00
Felix Kuehling ea7619c929 kfdtest: Re-factor dynamic packet allocation into BasePacket
Avoids unnecessary and error-prone duplication of dynamic packet
allocation in many packet classes.

Change-Id: Icec981ae2cd7a3d88cdf9213298940d85627f853
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2019-11-01 18:30:52 -04:00
Felix Kuehling 12e4ea94f1 kfdtest: Fix SDMA NOP packet size
packetSize is used as the size in bytes.

Change-Id: I900f9a4f37b840cbb957184705db04a4c64d1654
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2019-11-01 18:30:52 -04:00
Oak Zeng 7593b41575 Unmap memory from GPU before free
Change-Id: Ic33b17cbaee5de7908d37527254f4f146e6b71e3
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-11-01 08:58:55 -04: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
Yong Zhao ac5c433420 kfdtest: Add a Nop packet submission test for CP and SDMA queue
The tests are useful to triage the fundamental queue submission
functionality by excluding the packet format variable from the equation.

Change-Id: I2c7fcda811f93bdefc1b62396233559416be44e7
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-10-22 13:42:33 -04:00
Yong Zhao 75c654cfea kfdtest: Add SDMANopPacket class
The class is very useful for triaging complex SDMA issues.

Change-Id: Ib5de729f7fc62f41e894ef98d3967e7e1745d454
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-10-22 13:41:44 -04:00
Yong Zhao 98b0652917 kfdtest: Add a core test filter for software scheduler mode
The new filter can be used by "./run_kfdtest.sh -p core_sws".

Change-Id: I1c43669cfc07c09ccafb9fa2e2851932ac59307d
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-10-22 11:23:33 -04:00
Yong Zhao ffbdb726ac kfdtest: Temporarily disable performance counter tests for gfx1010
We are still working on those tests for gfx1010, so disable them
temporarily.

Change-Id: I5d51b4b02bc753137014684859cc033f759b2899
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-10-22 10:39:58 -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
Philip Cox efe3769835 kfdtest: Check kfd debugger version in tests
Need to check the kfd debugger version of the kernel before
calling kfd debugger tests in kfdtest.  If they are out of sync,
the tests may fail.

Change-Id: I1df5e89fb1199304e6fbe8973c60b76062514c03
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
2019-10-10 14:32:54 -04:00
Philip Cox b48f7d6ea3 kfdtest: Disable kfd debugger tests on gfx10
The KFD debugger is only supported on gfx9 platforms, so we need to
restrict it from running on gfx10 platforms until it is supported.

Change-Id: I500f0e20fda71021f2cce70a67fc8d9d042209fe
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
2019-10-10 12:50:12 -04:00
Oak Zeng da789a2584 Fix memory map issue in KFDMemoryTest.CacheInvalidationOnRemoteWrite
The memory need to be mapped for both local and remote GPU access

Change-Id: I4aeaffc0851b6107fc91e9eaa6150764b06f5ca9
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-10-08 16:33:51 -05:00
Oak Zeng dadbbbb03c Disable KFDMemoryTest.CacheInvalidateOnRemoteWrite temporarily
This is some data fabric/vbios issue that causing system hard hang
while running this test. Will enable it after the HW/vibos fix.

Change-Id: Ic0753c2d92e9e4863c310da9a595b2af302f17f8
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-10-04 11:09:19 -04:00
Oak Zeng d7c53bb1fa Test new RW mtype for gfx908
Change-Id: Ia859c8f2e3c486f119772231a2d887f6783caf36
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-10-04 10:49:15 -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
Cole Nelson 1ac8b5538c kfdtest.exclude: blacklist KFDEvictTest.BurstyTest for gfx908 (gfx908)
Change-Id: I5e1ac25c066ee20e34e102043d27eeab73313c6f
Signed-off-by: Cole Nelson <cole.nelson@amd.com>
2019-10-02 14:06:50 -07: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
Philip Yang 69d8f2d734 kfdtest: use flag NoNUMABind to allocate system memory
Allocate system memory from node id 0 will fail on NUMA system which has
no memory on node 0. Change to use new flag NoNUMABind to allocate
system memory from NUMA nodes which have free memory.

Change-Id: I8ef9ca28fc2ab5dd31d07a2d3eaf1d5886e798a0
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2019-09-16 12:25:01 -04:00
Yong Zhao ec1375ac66 kfdtest: Automate the gtest filter name generation
This will emilinate the need of updating the run_kfdtest.sh every time
a new platform is added.

Change-Id: I584d65b462de36a685fa2d29d43962078ba511dc
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-09-12 15:57:20 -04:00