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

33 Коммитов

Автор SHA1 Сообщение Дата
xinhui pan e5a541eaf2 kfdtest: Add P2P bandwidth test
The test measures the bandwidth between GPUs. Currently we do not
care numa topology as some products really support across PCI-e root
complex p2p.

test result on two gfx900 system.
[ RUN      ] KFDPerformanceTest.P2PBandWidthTest
[          ] Copy from node to node by [push, NONE]
[          ] [1 -> 0] 6.13477 - 6.12695 GB/s
[          ] [1 -> 2] 3.77734 - 3.76855 GB/s
[          ] [2 -> 0] 6.67676 - 6.6543 GB/s
[          ] [2 -> 1] 6.14453 - 6.12793 GB/s
[          ] Copy from node to node by [pull, NONE]
[          ] [1 -> 0] 6.10547 - 6.08105 GB/s
[          ] [1 -> 2] 9.65527 - 9.65039 GB/s
[          ] [2 -> 0] 6.49805 - 6.4873 GB/s
[          ] [2 -> 1] 8.95508 - 8.85254 GB/s
[          ] Full duplex copy from node to node by [push|pull, NONE]
[          ] [1 -> 0] 11.0986 - 11.0986 GB/s
[          ] [1 -> 2] 7.54297 - 7.54297 GB/s
[          ] [2 -> 0] 12.0264 - 11.9639 GB/s
[          ] [2 -> 1] 12.0469 - 12.0371 GB/s
[          ] Full duplex copy from node to node by [push, push]
[          ] [1 <-> 2] 11.7324 - 11.4541 GB/s
[          ] Full duplex copy from node to node by [pull, pull]
[          ] [1 <-> 2] 11.4824 - 11.0508 GB/s
[          ] Copy from node to multiple nodes by [push, NONE]
[          ] [1 -> [0...2]] 5.625 - 5.73633 GB/s
[          ] [2 -> [0...2]] 6.45801 - 6.4707 GB/s
[          ] Copy from multiple nodes to node by [push, NONE]
[          ] [[1...2] -> 0] 12.8379 - 12.2578 GB/s

Now we can get more timestamp info like below.

Copy from node to node by [push, NONE]
[1 -> 0]
[1 : 0] #-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-##-#-#-#-#-###############################
[1 : 1] ####################################################################################################
[1 -> 2]
[1 : 0] #--#-#-#-#-#--#-#-#-#-#--#-#-#-#-#--#-#-#-#-#-#--#-#-#-#-#--#-#-#-#-#--#-#-#-#-#-#--#-#-#-#-#--#-#-######################################
[1 : 1] ##################################################################################################-#
[2 -> 0]
[2 : 0] ##-###-##-###-###-##-###-##-###-###-##-###-###-##-###-###-##-###-##-###-###-##-###-###-##-###-###-#################
[2 : 1] ###############################################################################-#############-###-##
[2 -> 1]
[2 : 0] ##-##-##-##-##-###-##-##-##-##-##-###-##-##-##-##-###-##-##-##-##-##-###-##-##-##-##-###-##-##-##-####################
[2 : 1] ################################################################################-###-############-##

[snip]

Full duplex copy from node to node by [push, push]
[1 <-> 2]
[1 : 0] #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-#-#-#-#-####################################
[1 : 1] ################-###################################################-############-####-#############
[2 : 2] #-##-##-##-#-##-##-##-##-#-##-##-##-##-#-##-##-##-##-#-##-##-##-##-#-##-##-##-##-##-#-##-##-##-##-#-##-##-##-##-##-#-##################
[2 : 3] #####-######-#####-######-#####-######-#####-######-#####-######-#####-######-#####-######-#####-######-#####-#####-##
Full duplex copy from node to node by [pull, pull]
[1 <-> 2]
[1 : 0] ######################################################################-##-#-###############-####-###
[1 : 1] #-#-#-##-#-#-##-#-#-##-#-#-##-#-#-##-#-#-##-#-#-##-#-#-#-##-#-#-##-#-#-##-#-#-##-#-#-##-#-#-##-#-#-############################
[2 : 2] ##-##-##-##-###-##-##-##-##-###-##-##-##-###-##-##-##-##-###-##-##-##-###-##-##-##-##-###-##-##-##-##-###-##-##-##-###-##-##-############
[2 : 3] #-#-#-#-#-#-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#########-#############
Copy from node to multiple nodes by [push, NONE]
[1 -> [0...2]]
[1 : 0] #-#--#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-###############################
[1 : 1] ########################################################################################-###-###-###
[2 -> [0...2]]
[2 : 0] ##-##-##-###-##-###-##-##-###-##-###-##-##-###-##-###-##-###-##-##-###-##-###-##-##-###-##-###-##-##################
[2 : 1] -################################################################################################-##
Copy from multiple nodes to node by [push, NONE]
[[1...2] -> 0]
[1 : 0] #-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-#-##-#-#-#-#-#-#-#-#-##-#-#-#-###############################
[1 : 1] ################################################################################################-#-#
[2 : 2] ##-##-##-###-##-##-###-##-##-##-###-##-##-###-##-##-###-##-##-###-##-##-##-###-##-##-###-##-##-###-##-##################
[2 : 3] #########################-#########################-#########################-#########################
[       OK ] KFDPerformanceTest.P2PBandWidthTest (15982 ms)

