Date: Saturday, January 28, 2023 @ 08:43:54
  Author: tpkessler
Revision: 1389071

archrelease: copy trunk to community-testing-x86_64

Added:
  hip-runtime-amd/repos/community-testing-x86_64/PKGBUILD
    (from rev 1389070, hip-runtime-amd/trunk/PKGBUILD)
  hip-runtime-amd/repos/community-testing-x86_64/test.cpp
    (from rev 1389070, hip-runtime-amd/trunk/test.cpp)
  hip-runtime-amd/repos/community-testing-x86_64/test.sh
    (from rev 1389070, hip-runtime-amd/trunk/test.sh)
Deleted:
  hip-runtime-amd/repos/community-testing-x86_64/PKGBUILD
  hip-runtime-amd/repos/community-testing-x86_64/test.cpp
  hip-runtime-amd/repos/community-testing-x86_64/test.sh

----------+
 PKGBUILD |  116 ++++++++++++++++++++++++++---------------------------
 test.cpp |  132 ++++++++++++++++++++++++++++++-------------------------------
 test.sh  |   12 ++---
 3 files changed, 130 insertions(+), 130 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2023-01-28 08:43:42 UTC (rev 1389070)
+++ PKGBUILD    2023-01-28 08:43:54 UTC (rev 1389071)
@@ -1,58 +0,0 @@
-# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
-# Contributor: acxz <akashpatel2008 at yahoo dot com>
-pkgname=hip-runtime-amd
-pkgver=5.4.2
-pkgrel=2
-pkgdesc="Heterogeneous Interface for Portability ROCm"
-arch=('x86_64')
-url='https://docs.amd.com/bundle/HIP-Programming-Guide-v5.4/page/Introduction_to_HIP_Programming_Guide.html'
-license=('MIT')
-depends=('mesa' 'comgr' 'rocminfo' 'rocm-llvm' 'libelf')
-makedepends=('cmake' 'python' 'python-cppheaderparser')
-provides=('hip')
-conflicts=('hip')
-_hip='https://github.com/ROCm-Developer-Tools/HIP'
-_opencl='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime'
-_rocclr='https://github.com/ROCm-Developer-Tools/ROCclr'
-_hipamd='https://github.com/ROCm-Developer-Tools/hipamd'
-source=("$pkgname-$pkgver.tar.gz::$_hip/archive/rocm-$pkgver.tar.gz"
-        "$pkgname-opencl-$pkgver.tar.gz::$_opencl/archive/rocm-$pkgver.tar.gz"
-        "$pkgname-rocclr-$pkgver.tar.gz::$_rocclr/archive/rocm-$pkgver.tar.gz"
-        "$pkgname-hipamd-$pkgver.tar.gz::$_hipamd/archive/rocm-$pkgver.tar.gz")
-sha256sums=('e3f9cac24f06863e206a97da8ec8ef77cfee56aa1873bdc1bd7b4c9958450fd0'
-            '6b8b507fe71a6ebc3334296a3564ae325e5a9abc707c737c9d8e761e0182b1f1'
-            '0eab4f21e864f061de969760811fb3806833f8f918ee9c294bc6d29f8230fefe'
-            '2fecf069c783bfe3c1ed611540f4b10b398c5b47c9e33c09815457d48d7f029c')
-_dirhip="$(basename "$_hip")-$(basename "${source[0]}" ".tar.gz")"
-_diropencl="$(basename "$_opencl")-$(basename "${source[1]}" ".tar.gz")"
-_dirrocclr="$(basename "$_rocclr")-$(basename "${source[2]}" ".tar.gz")"
-_dirhipamd="$(basename "$_hipamd")-$(basename "${source[3]}" ".tar.gz")"
-
-build() {
-  # build fails if cmake and make are called from outside the build directory
-  mkdir build && cd build
-
-  # Disable assertations as a temporary workaround for hipRTC
-  # 
https://github.com/ROCmSoftwarePlatform/rocFFT/issues/389#issuecomment-1341370581
-  CXXFLAGS="$CXXFLAGS -DNDEBUG" \
-  cmake \
-    -Wno-dev \
-    -S "$srcdir/$_dirhipamd" \
-    -DHIP_COMMON_DIR="$srcdir/$_dirhip" \
-    -DAMD_OPENCL_PATH="$srcdir/$_diropencl" \
-    -DROCCLR_PATH="$srcdir/$_dirrocclr" \
-    -DHIP_PLATFORM=amd \
-    -DCMAKE_BUILD_TYPE=None \
-    -DROCM_DIR=/opt/rocm \
-    -DCMAKE_INSTALL_PREFIX=/opt/rocm
-
-  cmake --build .
-}
-
-package() {
-  DESTDIR="$pkgdir" cmake --install build
-
-  install -Dm644 "$srcdir/$_dirhip/LICENSE.txt" 
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-  echo '/opt/rocm/hip/lib' > "$pkgname.conf"
-  install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
-}

