Date: Saturday, May 6, 2023 @ 10:45:27
  Author: tpkessler
Revision: 1458984

archrelease: copy trunk to community-staging-x86_64

Added:
  hsakmt-roct/repos/community-staging-x86_64/
  hsakmt-roct/repos/community-staging-x86_64/PKGBUILD
    (from rev 1458983, hsakmt-roct/trunk/PKGBUILD)
  hsakmt-roct/repos/community-staging-x86_64/test.cpp
    (from rev 1458983, hsakmt-roct/trunk/test.cpp)
  hsakmt-roct/repos/community-staging-x86_64/test.sh
    (from rev 1458983, hsakmt-roct/trunk/test.sh)

----------+
 PKGBUILD |   39 +++++++++++++++++++++++++++++++++++++++
 test.cpp |   27 +++++++++++++++++++++++++++
 test.sh  |    7 +++++++
 3 files changed, 73 insertions(+)

Copied: hsakmt-roct/repos/community-staging-x86_64/PKGBUILD (from rev 1458983, 
hsakmt-roct/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2023-05-06 10:45:27 UTC (rev 1458984)
@@ -0,0 +1,39 @@
+# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
+# Contributor: acxz <akashpatel2008 at yahoo dot com>
+# Contributor: Jakub Okoński <[email protected]>
+# Contributor: Olaf Leidinger <[email protected]>
+# Contributor: Ranieri Althoff <ranisalt+aur at gmail.com>
+
+pkgname=hsakmt-roct
+pkgver=5.5.0
+pkgrel=1
+pkgdesc='Radeon Open Compute Thunk Interface'
+arch=('x86_64')
+url='https://rocmdocs.amd.com/en/latest/Installation_Guide/ROCt.html'
+license=('MIT')
+depends=('numactl' 'pciutils' 'libdrm')
+makedepends=('cmake')
+_git='https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface'
+source=("${pkgname}-${pkgver}.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
+sha256sums=('2b11fd8937c2b06cd4ddea2c3699fbf3d1651892c4c5957d38553b993dd9af18')
+options=(!lto)
+_dirname="$(basename "$_git")-$(basename "${source[0]}" .tar.gz)"
+
+build() {
+  cmake \
+    -B build \
+    -Wno-dev \
+    -S "$_dirname" \
+    -DCMAKE_BUILD_TYPE=None \
+    -DBUILD_SHARED_LIBS=ON \
+    -DCMAKE_INSTALL_PREFIX=/opt/rocm
+  cmake --build build
+}
+
+package() {
+  DESTDIR="$pkgdir" cmake --install build
+
+  install -Dm644 "$_dirname/LICENSE.md" 
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  echo '/opt/rocm/lib' > "$pkgname.conf"
+  install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
+}

Copied: hsakmt-roct/repos/community-staging-x86_64/test.cpp (from rev 1458983, 
hsakmt-roct/trunk/test.cpp)
===================================================================
--- community-staging-x86_64/test.cpp                           (rev 0)
+++ community-staging-x86_64/test.cpp   2023-05-06 10:45:27 UTC (rev 1458984)
@@ -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();
+}

Copied: hsakmt-roct/repos/community-staging-x86_64/test.sh (from rev 1458983, 
hsakmt-roct/trunk/test.sh)
===================================================================
--- community-staging-x86_64/test.sh                            (rev 0)
+++ community-staging-x86_64/test.sh    2023-05-06 10:45:27 UTC (rev 1458984)
@@ -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

Reply via email to