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

487 Коммитов

Автор SHA1 Сообщение Дата
Andreas Schneider 4006e1f112 cmake: Create cmake config file
Another cmake project like hsa-runtime could just use:

find_package(hsakmt REQUIRED 1.9.0)

Change-Id: Ia1c9a80ef287facdd607382d69649b0718d687b4


[ROCm/ROCR-Runtime commit: b8a1331763]
2019-04-03 08:36:09 -04:00
Tom Stellard 540fa908f6 Separate build version from library version
This patch separates the build version (i.e. ROCm version) from the
library version used to set the SONAME of the shared objects.  This
prevents the SONAME from getting bumped each time there is a new ROCm
release without any change to the libhsakmt ABI.

1.0.6 was choosen as the library version since this was the
last library version used prior to switching to the ROCm version
numbers.

Change-Id: I7c29ae84d8a362a831e804569d8147ca65155cad


[ROCm/ROCR-Runtime commit: 006c2c248d]
2019-02-28 21:32:45 -08:00
Eric Huang cec44d33c9 kfdtest: fix and change in RAS test
1. RAS error injection debugfs interface has been changed which
is using ras_ctrl instead of *_err_inject.

2. Remove ASSERT_SUCCESS for fwrite, because fwrite returns
the size of written item but not the error number.

3. Using throw exception instead of return to avoid a segment fault.

Change-Id: I6c4d9c2f7e66719faec99abd1552105a08c238a4
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>


[ROCm/ROCR-Runtime commit: e5b215570b]
2019-03-29 11:00:01 -04:00
Eric Huang 6e93266f63 libhsakmt: update kfd_ioctl.h regarding RAS interface
It is aligned with RAS changes in KFD.

Change-Id: I52816da01a4001158a40a1207d1fbe6ec3271343
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>


[ROCm/ROCR-Runtime commit: d6cde5bf08]
2019-03-28 21:38:44 -04:00
Sean Keely 80ffb43205 Add hsaKmtRegisterMemoryWithFlags.
API follows hsaKmtRegisterMemory but allows passing HsaMemFlags.

Change-Id: I66a230a87c8b085f27c769bdf2cb4d0d96a5d6dd


[ROCm/ROCR-Runtime commit: c7f1277013]
2019-03-28 17:17:40 -04:00
Kent Russell 5de58e1ab2 libhsakmt: Add Vega M support
While this may not be supported in the runtime, the kernel/firmware
support it

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


[ROCm/ROCR-Runtime commit: 1304a92e17]
2019-03-21 08:05:47 -04:00
Kent Russell 14676959fb libhsakmt: Add another gfx902 GPU ID
Change-Id: I967f16bf548171df73d2e721f16c1aac52e99852
Signed-off-by: Kent Russell <kent.russell@amd.com>


[ROCm/ROCR-Runtime commit: c7439a0039]
2019-03-21 08:05:47 -04:00
Philip Yang c140f95b1b Revert "kfdtest.exclude: Temporarily blacklist IPC on gfx900"
This reverts commit a349805264.

Fixes for HMM change corner cases are merged in from drm-next.
Tests are passed on gfx900 with the latest amd-kfd-staging.

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


[ROCm/ROCR-Runtime commit: 0bd9f35563]
2019-03-18 10:10:00 -04:00
Amber Lin bc0bc878f4 libhsakmt: Fix missing apicid in topology
While adding x2APIC support, apicid for non-x2apic was missing out by
mistake.



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


[ROCm/ROCR-Runtime commit: cfa47ac1f9]
2019-03-11 13:05:37 -04:00
Oak Zeng 1efba15c34 Introduce XGMI SDMA queue type
Change-Id: I8c6ff04f92c2bbea0bab94ddb8cc4cceb5d74d02
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 1046a1fd72]
2019-03-07 19:42:20 -05:00
Oak Zeng f77c754281 Thunk interface to get SDMA engine info
Add SDMA engine info fields to node properties and
modify get node properties API to read SDMA engine
info from sysfs

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


