Date: Sunday, February 5, 2023 @ 15:03:22
  Author: tpkessler
Revision: 1392778

archrelease: copy trunk to community-testing-x86_64

Added:
  rocprim/repos/community-testing-x86_64/PKGBUILD
    (from rev 1392777, rocprim/trunk/PKGBUILD)
  rocprim/repos/community-testing-x86_64/test.cpp
    (from rev 1392777, rocprim/trunk/test.cpp)
  rocprim/repos/community-testing-x86_64/test.sh
    (from rev 1392777, rocprim/trunk/test.sh)
Deleted:
  rocprim/repos/community-testing-x86_64/PKGBUILD
  rocprim/repos/community-testing-x86_64/test.cpp
  rocprim/repos/community-testing-x86_64/test.sh

----------+
 PKGBUILD |   74 +++++++++++++++++++-------------------
 test.cpp |  118 ++++++++++++++++++++++++++++++-------------------------------
 test.sh  |   12 +++---
 3 files changed, 102 insertions(+), 102 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2023-02-05 15:03:05 UTC (rev 1392777)
+++ PKGBUILD    2023-02-05 15:03:22 UTC (rev 1392778)
@@ -1,37 +0,0 @@
-# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
-# Contributor: Markus Näther <[email protected]>
-pkgname=rocprim
-pkgver=5.4.2
-pkgrel=1
-pkgdesc='Header-only library providing HIP parallel primitives'
-arch=('x86_64')
-url='https://codedocs.xyz/ROCmSoftwarePlatform/rocPRIM'
-_git='https://github.com/ROCmSoftwarePlatform/rocPRIM'
-license=('MIT')
-depends=('hip')
-makedepends=('rocm-cmake')
-source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
-sha256sums=('6f4d8df595ccb277b3c2bf8528a3c7a24365743c8f3ba6029391b59d9e39ba82')
-_dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
-
-build() {
-  # -fcf-protection is not supported by HIP, see
-  # 
https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.4/page/Appendix_A.html
-
-  CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
-  cmake \
-    -Wno-dev \
-    -S "$_dirname" \
-    -B build \
-    -DCMAKE_BUILD_TYPE=None \
-    -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
-    -DCMAKE_INSTALL_PREFIX=/opt/rocm \
-    -Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr
-  cmake --build build
-}
-
-package() {
-  DESTDIR="$pkgdir" cmake --install build
-
-  install -Dm644 "$_dirname/LICENSE.txt" 
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}

