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

2959 Коммитов

Автор SHA1 Сообщение Дата
Yong Zhao 61069a41d3 kfdtest: Update gfx908 test blacklist
Change-Id: Ia83789fca28dc85fe7af4075382dfecbf8972d05
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-08-16 19:32:10 -04:00
Amber Lin 1fddfd316a libhsakmt: reduce /proc/cpuinfo opens
/proc/cpuinfo are opened, read, and closed multiple times. Once for vendor
name and multiple times for model name -- each node opens once. For example
in a 2 CPUs + 4 GPUs system, it'll be opened 7 times. This patch reads it
one time and stores it in a cpuinfo buffer. This cpuinfo buffer is freed
when the snapshot is done.

Also replace returns with gotos inside the snapshot to avoid possible
memory leak.

Change-Id: Iaf26a6c7e7323a8651d137c3706179449b9e3c80
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
2019-08-15 12:37:26 -04:00
Jonathan Kim c04ebb56b9 kfdtest: add query debug pending events test cases
adding test cases to query debugger pending events

Change-Id: I089754c508e476ce7b19e1cbd84235e4474b30c4
Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>
Reviewed-by: Kent Russell <Kent.Russell@amd.com>
2019-08-13 10:21:26 -04:00
Jay Cornwall ad717d2e98 Support KFD interrupt protocol in second-level trap handler
If M0[23] is set then the driver will interpret the interrupt as a
debug event, rather than a signal event.

Clear M0 before sending the interrupt. All paths here are terminal so
it's not necessary to save/restore M0.

Change-Id: Ibd85b8cc6f8556941f2308a2c3fa3c68702cd606
2019-08-08 15:16:15 -05:00
Eric Huang cdc10991a9 kfdtest: avoid TTM eviction in KFDMemoryTest.BigBufferStressTest
Reserve half of dma32 zone for non-NUMA system.



Change-Id: Id7aea7b6ff6cc1cc7983ecd95f8078b7f1be630c
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
2019-08-07 16:35:29 -04:00
Yong Zhao 3e4c42ef13 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>
2019-08-07 13:57:36 -04:00
Jonathan Kim 836dfd0752 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>
2019-08-07 10:04:33 -04:00
Philip Yang 632ad3a749 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>
2019-08-07 09:34:06 -04:00
Oak Zeng f40f166e20 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>
2019-08-06 20:20:30 -04:00
Ramesh Errabolu a043c6acbb Add override qualifier to CPU and GPU agent api
Change-Id: I930e29d671b5dc81dece6f910d611056a54d2c85
2019-08-06 18:13:26 -05:00
shaoyunl e65685df19 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>
2019-08-06 18:57:33 -04:00
shaoyunl 65ab296840 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>
2019-08-06 18:57:14 -04:00
Ramesh Errabolu 4a0d50f415 Handle thread creation error correctly
Change-Id: Iaa8811e245aa20ac107aef104847df3e455518f1
2019-08-05 15:39:54 -04:00
Yong Zhao d954db828d kfdtest: Add gfx908 test cases
Change-Id: I427bb8381ea0690d2b0ae496acd4902fba0d18b4
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-08-02 11:05:04 -04:00
Yong Zhao 5ae5854302 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>
2019-08-01 23:10:28 -04:00
Yong Zhao 23db2c658d libhsakmt: Add gfx908 support
Change-Id: Icced5ca4c68eb6cc3978e0d8e836d0ccfc8c980d
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-08-01 23:10:28 -04:00
Konstantin Zhuravlyov 7d8205548b Allow ccache enabled builds if -DROCM_CCACHE_BUILD=ON
Change-Id: Ie3ebb5d95af5fa55f11c9c88378ab29736538e25
2019-08-01 14:33:38 -04:00
Konstantin Zhuravlyov 53e4eca485 Allow ccache enabled builds if -DROCM_CCACHE_BUILD=ON
Change-Id: Ia80965feb6e4ff22d466f1ff3142fb2ef303f99c
2019-07-31 16:39:27 -04:00
Felix Kuehling 4d7b0990e4 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>
2019-07-31 11:29:52 -04:00
Cole Nelson 20cd954fe8 KFDTest: restore KFDMemoryTest.BigBufferStressTest on gfx900
Addressed by:
4066dcd kfdtest: increase BigBufStressTest timeout and avoid VM fault
36776e9 kfdtest: avoid BigBufStressTest run on NUMA node 0