[ROCm/ROCR-Runtime commit: 414a3508d6]
2019-03-07 14:09:43 -05:00
Oak Zeng a75addec83 Use latest kfd_ioctl.h
A new SDMA queue type for XGMI was added

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


[ROCm/ROCR-Runtime commit: e4109de26d]
2019-03-07 13:25:33 -05:00
Amber Lin ee54c2ec5a libhsakmt: Support x2APIC in topology
Current processor/cache topology code implements xAPIC architecture, which
is 8 bits addressability. This is not enough for a system having more than
255 processors. x2APIC is the extension of xAPIC architecture to support
32 bit addressability of processors. This patch detects the x2APIC
enablement and uses the extension leaf to get apicid when detected.

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


[ROCm/ROCR-Runtime commit: f8028a40fd]
2019-03-01 16:42:30 -05:00
Kent Russell a349805264 kfdtest.exclude: Temporarily blacklist IPC on gfx900
Due to the recent HMM changes, the KFDIPCTest can intermittently fail,
combined with CrossMemoryAttach consistently failing. Remove it for now
while Philip Yang investigates

Change-Id: Icf272100bb7882eff4202ad6f4ced63b569f4e7d


[ROCm/ROCR-Runtime commit: d00ec779ce]
2019-02-28 07:29:47 -05:00
Kent Russell 16d110f9c1 Temporarily remove CMATest from gfx900
Per Philip Yang:
For forked child process, userptr allocated on heap (through malloc)
will have two vmas if child process malloc smaller size buf, free it,
this is on vma cloned from parent process. Then malloc larger size buf,
kernel will put some pages on previous freed space from vma cloned,
create new vma for the rest of pages. This is what IPCTest does.

Change-Id: I054771e20880f975d7cc774225f19aad5363843f


[ROCm/ROCR-Runtime commit: a0b8dd8462]
2019-02-27 07:05:42 -05:00
Yong Zhao c326949ac7 kfdtest: Add a result check in CreateCpQueue test
With the orginal code, CreateCpQueue will report failure if
WaitOnValue return false. Add EXPECT_TRUE() so that in that case
the failure is reported.

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


[ROCm/ROCR-Runtime commit: 1d478f3cf2]
2019-02-21 17:42:45 -05:00
Eric Huang 658a1d8f41 kfdtest: add RAS tests
They are disabled for now.

Change-Id: I9c936130cbaf8c773f4b8e94bccf4af1f45eda65
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>


[ROCm/ROCR-Runtime commit: 7349276860]
2019-02-15 15:03:32 -05:00
Philip Cox 9c9641cc47 kfdtest: Blacklist BasicDebuggerSuspendResume
We need to black list this testcase temporarily because
it is failing intermittently.  The failure tends to only happen
when the certain build machine is used to build it.

This issue is being tracked by Jira ticket:
    ROCMOPS-389

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


[ROCm/ROCR-Runtime commit: 90a3697e1d]
2019-02-13 10:45:20 -05:00
Philip Cox c60888f043 kfdtest: Initial basic dbg suspend/resume testcase
A basic sanity test that tests the codepath for
the debugger suspend and resume code path.

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


[ROCm/ROCR-Runtime commit: ac6f089f26]
2019-02-08 11:28:33 -05:00
Yong Zhao 6394a52ab4 libhsakmt: Use a better name doorbell_mmap_offset
The previous name doorbell_offset is used too extensively throughout
the code and did not reflect the true usage.

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


[ROCm/ROCR-Runtime commit: 776077fe65]
2019-01-31 14:50:04 -05:00
Yong Zhao 24f85f70de kfdtest: Use SDMA queue info from class KFDBaseComponentTest
Change-Id: Iacdb75006ef5f9ce6c4fbb0525d2c3a8535fdd23
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 7cd7830182]
2019-01-31 14:00:57 -05:00
Yong Zhao 112269ed7f kfdtest: Include SDMA queue info in class KFDBaseComponentTest
This will facilitate us to avoid using family ID to differentiate the
SDMA engines and SDMA queues.

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


