Date: Friday, January 27, 2023 @ 16:30:56
Author: tpkessler
Revision: 1388801
archrelease: copy trunk to community-testing-x86_64
Added:
rocsolver/repos/community-testing-x86_64/PKGBUILD
(from rev 1388800, rocsolver/trunk/PKGBUILD)
rocsolver/repos/community-testing-x86_64/test.cpp
(from rev 1388800, rocsolver/trunk/test.cpp)
rocsolver/repos/community-testing-x86_64/test.sh
(from rev 1388800, rocsolver/trunk/test.sh)
Deleted:
rocsolver/repos/community-testing-x86_64/PKGBUILD
rocsolver/repos/community-testing-x86_64/test.cpp
rocsolver/repos/community-testing-x86_64/test.sh
----------+
PKGBUILD | 83 +++++++++++++++++++------------------
test.cpp | 136 ++++++++++++++++++++++++++++++-------------------------------
test.sh | 10 ++--
3 files changed, 116 insertions(+), 113 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2023-01-27 16:30:41 UTC (rev 1388800)
+++ PKGBUILD 2023-01-27 16:30:56 UTC (rev 1388801)
@@ -1,40 +0,0 @@
-# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
-
-pkgname=rocsolver
-pkgver=5.4.1
-pkgrel=2
-pkgdesc='Subset of LAPACK functionality on the ROCm platform'
-arch=('x86_64')
-url='https://rocsolver.readthedocs.io/en/latest/'
-license=('BSD 2-Clause')
-depends=('hip' 'rocblas')
-makedepends=('rocm-cmake' 'python-pyaml' 'fmt')
-_git='https://github.com/ROCmSoftwarePlatform/rocSOLVER'
-source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
-sha256sums=('b1059c476fdef5fff4eab8152385d2dfb6ce914bfac298e612c560defe67aeec')
-options=(!lto)
-_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 \
- -B build \
- -S "$_dirname" \
- -DCMAKE_BUILD_TYPE=None \
- -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
- -DCMAKE_INSTALL_PREFIX=/opt/rocm \
- -DROCSOLVER_EMBED_FMT=ON
- cmake --build build
-}
-
-package() {
- DESTDIR="$pkgdir" cmake --install build
-
- echo "/opt/rocm/$pkgname/lib" > "$pkgname.conf"
- install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
-
- install -Dm644 "$_dirname/LICENSE.md"
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
Copied: rocsolver/repos/community-testing-x86_64/PKGBUILD (from rev 1388800,
rocsolver/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2023-01-27 16:30:56 UTC (rev 1388801)
@@ -0,0 +1,43 @@
+# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
+
+pkgname=rocsolver
+pkgver=5.4.2
+pkgrel=1
+pkgdesc='Subset of LAPACK functionality on the ROCm platform'
+arch=('x86_64')
+url='https://rocsolver.readthedocs.io/en/latest/'
+license=('BSD 2-Clause')
+depends=('hip' 'rocblas')
+makedepends=('rocm-cmake' 'python-pyaml' 'fmt')
+_git='https://github.com/ROCmSoftwarePlatform/rocSOLVER'
+source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
+sha256sums=('5ada07d3f46bbe9fa8ebcb2ca39f5f89ab72e1c0cc8fedfe1ab3feffc34c9829')
+options=(!lto)
+_dirname="$(basename "$_git")-$(basename "${source[0]}" .tar.gz)"
+
+build() {
+ # Compile source code for supported GPU archs in parallel
+ export HIPCC_COMPILE_FLAGS_APPEND="-parallel-jobs=$(nproc)"
+ export HIPCC_LINK_FLAGS_APPEND="-parallel-jobs=$(nproc)"
+ # -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 \
+ -B build \
+ -S "$_dirname" \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
+ -DCMAKE_INSTALL_PREFIX=/opt/rocm \
+ -DROCSOLVER_EMBED_FMT=ON
+ cmake --build build
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+
+ echo "/opt/rocm/$pkgname/lib" > "$pkgname.conf"
+ install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
+
+ install -Dm644 "$_dirname/LICENSE.md"
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
Deleted: test.cpp
===================================================================
--- test.cpp 2023-01-27 16:30:41 UTC (rev 1388800)
+++ test.cpp 2023-01-27 16:30:56 UTC (rev 1388801)
@@ -1,68 +0,0 @@
-#include <rocsolver/rocsolver.h>
-#include <hip/hip_runtime.h>
-#include <vector>
-#include <random>
-#include <algorithm>
-#include <cmath>
-#include <iostream>
-
-int main()
-{
- size_t n = 128;
- size_t size = n * n;
-
- std::random_device rd;
- std::mt19937 gen(rd());
- std::uniform_real_distribution<float> dist(-1.0, 1.0);
- auto myrand = [&](){return dist(gen);};
-
- float *a;
- float *x;
- hipMalloc((void**)&a, sizeof *a * size);
- hipMalloc((void**)&x, sizeof *x * n);
-
- std::vector<float> ain(size);
- std::vector<float> xin(n);
- std::generate(ain.begin(), ain.end(), myrand);
- std::generate(xin.begin(), xin.end(), myrand);
-
- hipMemcpy(a, ain.data(), sizeof *a * size, hipMemcpyHostToDevice);
- hipMemcpy(x, xin.data(), sizeof *x * n, hipMemcpyHostToDevice);
-
- rocblas_handle handle;
- rocblas_create_handle(&handle);
-
- rocblas_int *info;
- hipMalloc((void**)&info, sizeof *info);
- rocsolver_sgels(handle, rocblas_operation_none,
- n, n, 1, a, n, x, n, info);
-
- std::vector<float> xout(n);
- hipMemcpy(xout.data(), x, sizeof *x * n, hipMemcpyDeviceToHost);
- rocblas_int hinfo;
- hipMemcpy(&hinfo, info, sizeof *info, hipMemcpyDeviceToHost);
-
- if(hinfo != 0){
- std::cout << "Matrix is rank deficient!\n";
- return 1;
- }
-
- float tol = 0.001f;
- for(size_t i = 0; i < n; i++){
- for(size_t j = 0; j < n; j++){
- xin[i] -= ain[i + j * n] * xout[j];
- }
- if(std::abs(xin[i]) > tol){
- std::cout << "Missmatch at index " << i << "\n"
- << "Desired: 0" << "\n"
- << "Actual : " << xin[i] << std::endl;
- return 1;
- }
- }
-
- std::cout << "TESTS PASSED!" << std::endl;
-
- hipFree(a);
- hipFree(x);
- rocblas_destroy_handle(handle);
-}
Copied: rocsolver/repos/community-testing-x86_64/test.cpp (from rev 1388800,
rocsolver/trunk/test.cpp)
===================================================================
--- test.cpp (rev 0)
+++ test.cpp 2023-01-27 16:30:56 UTC (rev 1388801)
@@ -0,0 +1,68 @@
+#include <rocsolver/rocsolver.h>
+#include <hip/hip_runtime.h>
+#include <vector>
+#include <random>
+#include <algorithm>
+#include <cmath>
+#include <iostream>
+
+int main()
+{
+ size_t n = 128;
+ size_t size = n * n;
+
+ std::random_device rd;
+ std::mt19937 gen(rd());
+ std::uniform_real_distribution<float> dist(-1.0, 1.0);
+ auto myrand = [&](){return dist(gen);};
+
+ float *a;
+ float *x;
+ hipMalloc((void**)&a, sizeof *a * size);
+ hipMalloc((void**)&x, sizeof *x * n);
+
+ std::vector<float> ain(size);
+ std::vector<float> xin(n);
+ std::generate(ain.begin(), ain.end(), myrand);
+ std::generate(xin.begin(), xin.end(), myrand);
+
+ hipMemcpy(a, ain.data(), sizeof *a * size, hipMemcpyHostToDevice);
+ hipMemcpy(x, xin.data(), sizeof *x * n, hipMemcpyHostToDevice);
+
+ rocblas_handle handle;
+ rocblas_create_handle(&handle);
+
+ rocblas_int *info;
+ hipMalloc((void**)&info, sizeof *info);
+ rocsolver_sgels(handle, rocblas_operation_none,
+ n, n, 1, a, n, x, n, info);
+
+ std::vector<float> xout(n);
+ hipMemcpy(xout.data(), x, sizeof *x * n, hipMemcpyDeviceToHost);
+ rocblas_int hinfo;
+ hipMemcpy(&hinfo, info, sizeof *info, hipMemcpyDeviceToHost);
+
+ if(hinfo != 0){
+ std::cout << "Matrix is rank deficient!\n";
+ return 1;
+ }
+
+ float tol = 0.001f;
+ for(size_t i = 0; i < n; i++){
+ for(size_t j = 0; j < n; j++){
+ xin[i] -= ain[i + j * n] * xout[j];
+ }
+ if(std::abs(xin[i]) > tol){
+ std::cout << "Missmatch at index " << i << "\n"
+ << "Desired: 0" << "\n"
+ << "Actual : " << xin[i] << std::endl;
+ return 1;
+ }
+ }
+
+ std::cout << "TESTS PASSED!" << std::endl;
+
+ hipFree(a);
+ hipFree(x);
+ rocblas_destroy_handle(handle);
+}
Deleted: test.sh
===================================================================
--- test.sh 2023-01-27 16:30:41 UTC (rev 1388800)
+++ test.sh 2023-01-27 16:30:56 UTC (rev 1388801)
@@ -1,5 +0,0 @@
-#! /usr/bin/env sh
-
-OUT=$(mktemp -d)
-/opt/rocm/bin/hipcc -o "$OUT"/test test.cpp -lrocsolver -lrocblas
-"$OUT"/test
Copied: rocsolver/repos/community-testing-x86_64/test.sh (from rev 1388800,
rocsolver/trunk/test.sh)
===================================================================
--- test.sh (rev 0)
+++ test.sh 2023-01-27 16:30:56 UTC (rev 1388801)
@@ -0,0 +1,5 @@
+#! /usr/bin/env sh
+
+OUT=$(mktemp -d)
+/opt/rocm/bin/hipcc -o "$OUT"/test test.cpp -lrocsolver -lrocblas
+"$OUT"/test