summarylogtreecommitdiffstats
path: root/test.cpp
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 /test.cpp
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.
Diffstat (limited to 'test.cpp')
-rw-r--r--test.cpp27
1 files changed, 27 insertions, 0 deletions
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();
+}