Change-Id: If21c6e42b4cf6aada1f74e77f0d8d1a2fdebcdb8
Signed-off-by: Cole Nelson <cole.nelson@amd.com>
2019-07-30 12:05:53 -04:00
shaoyunl 78e754ca5b 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>
2019-07-30 10:56:19 -04:00
Philip Cox b6f6d9da1c 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>
2019-07-25 14:18:03 -04:00
shaoyunl c0663be7e8 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>
2019-07-25 10:56:17 -04:00
shaoyunl 157f5b945f KFDTest: Add CWSR test for gfx1010
Change-Id: I708b2fd5f06e0c7591ebe04c40576845cf2a891a
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
2019-07-25 10:55: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 85a9821519 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>
2019-07-25 10:54:30 -04:00
Kent Russell 79a3995816 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
2019-07-24 07:38:27 -04:00
Kent Russell 1ca1825b84 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
2019-07-24 07:36:19 -04:00
Chris Freehill 04da198a31 Fix gfx908 build
Includes
-"Report SRAM ECC errors through the system event handler."
  (bf6af52892b1f677697309a7946f651bfe8e9061)
-"Fix async memory test; temporarily disable NUMA memory test"
  (626f13a88b)
-Temporary disable of rocrtst

Change-Id: Ide9fc999b01ab810f00a56fc3733d07be45117c7
2019-07-23 07:37:40 -04:00
Chris Freehill 6588165de1 gfx908 loader/isa related changes
Change-Id: I638d4b2b300ac5a99d4d31d4fadcfe9e1e3c7748
2019-07-23 03:41:27 -04:00
Chris Freehill 2c15bcac9d Add ISAREG entry for gfx908 for ECC not supported
* Also, re-enable rocrtst

Change-Id: I70106c5a1788818387e46f240d577cbe59bc89f4
2019-07-22 21:50:09 -04:00
Chris Freehill 447a30e985 Initial gfx908 updates
Change-Id: I3d6307d6613a38861a95561b9ac68abaa5964b48
2019-07-22 17:25:06 -04:00
shaoyunl 5b44be1907 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>
2019-07-22 16:37:02 -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
Yong Zhao 4baeef356f 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>
2019-07-19 16:58:22 -04:00
Sean Keely 0721dfd2e7 Update README build instructions.
Change-Id: I595e629117adfb44afb2e829d1f975782238277e
2019-07-19 14:17:47 -04:00
Sean Keely 4fafdcb00c Add deallocation callback test to rocrtst.
Change-Id: Ia20abd8f1f64213eea0c3c1c771cc229cf38fd5d
2019-07-19 14:17:21 -04:00
Sean Keely 6e07bc8dc4 Adjust agentOwner in pointer info queries for locked memory.
agentOwner from thunk reflects the GPU which holds the device alias.
We need to return a CPU to better reflect that the memory is system memory.

Change-Id: I9233f8779a4bfd471f68dbbbce07ae4528412e18
2019-07-19 14:17:13 -04:00
shaoyunl b4e834ab61 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>
2019-07-19 13:26:49 -04:00
shaoyunl e9882daf11 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>
2019-07-18 10:43:48 -04:00
shaoyunl ff82d3a354 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>
2019-07-17 10:42:32 -04:00
Sean Keely 465a8eb40b PR from github user DiamondLovesYou.
Allow user specified profiles if the HSAIL note is not found.

Konstantin reviewed and approved.  HSAIL note is not generated by LLVM.

Change-Id: I40fbfbaedd6787b6a716507918f698d02007afe1
2019-07-16 13:55:38 -05:00
Ramesh Errabolu 4daee0c8a1 Allocate fine-grained regions for Gpu devices that are members of Hives
Change-Id: Ibbed393aeac691793845d16d2f3fe2c3e5a7ec40
2019-07-13 01:12:53 -04:00
Felix Kuehling 4e9ff4393d 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>
2019-07-11 17:15:39 -04:00
shaoyunl 02ccb9eb57 Thunk: Add gfx1010 initial support
Add gfx1010 basic support on Thunk

Change-Id: Ie4c0922158c7f5e2951f8694f4b204f371f1aa23
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
2019-07-11 17:08:11 -04:00
Felix Kuehling 67c4fe230b kfdtest: Disable CheckZeroInitializationVram test
KFD will soon stop initializing VRAM allocations.

Change-Id: I901c736886bb3bd3b1b54a21d383ccd7907928fd
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2019-07-10 17:05:57 -04:00
Felix Kuehling 5475e618e5 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>
2019-07-10 17:05:57 -04:00
Felix Kuehling 6704b051d2 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>
2019-07-10 17:05:57 -04:00
Philip Yang 67f366243d 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>
2019-07-09 17:53:30 -04:00
shaoyunl c6ed539b44 Add gfx IsaGenerator
Change-Id: I93ccb889b4bb7f0f5921a90cebbc0550d1eb3f7d
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
2019-07-09 11:39:38 -04:00