Commit Graph

562 Commits

Author SHA1 Message Date
Yong Zhao 768bd50cd2 kfdtest: Improve the printing message for CuMasking tests
Decimal is better than hex in this case.

Change-Id: Ic15a9373e99160880b98d3dcd6827d551c87b77a
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 3e4c42ef13]
2019-08-07 13:57:36 -04:00
Jonathan Kim 8fc23418ea libhsakmt: update dbg enable trap and add query debug events
Add data out for enable trap to return poll fd to user space.
Add query debug events interface.

Change-Id: Ia4afde1cf167e6aa61d502380a8b329ee89d5f44
Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>


[ROCm/ROCR-Runtime commit: 836dfd0752]
2019-08-07 10:04:33 -04:00
Philip Yang bb4291dcac hsaKmtCloseKFD destroy objects in all apertures
Otherwise the parent call hsaKmtCloseKFD and then fork child process,
child process will duplicate the vm_objects from the parent.

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


[ROCm/ROCR-Runtime commit: 632ad3a749]
2019-08-07 09:34:06 -04:00
Oak Zeng dc22f0c67e Remove NodeId parameter from hsaKmtAllocQueueGWS
The NodeId parameter is redundant and can be retrieved
from QueueId parameter.

Change-Id: I12853849b868b304bd27633fa7653ba644d69026
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: f40f166e20]
2019-08-06 20:20:30 -04:00
shaoyunl b2697b1e25 KFDTest: simply P2PBandwidthTest case for specified source/destination
Only run the  P2P test over the specified source and destination nodes if user already specify them

Change-Id: Ia3c0195cead7f46e3e28507f3255d8c59a287ab8
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: e65685df19]
2019-08-06 18:57:33 -04:00
shaoyunl 5ac55945cc KFDTest: Set CS_W32_EN bit for wave32 workloads for GFX10
On GFX10, the wave size is determined by the COMPUTE_DISPATCH_INITIATOR value passed to
DISPATCH_DIRECT.CS_W32_EN, default 0 value was giving 64 lane waves

Change-Id: Ie8c407a24bd2825757ec481be62247b35047e5ca
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: 65ab296840]
2019-08-06 18:57:14 -04:00
Yong Zhao afdcb5c018 kfdtest: Add gfx908 test cases
Change-Id: I427bb8381ea0690d2b0ae496acd4902fba0d18b4
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: d954db828d]
2019-08-02 11:05:04 -04:00
Yong Zhao d3eef14f3a kfdtest: Improve FlatScratchAccess by not hardcoding the value
We should use the SE number reflected by NumShaderBanks of the node
rather than hardcoding it.

Change-Id: I945fb001f81ce506249cf485a7ce25aee8219bc7
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 5ae5854302]
2019-08-01 23:10:28 -04:00
Yong Zhao d4ca540cd6 libhsakmt: Add gfx908 support
Change-Id: Icced5ca4c68eb6cc3978e0d8e836d0ccfc8c980d
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 23db2c658d]
2019-08-01 23:10:28 -04:00
Konstantin Zhuravlyov f53a7875a9 Allow ccache enabled builds if -DROCM_CCACHE_BUILD=ON
Change-Id: Ia80965feb6e4ff22d466f1ff3142fb2ef303f99c


[ROCm/ROCR-Runtime commit: 53e4eca485]
2019-07-31 16:39:27 -04:00
Felix Kuehling 1941f47265 libhsakmt: Sanity check node_id for NUMA binding
Ignore requests to bind to invalid NUMA nodes. This affects only
legacy applications (such as KFDTest) that allocate system memory
as paged memory with a GPU node ID.

Change-Id: I81e514af6d0c1ab2ed5229adeeca1fa0ab2a0685
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 4d7b0990e4]
2019-07-31 11:29:52 -04:00
Cole Nelson fafcb46413 KFDTest: restore KFDMemoryTest.BigBufferStressTest on gfx900
Addressed by:
ae92e8f kfdtest: increase BigBufStressTest timeout and avoid VM fault
3edf77b kfdtest: avoid BigBufStressTest run on NUMA node 0





Change-Id: If21c6e42b4cf6aada1f74e77f0d8d1a2fdebcdb8
Signed-off-by: Cole Nelson <cole.nelson@amd.com>


[ROCm/ROCR-Runtime commit: 20cd954fe8]
2019-07-30 12:05:53 -04:00
shaoyunl a7086d5bee KFDTest: Make shader compatiable for gfx9 and gfx10
Remove the CHIP name from the shader ISA and add wave_size(32) to make the same
shader can be  used for both  GFX9 and GFX10

