Commit Graph

650 Commits

Author SHA1 Message Date
Kent Russell c463d39ddc Set package name explicitly
Instead of letting CPack generate the filename according to
CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME},
set the package name ourselves. Also take the change to fix the name of
hsakmt-dev to hsakmt-devel for RPM, since that's their convention

Previous packaging format:
hsakmt-roct-1.0.9-229-g2144854-Linux.deb
hsakmt-roct-1.0.9-229-g2144854-Linux.rpm
hsakmt-roct-dev-1.0.9-229-g2144854-Linux.deb
hsakmt-roct-dev-1.0.9-229-g2144854-Linux.rpm

New format:
hsakmt-roct-1.0.9-292-gc66f8cf.x86_64.deb
hsakmt-roct-1.0.9-292-gc66f8cf.x86_64.rpm
hsakmt-roct-dev-1.0.9-292-gc66f8cf.x86_64.deb
hsakmt-roct-devel-1.0.9-292-gc66f8cf.x86_64.rpm

Change-Id: I4fc4e0fd2eafd25669c1cfffb39860e25a0b645c
Signed-off-by: Kent Russell <kent.russell@amd.com>


[ROCm/ROCR-Runtime commit: 57b42045d0]
2019-12-18 12:21:33 -05:00
Yong Zhao a67ef3e675 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>


[ROCm/ROCR-Runtime commit: f7c0172385]
2019-12-17 19:46:33 -05:00
Yong Zhao 674f8030a5 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>


[ROCm/ROCR-Runtime commit: 1c2c5a7b9a]
2019-12-17 19:37:14 -05:00
Yong Zhao e1d0cd53d8 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>


[ROCm/ROCR-Runtime commit: 10ffc63d7b]
2019-12-17 19:25:14 -05:00
Eric Huang d49fbe2475 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>


[ROCm/ROCR-Runtime commit: caa744944e]
2019-12-11 14:48:55 -05:00
Yong Zhao ee8ab015dd 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>


[ROCm/ROCR-Runtime commit: 8f140fc03d]
2019-12-02 12:56:03 -05:00
Jonathan Kim efef21f4ff 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>


[ROCm/ROCR-Runtime commit: 8b01a1c4c5]
2019-12-02 11:56:04 -05:00
Yong Zhao 8feaf7585f 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>


[ROCm/ROCR-Runtime commit: ad76ffd544]
2019-12-02 11:38:18 -05:00
Oak Zeng 6cb65e8c37 Support XGMI optimized SDMA queue
Change-Id: I6ad62fc94a9838df505879b1ddaccfeb9881a6e8
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 0b71bbb787]
2019-11-26 21:42:47 -05:00
Yong Zhao c8eb45a5fa kfdtest: Merge the two largest buffer test helper functions
This is cleaner.

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


[ROCm/ROCR-Runtime commit: 4daa25fceb]
2019-11-25 18:45:23 -05:00
Yong Zhao 53c9d60035 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>


[ROCm/ROCR-Runtime commit: b6cefa7bda]
2019-11-25 18:28:17 -05:00
Yong Zhao 44d016bc49 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>


[ROCm/ROCR-Runtime commit: cbe21fa261]
2019-11-25 18:25:23 -05:00
Felix Kuehling d89c9c1f64 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>


[ROCm/ROCR-Runtime commit: 8afdf52001]
2019-11-15 15:27:21 -05:00
Felix Kuehling 1ff1d4418d 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>


[ROCm/ROCR-Runtime commit: 0b7fcadc63]
2019-11-15 15:27:21 -05:00
Yong Zhao 471f9cf127 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>


[ROCm/ROCR-Runtime commit: a4d570fa2b]
2019-11-15 08:25:14 -05:00
Huang Rui d0c78bf4d5 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>


[ROCm/ROCR-Runtime commit: fdba74c2fb]
2019-11-14 20:02:53 -05:00
Philip Cox 5b008cefc8 kfdtest: Enable kfd debugger tests on gfx10
Change-Id: If3f86624c76805a6bc0e154d31b957eb63120418
Signed-off-by: Philip Cox <Philip.Cox@amd.com>