Change-Id: Ia90044191d51650ccb220476d31fb317aa3ad6ce
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2018-09-19 12:03:05 +08:00
xinhui pan f618b3f075 kfdtest: add KFDTestUtilQueue
Some infrastructures below,
Implement SdmaTimePacket which records the global GPU timestamp.

Introduce class AsyncMPSQ and AsyncMPMQ.
AsyncMPSQ is aka async multiple packet single queue. It takes a set of
packet when create and submits them to a GPU to run. While AsyncMPMQ is
aka async multiple packet multiple queue. It manages a set of AsyncMPSQ,
and use a forloop to do operations of AsyncMPSQ.

Implement sdma_multicopy helper functions.

Change-Id: I47e1d2ca9630113b2a1d85a0055f3f8ee629fb5f
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2018-09-19 12:03:05 +08: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 a6287ba919 kfdtest: Do not set GTEST_FLAG throw_on_failure
This change is from commit 62f7dc2a("kfdtest: Do not set GTEST_FLAG
throw_on_failure").
But it is unexpected to reverted by commit 414042ab("kfdtest: Clean up
comments"). So add this change back.

Fix: 414042ab

Change-Id: Ia9e99c9ca17b99aab62b4db55017018ddae43dfb
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2018-09-11 10:25:56 +08:00
xinhui pan 07bd97a864 kfdtest: Fix queuelatency fail issue
The timestamp written by releaseMemory packet might still not be visible
when we fetch it.
To fix this bug, use event-based wait.

Change-Id: If2324eb3b3a632c711ee4dff4d03a93d5306c289
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2018-09-10 21:17:29 -04:00
Harish Kasiviswanathan 1fda429726 kfdtest: GetNodeIoLinkProperties: Display NodeFrom
Use the NodeFrom returned by hsaKmtGetNodeIoLinkProperties() to check
its correctness.

Change-Id: I6ce436dc7c5d5b192bee21156292bd3eff77f916
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
2018-09-10 09:44:24 -04:00
xinhui pan 9c7cfc0df2 kfdtest: Add event-based synchronization mechanism to queues
Wait4PacketConsumption now can accept an event to wait all packets subbmitted
to be processed.

Change-Id: I1497b7704e892b04d05811b8d3e4742237c1be57
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2018-09-04 21:21:19 -04:00
Felix Kuehling 608dddbe9d kfdtest: Fix gfx902 blacklist
Removed some tests from the blacklist that are now passing. Added two
new tests that hang the GPU.

Change-Id: I09e729590e5181311375058be492d387342ba2fe
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2018-08-31 15:04:50 -04: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 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
xinhui pan bdb1f8a066 kfdtest: Let SdmaEventInterrupt test more meaningful
Simulate some workload there to verify the sDMA event interrupt.

Change-Id: Ib5ad0c238cc66898f7835e765df50427ef106b04
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2018-08-24 11:27:34 +08: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
xinhui pan 163fa2f3aa kfdtest: use HSAuint64 instead of unsigned HSAint64
This should fix gtest compile errors.

code like below has trouble,

typedef char char8;
typedef unsigned char uchar8;

ASSERT_NE((uchar8)1, 0);
ASSERT_NE((unsigned char8)1, 0); // compile error here
or
ASSERT_NE((unsigned char8)1, 0);
ASSERT_NE((uchar8)1, 0); // compile error here

HSA[u]int64 are alias. So ASSERT_XX((unsigned HSAint64)..)
with ASSERT_XX((HSAuint64)..) fail to compile.

Change-Id: I4c24bc699a69bd4f37c4bc8aaaa9f1a92a24a33e
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2018-08-16 16:03:52 +08: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
Felix Kuehling d3fdaaca3a kfdtest: Enable more tests for gfx900
A lot of tests were disabled on gfx900 for historical reasons that
are no longer valid. The only remaining one that won't work on
gfx900 is BasicAddressWatch.

Change-Id: I11507de0dfd31262713127d6cb15cc09c14b8b9f
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2018-08-15 14:22:19 -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 cb019f00cd kfdtest: Consolidate indentation of multi-line function calls
Make indentation consistent, which is that subsequent lines are aligned
with the variables declared above

Change-Id: I590f7768d93565145b986ad1fb6ac8e82f9c0d58
2018-08-14 08:18:07 -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
xinhui pan 9d6d0911e4 kfdtest: make p2ptest go through all gpus
Implement sDMA copy packet broadcast.

Each time sDMA will copy its local vram to sysbuf and next GPU's vram.
That will verify where the p2p link is broken.
Currently we just test push of p2p.

test result on 2 cpus, 4 gpus, numa enabled system.
[ RUN      ] KFDQMTest.P2PTest
[          ] Test 2 -> 3
[          ] PASS 2 -> 3
[          ] Test 3 -> 4
[          ] PASS 3 -> 4
[          ] Test 4 -> 5
[          ] PASS 4 -> 5
[          ] Test 5 -> 0
[          ] PASS 5 -> 0
[       OK ] KFDQMTest.P2PTest (190 ms)

Change-Id: Ie6fb2604109e39465b8a873b3bb42abc6259825a
2018-08-07 21:13:37 -04:00
Felix Kuehling 5c742f3e5e kfdtest: Blacklist Fragmentation test on all chips
This test has been intermittently failing for various reasons and
was already disabled on all chips except Ellesmere. It stresses
memory management in unusual ways by having lots of memory allocated
but +# not mapped, which is not relevant to compute applications over
ROCr.



Change-Id: I6b791ca7e2e0fcfe93fc720063b4b56acfded751
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2018-08-03 20:14:46 -04:00
Eric Huang 3167e3b964 KFDEvictTest: change buffer size and add GFX vram allocation
This is to coordinate kfd kernel vram limit change, and adding
GFX vram allocation with submission of command nop is to
trigger eviction.



Change-Id: I18615cd13cfde034aae09c188ae3a82babde97b9
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
2018-08-03 15:44:32 -04:00
Eric Huang f8d19104aa Kfdtest: Change and move drm device function into KFDBaseComponentTest
It is for other test to reuse this function.

Change-Id: Ib0dbc1a267a5bbcd8078ab3265677b53531f86f3
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
2018-08-03 15:43:28 -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
xinhui pan 86552aba4b kfdtest: make the output of QueueLatency test more readable
Change-Id: Ib33ac25509b23f2e5869bde126e3f11ef60f017e
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
2018-08-01 10:06:33 +08:00
Yong Zhao 1d43938ac7 kfdtest: Add run utility files for kfdtest
A README.txt file is added to help the opensource community to use kfdtest
effectively.

After building, run_kfdtest.sh in the building output folder can be used
to run the test.

Change-Id: I9612d9d5a63bd4cdc3a328efd9961d3cc92a6ba5
Signed-off-by: Yong Zhao <yong.zhao@amd.com>
2018-07-31 00:02:04 -04:00
Yong Zhao f8472a055c kfdtest: Use libhsakmt to replace all the occurrences of thunk
Thunk is an internal name and we'd better reference it using the library name.

Change-Id: I20042bda546e5249530311d3de30c71d99379033
Signed-off-by: Yong Zhao <yong.zhao@amd.com>
2018-07-31 00:02:04 -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
Felix Kuehling 641bfd2cd5 Add simple test for unloading and reloading Thunk
Change-Id: I4ca95dee8a180023d1de5f69161607dd368164de
2016-01-22 18:41:53 -05:00
Serguei Sagalovitch f44982a7ca Fixed logic to return data back to user
Change-Id: I324d07c38e8d7eb202d4dccfed6e62006cf9cd29
Signed-off-by: Serguei Sagalovitch <Serguei.Sagalovitch@amd.com>
2016-01-22 14:49:18 -05:00
Serguei Sagalovitch 47cef87a34 Skeleton for RDMA unit test v4
Added application and driver to serve as the starting point for RDMA
unit test uility.

v2: Added initial mmap support
v3: Fixed logic to find correct ioctl handler
v4: Fixed logic in mmap to find correct pages table

Change-Id: Iaf97c0eb2acef2160d542c71afed58cf400414f7
Signed-off-by: Serguei Sagalovitch <Serguei.Sagalovitch@amd.com>
2016-01-21 15:20:24 -05:00