Change-Id: I16ea72f87980c3d9c11298e20c06a0a073fe9a28
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: 78e754ca5b]
2019-07-30 10:56:19 -04:00
Philip Cox e6eb9e9821 Enable KFDGraphicsInterop.RegisterForeignDeviceMem
KFDGraphicsInterop.RegisterForeignDeviceMem looks like it is running
now. Re-enable it for kfdtest for all platforms.

Change-Id: I6f6ee9cd11da793c5d525d8676bfc6d5bd8007bb
Signed-off-by: Philip Cox <Philip.Cox@amd.com>


[ROCm/ROCR-Runtime commit: b6f6d9da1c]
2019-07-25 14:18:03 -04:00
shaoyunl 8454d25538 KFDTest: Enable KFDEvictTest.QueueTest for gfx1010
v_add_u32 was removed from gfx10, use carry-out explicit instruction
v_add_co_u32 instead on both gfx9 and gfx10

Change-Id: I1fcd5956844457a676757ad13bdce7f5304bb34b
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: c0663be7e8]
2019-07-25 10:56:17 -04:00
shaoyunl 4fbf5ac502 KFDTest: Add CWSR test for gfx1010
Change-Id: I708b2fd5f06e0c7591ebe04c40576845cf2a891a
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: 157f5b945f]
2019-07-25 10:55:01 -04:00
shaoyunl 440c7067c5 KFDTest: Test 8 SDMA queues per engine for gfx1010
Change-Id: I709112ab10b1f5684e6411f44682bdef14745b50
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: 33bd5c520b]
2019-07-25 10:54:44 -04:00
shaoyunl 318ec9baec KFDTest: Shader modification for gfx10
Modified shaders in KFD memory test to support gfx10.
There is no gprs register for flat_scratch on gfx10.
Use s_setreg_b32 instruction to set flat scratch base
address register

Change-Id: I505156a046056b61ce2d873343feb50ce635274a
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 85a9821519]
2019-07-25 10:54:30 -04:00
Kent Russell c771ac9d2b Restore PM4EventInterrupt to non-gfx803 testing
The test is viable still on VG10/20. Phil is investigating why it takes
so long on gfx803 

Change-Id: I61669b29dc0e8407858a5c73cfa69c5ea923846f


[ROCm/ROCR-Runtime commit: 79a3995816]
2019-07-24 07:38:27 -04:00
Kent Russell 187c4c00a4 Remove KFDDBGTest.BasicAddressWatch
This functionality doesn't work on GFX9+, and was disabled for gfx802.
Remove the test altogether for now, especially since some kernel changes
broke it on gfx803, and the functionality is deprecated now anyways. Leave
the code for reference, but "#if 0" it to prevent it from compiling or
being in the kfdtest binary

Change-Id: I848b4f23201f18612cbdc122a5b46e4010c4af2a


[ROCm/ROCR-Runtime commit: 1ca1825b84]
2019-07-24 07:36:19 -04:00
shaoyunl 8e30a50ffd KFDTest: Added gfx1010 SDMA fence packet support
Change-Id: I33d824353d77317363b73ddc52cd182f86b8bc66
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 5b44be1907]
2019-07-22 16:37:02 -04:00
shaoyunl a619145290 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>


[ROCm/ROCR-Runtime commit: 395750264d]
2019-07-22 16:36:49 -04:00
Yong Zhao 22da7a83ab kfdtest: Sumbit to SDMA ring when using libdrm command submission
Because not all ASICs (like gfx908) have GFX rings, we should use SDMA
rings instead of GFX rings.

Change-Id: Ibcc9f9e555302ba4ce25ac76c2ca73b8c3962a58
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 4baeef356f]
2019-07-19 16:58:22 -04:00
shaoyunl db09beaa08 KFDTest: remove the usage global g_TestGPUFamilyId
Adjust the KFDTest for multi-gou support

Change-Id: Ib3491e3f645d35fdba6ab702d65fcc86f48d3958
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: b4e834ab61]
2019-07-19 13:26:49 -04:00
shaoyunl 6f29801c64 KFDTest : Add gfx1xxx release_mem and acquire_mem packet support
use family ID as parameter when construct the packets

Change-Id: I6c1706954ab7b8cbb8bef2aab16edf21f5e1abf0
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: e9882daf11]
2019-07-18 10:43:48 -04:00
shaoyunl c2d5d06c43 kfdtest: Add Gfx10 pm4 packet format
Add release_mem and acquire_mem pm4 packet format for nv