[ROCm/ROCR-Runtime commit: 6857602cbc]
2019-01-31 14:00:57 -05:00
Yong Zhao 39ef88d37f libhsakmt: Introduce HSA_ZFB environment variable
This variable is 0 by default. When set to 1, it means there is no frame
buffer, so all memory allocation is routed to system memory. This mode
is mainly used during emulation.

Use CoarseGrain for VRAM under ZFB mode

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


[ROCm/ROCR-Runtime commit: 51ee5c324a]
2019-01-29 19:46:26 -05:00
xinhui pan 83a8534e4b thunk: fix size overflow
Some test case alloc >4gb memory.
Use HSAuint64 in bytes and HSAuint32 in pages.

Change-Id: I0d5e6c299903b5898cfea024178a7a26b9ba3c90
Signed-off-by: xinhui pan <xinhui.pan@amd.com>


[ROCm/ROCR-Runtime commit: 41bf449e99]
2019-01-28 10:49:45 -05:00
Jay Cornwall 6f73e10cb2 Set EOP buffer TC policy to non-coherent
Restores regression in dispatch latency.

Change-Id: I17869d3d515d8c1fa055a57afec2531903b88b16
Signed-off-by: Jay Cornwall <Jay.Cornwall@amd.com>


[ROCm/ROCR-Runtime commit: b764991982]
2019-01-23 12:21:01 -05:00
Oak Zeng dfb65fe0fe Delete a few SDMA queue types
The design changed. Those are not needed any more

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


[ROCm/ROCR-Runtime commit: faba8950d4]
2019-01-22 14:49:05 -06:00
Oak Zeng e7cd301ab5 Revert "Add more SDMA queue type"
This reverts commit b87f8459f4.

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


[ROCm/ROCR-Runtime commit: dd6c6e7bc6]
2019-01-21 10:37:56 -06:00
Oak Zeng f7692c4f13 Revert "Create SDMA queue on specific engine"
This reverts commit f0eb1573e6.

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


[ROCm/ROCR-Runtime commit: 124f77775c]
2019-01-21 10:37:46 -06:00
Oak Zeng 6da54291bf Revert "Create SDMA queue on specific engine"
This reverts commit 6087fd7bca.

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


[ROCm/ROCR-Runtime commit: 1923d2e335]
2019-01-21 10:37:32 -06:00
Oak Zeng c622a2d220 Revert "Add test to allocate SDMA queue on specific engine"
This reverts commit 5d15953efb.

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


[ROCm/ROCR-Runtime commit: 742fa5d871]
2019-01-21 10:36:54 -06:00
Philip Cox fa45791c1a Initial gfx9 debugger node suspend/resume
Change-Id: I2a5dac3d02265c11f5b6985ab457e2d1caa0a033
Signed-off-by: Philip Cox <Philip.Cox@amd.com>


[ROCm/ROCR-Runtime commit: 37858f2311]
2019-01-11 09:00:54 -05:00
Philip Yang 4d5fb9f80e kfdtest: increase KFDPerformanceTest.P2PBandWidthTest timeout value
KFDPerformanceTest.P2PBandWidthTest[push, push] takes about 3 seconds
on 4 gfx906, the default g_TestTimeout 2 seconds is not enough to wait
for sDMA queue rptr is consumed. Use kfdtest command line option
--timeout=6000, the test is finished and result is reasonable twice as
P2PBandWidthTest[push, none]. Change P2PBandWidthTest wait timeout to 6
seconds.

Add timeout argument to function WaitOnValue, BaseQueue.Wait4PacketConsumption
SDMAQueue.Wait4PacketConsumption, PM4Queue.Wait4PacketConsumption with
default value is g_TestTimeOut.

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