Copied: rocprim/repos/community-testing-x86_64/PKGBUILD (from rev 1392777, 
rocprim/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2023-02-05 15:03:22 UTC (rev 1392778)
@@ -0,0 +1,37 @@
+# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
+# Contributor: Markus Näther <[email protected]>
+pkgname=rocprim
+pkgver=5.4.2
+pkgrel=2
+pkgdesc='Header-only library providing HIP parallel primitives'
+arch=('x86_64')
+url='https://codedocs.xyz/ROCmSoftwarePlatform/rocPRIM'
+_git='https://github.com/ROCmSoftwarePlatform/rocPRIM'
+license=('MIT')
+depends=('hip')
+makedepends=('rocm-cmake')
+source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
+sha256sums=('6f4d8df595ccb277b3c2bf8528a3c7a24365743c8f3ba6029391b59d9e39ba82')
+_dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
+
+build() {
+  # -fcf-protection is not supported by HIP, see
+  # 
https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.4/page/Appendix_A.html
+
+  CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
+  cmake \
+    -Wno-dev \
+    -S "$_dirname" \
+    -B build \
+    -DCMAKE_BUILD_TYPE=None \
+    -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
+    -DCMAKE_INSTALL_PREFIX=/opt/rocm \
+    -Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr
+  cmake --build build
+}
+
+package() {
+  DESTDIR="$pkgdir" cmake --install build
+
+  install -Dm644 "$_dirname/LICENSE.txt" 
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}

Deleted: test.cpp
===================================================================
--- test.cpp    2023-02-05 15:03:05 UTC (rev 1392777)
+++ test.cpp    2023-02-05 15:03:22 UTC (rev 1392778)
@@ -1,59 +0,0 @@
-#include <rocprim/rocprim.hpp>
-#include <vector>
-#include <iostream>
-#include <random>
-#include <algorithm>
-#include <cmath>
-
-int main()
-{
-    auto xpy = [] __device__(float x, float y) -> float{
-        return x + y;
-    };
-
-    size_t size = 1024;
-    std::vector<float> xin(size);
-    std::vector<float> yin(size);
-
-    std::random_device rd;
-    std::mt19937 gen(rd());
-    std::uniform_real_distribution<float> dist(-1.0, 1.0);
-
-    auto myrand = [&]() -> float {return dist(gen);};
-
-    std::generate(xin.begin(), xin.end(), myrand);
-    std::generate(yin.begin(), yin.end(), myrand);
-
-    std::vector<float> zref(size);
-    for(size_t i = 0; i < size; i++){
-        zref[i] = xin[i] + yin[i];
-    }
-
-    float *x;
-    float *y;
-    float *z;
-    hipMalloc((void**)&x, sizeof *x * size);
-    hipMalloc((void**)&y, sizeof *y * size);
-    hipMalloc((void**)&z, sizeof *z * size);
-
-    hipMemcpy(x, xin.data(), sizeof *x * size, hipMemcpyHostToDevice);
-    hipMemcpy(y, yin.data(), sizeof *y * size, hipMemcpyHostToDevice);
-
-    rocprim::transform(x, y, z, size, xpy);
-
-    std::vector<float> zout(size);
-    hipMemcpy(zout.data(), z, sizeof *z * size, hipMemcpyDeviceToHost);
-
-    for(size_t i = 0; i < size; i++){
-        if(std::abs(zout[i] - zref[i]) > 0.001f){
-            std::cout << "Element mismatch at index " << i << "\n";
-            std::cout << "Got " << zout[i] << " but expected " << zref[i] << 
"\n";
-            return 1;
-        }
-    }
-    std::cout << "TESTS PASSED!" << std::endl;
-
-    hipFree(x);
-    hipFree(y);
-    hipFree(z);
-}

Copied: rocprim/repos/community-testing-x86_64/test.cpp (from rev 1392777, 
rocprim/trunk/test.cpp)
===================================================================
--- test.cpp                            (rev 0)
+++ test.cpp    2023-02-05 15:03:22 UTC (rev 1392778)
@@ -0,0 +1,59 @@
+#include <rocprim/rocprim.hpp>
+#include <vector>
+#include <iostream>
+#include <random>
+#include <algorithm>
+#include <cmath>
+
+int main()
+{
+    auto xpy = [] __device__(float x, float y) -> float{
+        return x + y;
+    };
+
+    size_t size = 1024;
+    std::vector<float> xin(size);
+    std::vector<float> yin(size);
+
+    std::random_device rd;
+    std::mt19937 gen(rd());
+    std::uniform_real_distribution<float> dist(-1.0, 1.0);
+
+    auto myrand = [&]() -> float {return dist(gen);};
+
+    std::generate(xin.begin(), xin.end(), myrand);
+    std::generate(yin.begin(), yin.end(), myrand);
+
+    std::vector<float> zref(size);
+    for(size_t i = 0; i < size; i++){
+        zref[i] = xin[i] + yin[i];
+    }
+
+    float *x;
+    float *y;
+    float *z;
+    hipMalloc((void**)&x, sizeof *x * size);
+    hipMalloc((void**)&y, sizeof *y * size);
+    hipMalloc((void**)&z, sizeof *z * size);
+
+    hipMemcpy(x, xin.data(), sizeof *x * size, hipMemcpyHostToDevice);
+    hipMemcpy(y, yin.data(), sizeof *y * size, hipMemcpyHostToDevice);
+
+    rocprim::transform(x, y, z, size, xpy);
+
+    std::vector<float> zout(size);
+    hipMemcpy(zout.data(), z, sizeof *z * size, hipMemcpyDeviceToHost);
+
+    for(size_t i = 0; i < size; i++){
+        if(std::abs(zout[i] - zref[i]) > 0.001f){
+            std::cout << "Element mismatch at index " << i << "\n";
+            std::cout << "Got " << zout[i] << " but expected " << zref[i] << 
"\n";
+            return 1;
+        }
+    }
+    std::cout << "TESTS PASSED!" << std::endl;
+
+    hipFree(x);
+    hipFree(y);
+    hipFree(z);
+}

Deleted: test.sh
===================================================================
--- test.sh     2023-02-05 15:03:05 UTC (rev 1392777)
+++ test.sh     2023-02-05 15:03:22 UTC (rev 1392778)
@@ -1,6 +0,0 @@
-#! /usr/bin/env sh
-
-OUT=$(mktemp -d)
-# rocPRIM uses C++14 extensions but hipcc uses C++11 by default
-/opt/rocm/bin/hipcc -std=gnu++14 -o "$OUT"/test test.cpp
-"$OUT"/test

Copied: rocprim/repos/community-testing-x86_64/test.sh (from rev 1392777, 
rocprim/trunk/test.sh)
===================================================================
--- test.sh                             (rev 0)
+++ test.sh     2023-02-05 15:03:22 UTC (rev 1392778)
@@ -0,0 +1,6 @@
+#! /usr/bin/env sh
+
+OUT=$(mktemp -d)
+# rocPRIM uses C++14 extensions but hipcc uses C++11 by default
+/opt/rocm/bin/hipcc -std=gnu++14 -o "$OUT"/test test.cpp
+"$OUT"/test

Reply via email to