Change-Id: I172407c3418005922c17937e1e43f57d153ea732
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: ff82d3a354]
2019-07-17 10:42:32 -04:00
Felix Kuehling 30e96da4f1 kfdtest: MMBench: Test a more useful range of buffer sizes
Currently the test only covers relatively small buffers sizes. It's
useful to test buffer sizes up to 1GB to see the impact of features
that target the efficiency of large buffer allocations and mappings.

Change-Id: I2e8d5afd482894dbe2166f32d38091199b9c15e6
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 4e9ff4393d]
2019-07-11 17:15:39 -04:00
shaoyunl 050b676533 Thunk: Add gfx1010 initial support
Add gfx1010 basic support on Thunk

Change-Id: Ie4c0922158c7f5e2951f8694f4b204f371f1aa23
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: 02ccb9eb57]
2019-07-11 17:08:11 -04:00
Felix Kuehling f53e199ce1 kfdtest: Disable CheckZeroInitializationVram test
KFD will soon stop initializing VRAM allocations.

Change-Id: I901c736886bb3bd3b1b54a21d383ccd7907928fd
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 67c4fe230b]
2019-07-10 17:05:57 -04:00
Felix Kuehling 2ffc094890 kfdtest: Add multi-process oversubscription test
This test is designed to reproduce soft-hangs cause by HWS running
with oversubscription.


Change-Id: I49861522b3ff5ba50df5ddc968545c35ccb25353
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 5475e618e5]
2019-07-10 17:05:57 -04:00
Felix Kuehling d9f3f826dc kfdtest: Factor out multi-process test into a base class
Create KFDMultiProcessTest base class for tests forking multiple
child processes. Derive KFDEvictTest from that class.

Change-Id: Ie5f3362c45be2b807bf7a83839ab3820352a67f9
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 6704b051d2]
2019-07-10 17:05:57 -04:00
Philip Yang 9b451c41e8 fix mbind on NUMA system
mbind walks through pages to setup vma memory policy. So we need do mmap
to create vma mappings first, then call mbind. mbind will do nothing if
vma does not exist.

And add numa available check before executing mbind, and return NULL to
hsaKmtAllocMemory if mbind failed.



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


[ROCm/ROCR-Runtime commit: 67f366243d]
2019-07-09 17:53:30 -04:00
shaoyunl 92b73c10c5 Add gfx IsaGenerator
Change-Id: I93ccb889b4bb7f0f5921a90cebbc0550d1eb3f7d
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: c6ed539b44]
2019-07-09 11:39:38 -04:00
shaoyunl 8232817dd9 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>


[ROCm/ROCR-Runtime commit: 6cad92de6f]
2019-07-09 11:38:57 -04:00
Oak Zeng c214576bd3 Device HDP flush test
Change-Id: I1c19e44caeee4a6e59200dceb718896fcff9bf82
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 3b014adccc]
2019-07-07 21:59:37 -04:00
shaoyunl 4a9ffdd56d Added SP3 assembler support for gfx10
Change-Id: I31c1df0f6d5243089e2ec3db381a19362be18d6c
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: 664c6617ad]
2019-07-05 10:40:54 -04:00
Yong Zhao 7330d49568 kfdtest: Add core test category
This will faciliate ASIC bringup, including under simulation environment.

Change-Id: Ie027a77a2498cba739fea51f404d9843ce8dbeae
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: c27704ded9]
2019-07-02 22:28:23 -04:00
Yong Zhao 7fb7eab2d4 kfdtest: Use SDMA engine information directly from the node
Change-Id: Icd391c8e821fb0ff5a1094f21b880a97e6d417a3
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: b507911ccd]
2019-06-28 00:47:15 -04:00
Kent Russell 9e301177f6 Remove failing tests due to gfx1010 kernel merge
BasicAddressWatch causes issues where KFDEvictTest and
KFDQMTest.OverSubscribeCpQueues fails, and results in a GPU hang/reset.
PM4EventInterrupt just hangs indefinitely. Remove them for now to allow
the kernel merges to resume, and figure out what happened in the nv10
merge to cause it

Change-Id: I418f9561ecb3e71bc52ac48ea363fcbde82a8e2b


[ROCm/ROCR-Runtime commit: be6ff2cdff]
2019-06-27 10:19:46 -04:00
Felix Kuehling 121ad3f820 Restore SDMA blacklist
The SDMA blacklist should contain all tests that use SDMA. It will
be applied to all ASICs that are know to have SDMA stability issues.