[ROCm/ROCR-Runtime commit: 6742e585be]
2019-11-13 08:29:46 -05:00
Yong Zhao 82c5ab47a6 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>


[ROCm/ROCR-Runtime commit: 4b36a1e728]
2019-11-08 19:00:37 -05:00
Yong Zhao d98400f647 kfdtest: Use GetSystemTickCountInMicroSec() as much as possible
GetSystemTickCountInMicroSec() wraps the function gettimeofday().

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


[ROCm/ROCR-Runtime commit: 174484aac3]
2019-11-07 18:21:04 -05:00
Philip Yang 44c020f2a3 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>


[ROCm/ROCR-Runtime commit: 2fa7d23a82]
2019-11-06 18:33:46 -05:00
Philip Yang bdb519bd35 libhsakmt: use the closest NUMA node to allocate queue ctx area
On NUMA system, allocate queue ctx save restore area on the closest NUMA
node to the GPU which the queue is going to run. This will improve
performance on NUMA system generally by reducing schedule latency and
fix the multi-node rccl-tests unstable performance issue.

If the closest NUMA node has no memory available, set flags NoNUMABind=1
to bypass mbind, to use default NUMA memory policy to allocate system
memory.



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


[ROCm/ROCR-Runtime commit: 59c857476f]
2019-11-06 17:33:26 -05:00
Ori Messinger 7fad396d95 Add non-priv PMC blocks to GFX10
This patch adds the non-privileged PMC blocks for GFX10/gfx1010.

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


[ROCm/ROCR-Runtime commit: e7f45fae8a]
2019-11-05 13:07:13 -05:00
Felix Kuehling 0e79756932 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>


[ROCm/ROCR-Runtime commit: 07b8c30ce8]
2019-11-01 18:31:28 -04:00
Felix Kuehling 7b3b7de7b6 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>


[ROCm/ROCR-Runtime commit: 664bb13bc4]
2019-11-01 18:30:52 -04:00
Felix Kuehling 1e6ec31611 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>


[ROCm/ROCR-Runtime commit: ea7619c929]
2019-11-01 18:30:52 -04:00
Felix Kuehling b6487541a6 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>


[ROCm/ROCR-Runtime commit: 12e4ea94f1]
2019-11-01 18:30:52 -04:00
Oak Zeng d5d66661f6 Handle IOCTL failure in fmm_release
FREE_MEMORY_OF_GPU ioctl could fail, e.g., if memory is still mapped
to GPU. Handle this failure by return error in fmm_release/HsaKmtFreeMemory

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


[ROCm/ROCR-Runtime commit: fa0cb9ebeb]
2019-11-01 08:59:05 -04:00
Oak Zeng 6b094ef4d8 Unmap memory from GPU before free
Change-Id: Ic33b17cbaee5de7908d37527254f4f146e6b71e3
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 7593b41575]
2019-11-01 08:58:55 -04:00
Jeremy Newton e9dd9ef156 libhsakmt: default packaging prefix to install
If CPACK_PACKAGING_INSTALL_PREFIX is not set, it's safer to assume it's the
same as CMAKE_INSTALL_PREFIX, incase only the latter is set.

Change-Id: I70727ebbc50f21f8d6e3add10d7f9f2d5e747dee
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>


[ROCm/ROCR-Runtime commit: cb4d4107ed]
2019-10-25 15:40:03 -04:00
Yong Zhao 4c3a63755c 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>


[ROCm/ROCR-Runtime commit: da9a404ac3]
2019-10-23 11:07:43 -04:00
Yong Zhao 35067d85fd 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>


[ROCm/ROCR-Runtime commit: ac5c433420]
2019-10-22 13:42:33 -04:00
Yong Zhao 54cc49ef1a 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>


[ROCm/ROCR-Runtime commit: 75c654cfea]
2019-10-22 13:41:44 -04:00
Yong Zhao 9bb602199c 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>


[ROCm/ROCR-Runtime commit: 98b0652917]
2019-10-22 11:23:33 -04:00
Yong Zhao e667ac8648 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>


[ROCm/ROCR-Runtime commit: ffbdb726ac]
2019-10-22 10:39:58 -04:00
Felix Kuehling e5c7385d3d libhsakmt: Fix installation path for pkg-config file
CMAKE_INSTALL_PREFIX would give incorrect result for packages
build by CPack.

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