[ROCm/ROCR-Runtime commit: b2e026fce3]
2019-01-04 12:53:55 -05:00
Kent Russell 0cf61d242b Add lib requirement in CMake file
Adding it to the DEBIAN/control won't work, since we use CMake to build
it. Add all required packages to the CMakeLists file

Change-Id: Iaf62f42e0f998d66038338fb2cf793d29c790205


[ROCm/ROCR-Runtime commit: 666f90440a]
2019-01-02 07:50:12 -05:00
Yong Zhao 5f38525112 Add -fPIC flag when building sp3 library
This will support the sp3 library built on one gcc version to be
compatible with another gcc version.

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


[ROCm/ROCR-Runtime commit: 81b8815e1a]
2018-12-13 18:32:23 -05:00
Eric Huang 616392b642 libhsakmt: add RAS support v2
RAS feature enabling bit and errors return are implemented in
existed topology and event mechanism.

v2: change library interface.

Change-Id: I75807c080b5b26e8115240b05b3d7016cb05a31a
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>


[ROCm/ROCR-Runtime commit: 8ee93b3187]
2018-12-13 10:17:12 -05:00
Kent Russell c0fa8baec2 kfdtest: Add gfx900/gfx906 IDs to run_kfdtest.sh
Change-Id: Ib6ee418a432d1de79e2306b54d702132de3d06c5


[ROCm/ROCR-Runtime commit: bcc348e3b9]
2018-12-12 08:38:01 -05:00
Kent Russell 1e7469c682 libhsakmt: Add new gfx900 and gfx906 GPU IDs
Change-Id: I93b2b845c3edb2da55235a56516a851145745988


[ROCm/ROCR-Runtime commit: 53439669d9]
2018-12-12 08:36:40 -05:00
Eric Huang 58c2f26d25 Revert "libhsakmt: add RAS support"
This reverts commit 56b9bb17a7.

Change-Id: I739b17e057f2a8a0f4375741955209d2477c704a
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>


[ROCm/ROCR-Runtime commit: 29d11d02e8]
2018-12-08 19:42:33 -05:00
Kent Russell 34e6346848 Add more SDMA-related tests to SDMA_BLACKLIST
These tests all make use of an SDMAQueue in one way or another, so add
them to the SDMA_BLACKLIST to be 100% certain

Change-Id: Ic29e073c2f46249f3e5918145b13d276aec7bb33


[ROCm/ROCR-Runtime commit: 54807526b9]
2018-12-06 14:07:50 -05:00
Kent Russell 931dd817fa Add ZeroInitializationVram test to SDMA blacklist
This test uses SDMA, so add it to the SDMA list

Change-Id: I2dc2b0c4328e38e593d455de2103ebe1ef0adbc2


[ROCm/ROCR-Runtime commit: aa7c13264a]
2018-12-06 11:14:26 -05:00
Kent Russell 4a068e18dd Temporarily remove SDMA tests from gfx906
SDMA is being flaky, so remove SDMA tests from it for now

Change-Id: Ia3612566813f925804ab90d6235520da7cc65926


[ROCm/ROCR-Runtime commit: 3a2ec0111e]
2018-12-05 08:41:16 -05:00
Kent Russell 18f1cc0e5b Remove SDMAConcurrentCopies from gfx906 execution
This is intermittently causing VM faults and excessive evictions, which
causes the rest of the tests to fail. Take it out for now until someone
can investigate

Change-Id: I9c43890bc9f03a4a31efbc18df0df5e40a232c58


[ROCm/ROCR-Runtime commit: 381dba3932]
2018-11-28 10:01:35 -05:00
Eric Huang 56b9bb17a7 libhsakmt: add RAS support
RAS feature enabling bit and errors return are implemented in
existed topology and event mechanism.

Change-Id: I9b018bba80cf4a6998e42a7bff64318c689b1d2a
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>


