summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorsten Keßler2022-12-12 11:29:15 +0100
committerTorsten Keßler2022-12-12 11:29:15 +0100
commitf4b6b5c2e76f749c4e23349febca1991a08aa5c5 (patch)
treebc304983cb57470eb56460d65b31cd996c78fcd6
parent914ab7f9e1de0446209e43a9400c5e7315adfe53 (diff)
downloadaur-f4b6b5c2e76f749c4e23349febca1991a08aa5c5.tar.gz
upgpkg: hsakmt-roct 5.4.0-2
Remove check() function as it's not working on all platforms (needs recent AMD GPU). To check correctness of installation a simple test case is added to be called after the installation of the package.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD23
-rw-r--r--test.cpp27
-rwxr-xr-xtest.sh7
4 files changed, 36 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8a1a2b42ad41..2151d4eb342f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = hsakmt-roct
pkgdesc = Radeon Open Compute Thunk Interface
pkgver = 5.4.0
- pkgrel = 1
+ pkgrel = 2
url = https://rocmdocs.amd.com/en/latest/Installation_Guide/ROCt.html
arch = x86_64
license = MIT
diff --git a/PKGBUILD b/PKGBUILD
index dc1429026ca5..f273acc84689 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=hsakmt-roct
pkgver=5.4.0
-pkgrel=1
+pkgrel=2
pkgdesc='Radeon Open Compute Thunk Interface'
arch=('x86_64')
url='https://rocmdocs.amd.com/en/latest/Installation_Guide/ROCt.html'
@@ -31,27 +31,6 @@ build() {
cmake --build build
}
-check() {
- local _tmpdir="$(mktemp -d -p $_dirname)"
- DESTDIR="$_tmpdir" cmake --install build
-
- LIBHSAKMT_PATH="$srcdir/$_tmpdir/opt/rocm" \
- cmake \
- -B kfd-build \
- -Wno-dev \
- -S "$_dirname/tests/kfdtest" \
- -DCMAKE_BUILD_TYPE=None \
- -DLLVM_DIR=/opt/rocm/llvm/lib/cmake/llvm \
- -DCMAKE_LINK_DIRECTORIES_BEFORE=ON
- cmake --build kfd-build
-
- cd kfd-build
- # Stress tests cause system crash,
- # https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/issues/76
- LD_LIBRARY_PATH="$srcdir/$_tmpdir/opt/rocm" \
- ./run_kfdtest.sh -e "KFDMemoryTest.LargestSysBufferTest:KFDMemoryTest.BigSysBufferStressTest:KFDQMTest.CreateQueueStressSingleThreaded"
-}
-
package() {
DESTDIR="$pkgdir" cmake --install build
diff --git a/test.cpp b/test.cpp
new file mode 100644
index 000000000000..ff143a913c59
--- /dev/null
+++ b/test.cpp
@@ -0,0 +1,27 @@
+#include <hsakmt/hsakmt.h>
+#include <iostream>
+
+int main()
+{
+ HsaVersionInfo info;
+ HsaSystemProperties prop;
+
+ hsaKmtOpenKFD();
+
+ hsaKmtGetVersion(&info);
+
+ std::cout << "HSA version " << info.KernelInterfaceMajorVersion
+ << "." << info.KernelInterfaceMinorVersion << "\n";
+
+ hsaKmtAcquireSystemProperties(&prop);
+
+ std::cout << "Topology information:\n"
+ << "Number of memory nodes: " << prop.NumNodes << "\n"
+ << "Platform OEM: " << prop.PlatformOem << "\n"
+ << "Platform ID: " << prop.PlatformId << "\n"
+ << "Platform Revision: " << prop.PlatformRev << "\n";
+
+ hsaKmtReleaseSystemProperties();
+
+ hsaKmtCloseKFD();
+}
diff --git a/test.sh b/test.sh
new file mode 100755
index 000000000000..d857a5905e87
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+
+OUT=$(mktemp -d)
+CXX=/usr/bin/g++
+
+$CXX -I/opt/rocm/include -o "$OUT/test" test.cpp -L/opt/rocm/lib -lhsakmt
+"$OUT"/test