[ROCm/ROCR-Runtime commit: bee47ab013]
2019-10-21 14:53:54 -04:00
Yong Zhao c1b8cb1464 libhsakmt: Add a message when a device is not supported
This helps to quickly triage problems.

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


[ROCm/ROCR-Runtime commit: ab2daf6538]
2019-10-20 12:44:13 -04:00
Yong Zhao 8b8f758dab libhsakmt: Add gfx1012 device IDs
Now the gfx1012 device IDs are okay to reveal.

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


[ROCm/ROCR-Runtime commit: 1c7755d2da]
2019-10-17 12:35:22 -04:00
Yong Zhao 3872b5ce32 libhsakmt: Print an error message when map_mmio failes
Without this change, the failure was hard to notice when it happened.

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


[ROCm/ROCR-Runtime commit: 16fa78b134]
2019-10-17 12:32:32 -04:00
Amber Lin 211742a1f7 libhsakmt: handle CPU cache info on non-NUMA sys
When CONFIG_NUMA is not enabled in the kernel config, only one CPU node
presents on the system and /sys/devices/system/node/nodeX directories
don't exist. Read CPU cache information from /sys/devices/system/cpu in
this situation.

Change-Id: I017ff17dd72678a0551edcc77446664501aa42ca
Signed-off-by: Amber Lin <Amber.Lin@amd.com>


[ROCm/ROCR-Runtime commit: 23541e0289]
2019-10-17 11:53:19 -04:00
Eric Huang 0cd804f8a0 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>


[ROCm/ROCR-Runtime commit: 0174377351]
2019-10-17 10:21:10 -04:00
Philip Cox 74fe695127 Remove debugger data reg accesses
The debug trap accesses the data0/data1 registers, so we do not
want the userspace to write values to it.  We remove the calls to
set the data0/data1 register values.

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


[ROCm/ROCR-Runtime commit: 6933540c81]
2019-10-10 14:32:54 -04:00
Philip Cox 00c5838996 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>


[ROCm/ROCR-Runtime commit: efe3769835]
2019-10-10 14:32:54 -04:00
Philip Cox 4c3e49f243 Add functions to get the kfd debugger version info
To support adding new features to the kfd debugger, and not break
functionality, we need to be able to check the kfd debugger support
version info from the kernel.

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


[ROCm/ROCR-Runtime commit: dbbd189b33]
2019-10-10 14:32:54 -04:00
Philip Cox 7c81389f01 Add kfd debugger version support
To check the KFD debugger API support, we need to be able to check
the major/minor version of the kfd debugger version, so we need to
expose this function from the kernel.

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


[ROCm/ROCR-Runtime commit: 35d56297d3]
2019-10-10 14:32:54 -04:00
Philip Cox 9f4f7af6bd 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>


[ROCm/ROCR-Runtime commit: b48f7d6ea3]
2019-10-10 12:50:12 -04:00
Oak Zeng 3a93aff9f3 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>


[ROCm/ROCR-Runtime commit: da789a2584]
2019-10-08 16:33:51 -05:00
Oak Zeng 46440857dc 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>


[ROCm/ROCR-Runtime commit: dadbbbb03c]
2019-10-04 11:09:19 -04:00
Oak Zeng eb2d7bcf18 Test new RW mtype for gfx908
Change-Id: Ia859c8f2e3c486f119772231a2d887f6783caf36
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: d7c53bb1fa]
2019-10-04 10:49:15 -04:00
Oak Zeng a5049eed1d Add gfx908 to asic family
Change-Id: I838aa4be45ddfb34c5d36c519e28b4218fc32ba4
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 51388973a1]
2019-10-04 10:45:02 -04:00
Cole Nelson 93f1d7e787 kfdtest.exclude: blacklist KFDEvictTest.BurstyTest for gfx908 (gfx908)
Change-Id: I5e1ac25c066ee20e34e102043d27eeab73313c6f
Signed-off-by: Cole Nelson <cole.nelson@amd.com>


[ROCm/ROCR-Runtime commit: 1ac8b5538c]
2019-10-02 14:06:50 -07:00