Copied: hip-runtime-amd/repos/community-testing-x86_64/PKGBUILD (from rev 
1389070, hip-runtime-amd/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2023-01-28 08:43:54 UTC (rev 1389071)
@@ -0,0 +1,58 @@
+# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
+# Contributor: acxz <akashpatel2008 at yahoo dot com>
+pkgname=hip-runtime-amd
+pkgver=5.4.2
+pkgrel=3
+pkgdesc="Heterogeneous Interface for Portability ROCm"
+arch=('x86_64')
+url='https://docs.amd.com/bundle/HIP-Programming-Guide-v5.4/page/Introduction_to_HIP_Programming_Guide.html'
+license=('MIT')
+depends=('mesa' 'comgr' 'rocminfo' 'rocm-llvm' 'libelf')
+makedepends=('cmake' 'python' 'python-cppheaderparser')
+provides=('hip')
+conflicts=('hip')
+_hip='https://github.com/ROCm-Developer-Tools/HIP'
+_opencl='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime'
+_rocclr='https://github.com/ROCm-Developer-Tools/ROCclr'
+_hipamd='https://github.com/ROCm-Developer-Tools/hipamd'
+source=("$pkgname-$pkgver.tar.gz::$_hip/archive/rocm-$pkgver.tar.gz"
+        "$pkgname-opencl-$pkgver.tar.gz::$_opencl/archive/rocm-$pkgver.tar.gz"
+        "$pkgname-rocclr-$pkgver.tar.gz::$_rocclr/archive/rocm-$pkgver.tar.gz"
+        "$pkgname-hipamd-$pkgver.tar.gz::$_hipamd/archive/rocm-$pkgver.tar.gz")
+sha256sums=('e3f9cac24f06863e206a97da8ec8ef77cfee56aa1873bdc1bd7b4c9958450fd0'
+            '6b8b507fe71a6ebc3334296a3564ae325e5a9abc707c737c9d8e761e0182b1f1'
+            '0eab4f21e864f061de969760811fb3806833f8f918ee9c294bc6d29f8230fefe'
+            '2fecf069c783bfe3c1ed611540f4b10b398c5b47c9e33c09815457d48d7f029c')
+_dirhip="$(basename "$_hip")-$(basename "${source[0]}" ".tar.gz")"
+_diropencl="$(basename "$_opencl")-$(basename "${source[1]}" ".tar.gz")"
+_dirrocclr="$(basename "$_rocclr")-$(basename "${source[2]}" ".tar.gz")"
+_dirhipamd="$(basename "$_hipamd")-$(basename "${source[3]}" ".tar.gz")"
+
+build() {
+  # build fails if cmake and make are called from outside the build directory
+  mkdir build && cd build
+
+  # Disable assertations as a temporary workaround for hipRTC
+  # 
https://github.com/ROCmSoftwarePlatform/rocFFT/issues/389#issuecomment-1341370581
+  CXXFLAGS="$CXXFLAGS -DNDEBUG" \
+  cmake \
+    -Wno-dev \
+    -S "$srcdir/$_dirhipamd" \
+    -DHIP_COMMON_DIR="$srcdir/$_dirhip" \
+    -DAMD_OPENCL_PATH="$srcdir/$_diropencl" \
+    -DROCCLR_PATH="$srcdir/$_dirrocclr" \
+    -DHIP_PLATFORM=amd \
+    -DCMAKE_BUILD_TYPE=None \
+    -DROCM_DIR=/opt/rocm \
+    -DCMAKE_INSTALL_PREFIX=/opt/rocm
+
+  cmake --build .
+}
+
+package() {
+  DESTDIR="$pkgdir" cmake --install build
+
+  install -Dm644 "$srcdir/$_dirhip/LICENSE.txt" 
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  echo '/opt/rocm/hip/lib' > "$pkgname.conf"
+  install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
+}

Deleted: test.cpp
===================================================================
--- test.cpp    2023-01-28 08:43:42 UTC (rev 1389070)
+++ test.cpp    2023-01-28 08:43:54 UTC (rev 1389071)
@@ -1,66 +0,0 @@
-#include <iostream>
-#include <cmath>
-#include <vector>
-#include <hip/hip_runtime.h>
-
-__global__
-void saxpy(int n, float a, const float *x, float *y)
-{
-    int i = hipThreadIdx_x + hipBlockDim_x * hipBlockIdx_x;
-    if(i < n){
-        y[i] = a * x[i] + y[i];
-    }
-}
-
-__global__
-void sset(int n, float a, float *x)
-{
-    int i = hipThreadIdx_x + hipBlockDim_x * hipBlockIdx_x;
-    if(i < n){
-        x[i] = a;
-    }
-}
-
-int main()
-{
-    hipDeviceProp_t prop;
-    hipGetDeviceProperties(&prop, 0);
-    std::cout << "Agent " << prop.name << "\n";
-    std::cout << "System version " << prop.major
-        << "." << prop.minor << "\n";
-
-    int n = 1024;
-    float *x;
-    float *y;
-    hipMalloc((void**)&x, sizeof *x * n);
-    hipMalloc((void**)&y, sizeof *y * n);
-
-    std::vector<float> xin(n);
-    for(int i = 0; i < n; i++){
-        xin[i] = -1.0 + 2.0 * i / n;
-    }
-    hipMemcpy(x, xin.data(), sizeof *x * n, hipMemcpyHostToDevice);
-
-    float ac = -14.412f;
-    hipLaunchKernelGGL(sset, dim3(1), dim3(n), 0, 0, n, ac, y);
-
-    float a = 5321.124f;
-    hipLaunchKernelGGL(saxpy, dim3(1), dim3(n), 0, 0, n, a, x, y);
-
-    std::vector<float> yout(n);
-    hipMemcpy(yout.data(), y, sizeof *y * n, hipMemcpyDeviceToHost);
-
-    hipFree(x);
-    hipFree(y);
-
-    for(int i = 0; i < n; i++){
-        yout[i] -= a * xin[i];
-        if(std::abs(yout[i] - ac) > 0.001f){
-            std::cout << "Test failed at index " << i
-                << " with entry " << yout[i]
-                << " (" << ac << ")\n";
-            return 1;
-        }
-    }
-    std::cout << "TESTS PASSED!" << std::endl;
-}

Copied: hip-runtime-amd/repos/community-testing-x86_64/test.cpp (from rev 
1389070, hip-runtime-amd/trunk/test.cpp)
===================================================================
--- test.cpp                            (rev 0)
+++ test.cpp    2023-01-28 08:43:54 UTC (rev 1389071)
@@ -0,0 +1,66 @@
+#include <iostream>
+#include <cmath>
+#include <vector>
+#include <hip/hip_runtime.h>
+
+__global__
+void saxpy(int n, float a, const float *x, float *y)
+{
+    int i = hipThreadIdx_x + hipBlockDim_x * hipBlockIdx_x;
+    if(i < n){
+        y[i] = a * x[i] + y[i];
+    }
+}
+
+__global__
+void sset(int n, float a, float *x)
+{
+    int i = hipThreadIdx_x + hipBlockDim_x * hipBlockIdx_x;
+    if(i < n){
+        x[i] = a;
+    }
+}
+
+int main()
+{
+    hipDeviceProp_t prop;
+    hipGetDeviceProperties(&prop, 0);
+    std::cout << "Agent " << prop.name << "\n";
+    std::cout << "System version " << prop.major
+        << "." << prop.minor << "\n";
+
+    int n = 1024;
+    float *x;
+    float *y;
+    hipMalloc((void**)&x, sizeof *x * n);
+    hipMalloc((void**)&y, sizeof *y * n);
+
+    std::vector<float> xin(n);
+    for(int i = 0; i < n; i++){
+        xin[i] = -1.0 + 2.0 * i / n;
+    }
+    hipMemcpy(x, xin.data(), sizeof *x * n, hipMemcpyHostToDevice);
+
+    float ac = -14.412f;
+    hipLaunchKernelGGL(sset, dim3(1), dim3(n), 0, 0, n, ac, y);
+
+    float a = 5321.124f;
+    hipLaunchKernelGGL(saxpy, dim3(1), dim3(n), 0, 0, n, a, x, y);
+
+    std::vector<float> yout(n);
+    hipMemcpy(yout.data(), y, sizeof *y * n, hipMemcpyDeviceToHost);
+
+    hipFree(x);
+    hipFree(y);
+
+    for(int i = 0; i < n; i++){
+        yout[i] -= a * xin[i];
+        if(std::abs(yout[i] - ac) > 0.001f){
+            std::cout << "Test failed at index " << i
+                << " with entry " << yout[i]
+                << " (" << ac << ")\n";
+            return 1;
+        }
+    }
+    std::cout << "TESTS PASSED!" << std::endl;
+}

Deleted: test.sh
===================================================================
--- test.sh     2023-01-28 08:43:42 UTC (rev 1389070)
+++ test.sh     2023-01-28 08:43:54 UTC (rev 1389071)
@@ -1,6 +0,0 @@
-#!/usr/bin/env sh
-
-OUT=$(mktemp -d)
-
-/opt/rocm/bin/hipcc -o "$OUT/test" test.cpp
-"$OUT"/test

Copied: hip-runtime-amd/repos/community-testing-x86_64/test.sh (from rev 
1389070, hip-runtime-amd/trunk/test.sh)
===================================================================
--- test.sh                             (rev 0)
+++ test.sh     2023-01-28 08:43:54 UTC (rev 1389071)
@@ -0,0 +1,6 @@
+#!/usr/bin/env sh
+
+OUT=$(mktemp -d)
+
+/opt/rocm/bin/hipcc -o "$OUT/test" test.cpp
+"$OUT"/test

Reply via email to