Change-Id: I53e723382c12f99bddf9c535000e27737a7ea1f6
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 62ee7b4112]
2019-06-21 16:08:22 -04:00
Oak Zeng 4b48c71c38 Re-enable HostHdpFlush test
The bus error bug was fixed from kfd driver and Thunk

Change-Id: Id02617fdc26f1c49307f90a0a939e05f22d739e7
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: be9ac578ef]
2019-06-21 11:52:07 -04:00
Oak Zeng 54388cabdc Fix HostHdpFlush shader
1. Use s_mov_b32 to move 0xcafe to s18. s_movk_i32 is a sign extention move
instruction. Oxcafe will be extended to 0xffffcafe which is not desired
2. Add wait to s_load_dword instruction to make sure memory read finish before
the next store instruction.

Change-Id: I665d1d471019edfaba5693e07cdc567d4103573f
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 5d163cd821]
2019-06-21 11:51:51 -04:00
Philip Yang ae92e8fdff kfdtest: increase BigBufStressTest timeout and avoid VM fault
If TTM eviction and restore happens, it may takes very long time if
retry, the longest time is 5 minutes during my test. There is chance
packet is submited to queue while eviction, we have to increase the
Wait4PacketConsumption timeout.

The queue will continue to execute after eviction and restore. If we
upmap the memory from GPU while queue is evicted, this will cause VM
fault. Change to unmap memory after queue is destroyed.



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


[ROCm/ROCR-Runtime commit: 4066dcd542]
2019-06-18 09:28:43 -04:00
Philip Yang 3edf77b5c9 kfdtest: avoid BigBufStressTest run on NUMA node 0
Because dma32 zone is on node 0, use all system memory on node 0 will
cause TTM eviction to free dma32 zone for other devices which only
work with 32bit physical address. The TTM eviction and restore may take
too long and cause queue timeout.

Running on other NUMA nodes, the NUMA default memory policy is
MPOL_PREFERRED, means TTM will get pages from local node first, and then
get remaining pages from other nodes. Check /proc/buddyinfo can confirm
this.

Reset NUMA bind to all after the test.



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


[ROCm/ROCR-Runtime commit: 36776e9917]
2019-06-18 09:28:20 -04:00
Cole Nelson 41b06f1eee kfdtest: Blacklist multiple tests on gfx900/20
PSDB and other jenkins jobs are currently failing on several kfd tests.
This is blocking user throughput for screening patches by PSDB.
Blacklist multiple tests and submit JIRA's.

KFDIPCTest.BasicTest (ROCMOPS-459) .CMABasicTest (ROCMOPS-460) .CrossMemoryAttachTest (ROCMOPS-461)
KFDMemoryTest.BigBufferStressTest (ROCMOPS-462)
KFDQMTest.MultipleSdmaQueues (ROCMOPS-463) (ROCMOPS-416)
KFDEvictTest.BurstyTest (ROCMOPS-464)

Change-Id: I2c7cdeabc26654f39823201ce86d4113b3a98a0e
Signed-off-by: Cole Nelson <cole.nelson@amd.com>


[ROCm/ROCR-Runtime commit: 3f2d2e67c9]
2019-06-16 19:24:22 -04:00
Ori Messinger 95ccc6f000 Remove passing blacklisted kfd tests
This relates to the following commits:

1. commit 931dd817fa
2. commit 34e6346848
3. commit 880119d3a3

Change-Id: I3d0d3214baba403b4709b358132b6756a15f42d7
Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>


[ROCm/ROCR-Runtime commit: fe4db33875]
2019-06-12 06:14:46 -04:00
Oak Zeng 2f9c7afcfe Use kfd fd to mmap mmio
Change-Id: Iadd2e1ea46d0951aaa5a6cefbc7d42d1b2c1f653
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 888e1a7ae7]
2019-06-10 21:07:45 -05:00
Oak Zeng ef47fe0e1e Thunk API to allocate queue GWS
Change-Id: I6c5b109e2567cb71aed9245923cfcbeee6295ab2
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 65d554f5e4]
2019-06-10 21:07:45 -05:00
Oak Zeng b17d287432 Add node property to report number of GWS
Change-Id: I81263ca7ebfa3c0f9f1be78acfa0920e47d551b1
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 45d717d860]
2019-06-10 21:07:45 -05:00
Felix Kuehling 82670ee7fc kfdtest: Allocate PM4 queue and dispatch earlier KFDEvictTest.QueueTest
Allocating these before the big memory allocations minimizes the chances
of spurious out of memory errors.

Change-Id: I94aff9ec7ea34d4dc98ae08ac4cf9dc335b3df7f
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 396a85e97b]
2019-06-07 16:54:28 -04:00