[ROCm/ROCR-Runtime commit: 1fbe010354]
2018-11-23 11:42:34 -05:00
changzhu 6ab4bbe2a8 kfdtest: fix SDMACopyParams build error on redhat 7.2 in KFDTestUtilQueue.cpp
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /home/jenkins/libhsakmt/tests/kfdtest/src/KFDTestUtilQueue.cpp:24:
/usr/include/c++/4.8.2/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<SDMACopyParams*, std::vector<SDMACopyParams> >; _Tp = SDMACopyParams; _Compare = bool (*)(SDMACopyParams&, SDMACopyParams&)]’:
/usr/include/c++/4.8.2/bits/stl_algo.h:2296:78:   required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<SDMACopyParams*, std::vector<SDMACopyParams> >; _Compare = bool (*)(SDMACopyParams&, SDMACopyParams&)]’
/usr/include/c++/4.8.2/bits/stl_algo.h:2337:62:   required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<SDMACopyParams*, std::vector<SDMACopyParams> >; _Size = long int; _Compare = bool (*)(SDMACopyParams&, SDMACopyParams&)]’
/usr/include/c++/4.8.2/bits/stl_algo.h:5499:44:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<SDMACopyParams*, std::vector<SDMACopyParams> >; _Compare = bool (*)(SDMACopyParams&, SDMACopyParams&)]’
/home/jenkins/libhsakmt/tests/kfdtest/src/KFDTestUtilQueue.cpp:351:66:   required from here
/usr/include/c++/4.8.2/bits/stl_algo.h:2263:35: error: invalid initialization of reference of type ‘SDMACopyParams&’ from expression of type ‘const SDMACopyParams’
    while (__comp(*__first, __pivot))
                                   ^
/usr/include/c++/4.8.2/bits/stl_algo.h:2266:34: error: invalid initialization of reference of type ‘SDMACopyParams&’ from expression of type ‘const SDMACopyParams’
    while (__comp(__pivot, *__last))
                                  ^

Change-Id: I0fce0c7e6d0a0ce93b1e6522ee8f216615765568
Signed-off-by: changzhu <Changfeng.Zhu@amd.com>


[ROCm/ROCR-Runtime commit: c15cf2e9c3]
2018-11-21 17:23:03 +08:00
Oak Zeng 5d15953efb Add test to allocate SDMA queue on specific engine
Change-Id: I5b5140e4119fc01db250d63cca7389cf80ec0d16
Signed-off-by: Oak Zeng <ozeng@amd.com>


[ROCm/ROCR-Runtime commit: af5b320c47]
2018-11-20 11:17:43 -05:00
shaoyunl 0ad77ef647 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>


[ROCm/ROCR-Runtime commit: d8009b4fd3]
2018-11-19 16:09:31 -05:00
shaoyunl a8af1e5e56 Thunk: make scratch memory only map to its own GPU
Map scratch memory to the GPU that specified when allocate the memory

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


[ROCm/ROCR-Runtime commit: 29b45b8c0a]
2018-11-19 10:26:31 -05:00
Oak Zeng 6087fd7bca Create SDMA queue on specific engine
Change-Id: Iece03795510d66b03324174203faa0ac9eb4fb7d
Signed-off-by: Oak Zeng <ozeng@amd.com>


[ROCm/ROCR-Runtime commit: acb80d7583]
2018-11-13 14:52:57 -05:00
Oak Zeng 6c760dcb74 Move m_Type to a local variable
BaseQueue class has a member function GetQueueType so m_Type
is duplicated.  m_Type is only used in one function. Move it to
a local variable.

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


[ROCm/ROCR-Runtime commit: 8d65e72045]
2018-11-13 14:52:17 -05:00
Oak Zeng f0eb1573e6 Create SDMA queue on specific engine
Change-Id: Id651ececda55b81b45e991bd8e6616674be48d8e
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 58b95e0a9d]
2018-11-13 14:52:17 -05:00