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

23 Коммитов

Автор SHA1 Сообщение Дата
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 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
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
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
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 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
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
Oak Zeng 3b014adccc Device HDP flush test
Change-Id: I1c19e44caeee4a6e59200dceb718896fcff9bf82
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-07-07 21:59:37 -04:00
Oak Zeng 5d163cd821 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>
2019-06-21 11:51:51 -04:00
Philip Yang 4066dcd542 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>
2019-06-18 09:28:43 -04:00
Philip Yang 36776e9917 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>
2019-06-18 09:28:20 -04:00
Oak Zeng b26580788b Host HDP flush test
Change-Id: I396ac021d15da972f4841d6d8f90d4b175e64ecd
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-05-03 09:31:41 -04: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
Xiaojie Yuan 247fa9f1e0 Use 'RecordProperty' to record performance scores
For following test cases:
- KFDQMTest.QueueLatency
- KFDQMTest.BasicCuMaskingLinear
- KFDQMTest.BasicCuMaskingEven
- KFDMemoryTest.MMBandWidth
- KFDMemoryTest.MMapLarge
- KFDMemoryTest.MMBench

v2: xml element cannot start with a number, so change the key name of
    MMBandWidth and MMBench accordingly
    xml element cannot contain whitespaces, so trim whitespaces in "VRAM  "
v3: introduce KFDLog-like way to use KFDRecord

Change-Id: Ifc3ed5657621252a7b39dccf1ef4f50a92593f77
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
2018-09-18 17:41:14 +08:00
xinhui pan a040a24243 kfdtest: Let BigBufferStressTest detect memory leak
As it will alloc as much as small system memory to reach the allocation limit.
We can try to alloc memory several times to see if any allocation in
the previous step cause memory leak.

Also we test if GPU can access these memory correctly or not.

Change-Id: I309f9821b6bc99c212a6bfbc21fe3086ab589fd3
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2018-08-28 22:50:42 -04:00
xinhui pan 1076075a1c kfdtest: Add some asserts in BigBufferStressTest
It should have PASS/FAIL report for the vram allocated size.

Change-Id: I546c02c2ed02f1cfb5278e0dfd7b18ade39faafb
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2018-08-23 23:01:20 -04: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
Yong Zhao 62f7dc2a48 kfdtest: Do not set GTEST_FLAG throw_on_failure
The flag makes EXPECT_* to behave like ASSERT_*, which actually work against
our favor, so disable the flag.

Change-Id: I2ea1dfeaf916b396593a504d081148abdac0fc70
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2018-08-15 18:08:39 -04:00
Kent Russell f2bd7e1d52 kfdtest: Consolidate log messages for skipped tests
When skipping a test, the output should be:
Skipping test: <reason>.

This will allow for easier identification, automation and general readability

Change-Id: I98bda1c068f9dbc83aeea74f642b6101121f234d
2018-08-14 10:11:50 -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
xinhui pan 3f7b6356fd kfdtest: fix a memory leak issue in MMapLarge test
When mapMemoryToGpu fails, we need unregister it with user address as
the gpu address is not available.

Change-Id: I4418eeaa7aa37008f5bffa144e2c2171f0d238fd
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2018-08-10 05:26:06 -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