Date: Saturday, January 28, 2023 @ 16:49:59
Author: tpkessler
Revision: 1390150
archrelease: copy trunk to community-testing-x86_64
Added:
hipblas/repos/community-testing-x86_64/PKGBUILD
(from rev 1390145, hipblas/trunk/PKGBUILD)
hipblas/repos/community-testing-x86_64/test.cpp
(from rev 1390146, hipblas/trunk/test.cpp)
hipblas/repos/community-testing-x86_64/test.sh
(from rev 1390146, hipblas/trunk/test.sh)
Deleted:
hipblas/repos/community-testing-x86_64/PKGBUILD
hipblas/repos/community-testing-x86_64/test.cpp
hipblas/repos/community-testing-x86_64/test.sh
----------+
PKGBUILD | 76 ++++++++++++++--------------
test.cpp | 164 ++++++++++++++++++++++++++++++-------------------------------
test.sh | 10 +--
3 files changed, 125 insertions(+), 125 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2023-01-28 16:49:51 UTC (rev 1390149)
+++ PKGBUILD 2023-01-28 16:49:59 UTC (rev 1390150)
@@ -1,38 +0,0 @@
-# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
-# Contributor: Markus Näther <[email protected]>
-pkgname=hipblas
-pkgver=5.4.1
-pkgrel=2
-pkgdesc='ROCm BLAS marshalling library'
-arch=('x86_64')
-url='https://hipblas.readthedocs.io/en/latest/'
-license=('MIT')
-depends=('hip' 'rocblas' 'rocsolver')
-makedepends=('rocm-cmake' 'gcc-fortran')
-_git='https://github.com/ROCmSoftwarePlatform/hipBLAS'
-source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
-sha256sums=('84f0129f92a5907ae8c4cb0c84a7138aaeb8d1c2aa965fbab9ee23df2232d5bc')
-_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
- 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: hipblas/repos/community-testing-x86_64/PKGBUILD (from rev 1390145,
hipblas/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2023-01-28 16:49:59 UTC (rev 1390150)
@@ -0,0 +1,38 @@
+# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
+# Contributor: Markus Näther <[email protected]>
+pkgname=hipblas
+pkgver=5.4.2
+pkgrel=1
+pkgdesc='ROCm BLAS marshalling library'
+arch=('x86_64')
+url='https://hipblas.readthedocs.io/en/latest/'
+license=('MIT')
+depends=('hip' 'rocblas' 'rocsolver')
+makedepends=('rocm-cmake' 'gcc-fortran')
+_git='https://github.com/ROCmSoftwarePlatform/hipBLAS'
+source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
+sha256sums=('47cfc53d38d8e8bfc93f11db442714298c300bd00611b416b06c090dee87a526')
+_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
+ 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-28 16:49:51 UTC (rev 1390149)
+++ test.cpp 2023-01-28 16:49:59 UTC (rev 1390150)
@@ -1,82 +0,0 @@
-#include <hipblas/hipblas.h>
-#include <hip/hip_runtime.h>
-#include <vector>
-#include <random>
-#include <algorithm>
-#include <cmath>
-#include <iostream>
-
-int main()
-{
- size_t n = 64;
- size_t m = 41;
- 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 *ac;
- int *ipiv;
- float *x;
- float *r;
- hipMalloc((void**)&a, sizeof *a * size);
- hipMalloc((void**)&ac, sizeof *ac * size);
- hipMalloc((void**)&ipiv, sizeof *ipiv * n);
- hipMalloc((void**)&x, sizeof *x * n * m);
- hipMalloc((void**)&r, sizeof *r * n * m);
-
- std::vector<float> ain(size);
- std::vector<float> xin(n * m);
- std::generate(ain.begin(), ain.end(), myrand);
- std::generate(xin.begin(), xin.end(), myrand);
-
- hipMemcpy(a, ain.data(), sizeof *a * size, hipMemcpyHostToDevice);
- hipMemcpy(ac, ain.data(), sizeof *ac * size, hipMemcpyHostToDevice);
- hipMemcpy(x, xin.data(), sizeof *x * n * m, hipMemcpyHostToDevice);
- hipMemcpy(r, xin.data(), sizeof *x * n * m, hipMemcpyHostToDevice);
-
- hipblasHandle_t handle;
- hipblasCreate(&handle);
-
- int *info;
- hipMalloc((void**)&info, sizeof *info);
-
- hipblasSgetrf(handle, n, a, n, ipiv, info);
-
- int hinfo[1];
- hipblasSgetrs(handle, HIPBLAS_OP_N, n, m, a, n,
- ipiv, x, n, &hinfo[0]);
-
- float alpha = 1.0;
- float beta = -1.0;
- hipblasSgemm(handle, HIPBLAS_OP_N, HIPBLAS_OP_N, n, m, n,
- &alpha, ac, n, x, n, &beta, r, n);
-
- std::vector<float> rout(n * m);
- hipMemcpy(rout.data(), r, sizeof *r * n * m, hipMemcpyDeviceToHost);
-
- float tol = 0.001f;
- for(size_t i = 0; i < n; i++){
- for(size_t j = 0; j < m; j++){
- if(std::abs(rout[i]) > tol){
- std::cout << "Missmatch at index " << i << "," << j << "\n"
- << "Desired: 0" << "\n"
- << "Actual : " << rout[i + j * n] << std::endl;
- return 1;
- }
- }
- }
-
- std::cout << "TESTS PASSED!" << std::endl;
-
- hipFree(a);
- hipFree(ac);
- hipFree(ipiv);
- hipFree(x);
- hipFree(r);
- hipFree(info);
- hipblasDestroy(handle);
-}
Copied: hipblas/repos/community-testing-x86_64/test.cpp (from rev 1390146,
hipblas/trunk/test.cpp)
===================================================================
--- test.cpp (rev 0)
+++ test.cpp 2023-01-28 16:49:59 UTC (rev 1390150)
@@ -0,0 +1,82 @@
+#include <hipblas/hipblas.h>
+#include <hip/hip_runtime.h>
+#include <vector>
+#include <random>
+#include <algorithm>
+#include <cmath>
+#include <iostream>
+
+int main()
+{
+ size_t n = 64;
+ size_t m = 41;
+ 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 *ac;
+ int *ipiv;
+ float *x;
+ float *r;
+ hipMalloc((void**)&a, sizeof *a * size);
+ hipMalloc((void**)&ac, sizeof *ac * size);
+ hipMalloc((void**)&ipiv, sizeof *ipiv * n);
+ hipMalloc((void**)&x, sizeof *x * n * m);
+ hipMalloc((void**)&r, sizeof *r * n * m);
+
+ std::vector<float> ain(size);
+ std::vector<float> xin(n * m);
+ std::generate(ain.begin(), ain.end(), myrand);
+ std::generate(xin.begin(), xin.end(), myrand);
+
+ hipMemcpy(a, ain.data(), sizeof *a * size, hipMemcpyHostToDevice);
+ hipMemcpy(ac, ain.data(), sizeof *ac * size, hipMemcpyHostToDevice);
+ hipMemcpy(x, xin.data(), sizeof *x * n * m, hipMemcpyHostToDevice);
+ hipMemcpy(r, xin.data(), sizeof *x * n * m, hipMemcpyHostToDevice);
+
+ hipblasHandle_t handle;
+ hipblasCreate(&handle);
+
+ int *info;
+ hipMalloc((void**)&info, sizeof *info);
+
+ hipblasSgetrf(handle, n, a, n, ipiv, info);
+
+ int hinfo[1];
+ hipblasSgetrs(handle, HIPBLAS_OP_N, n, m, a, n,
+ ipiv, x, n, &hinfo[0]);
+
+ float alpha = 1.0;
+ float beta = -1.0;
+ hipblasSgemm(handle, HIPBLAS_OP_N, HIPBLAS_OP_N, n, m, n,
+ &alpha, ac, n, x, n, &beta, r, n);
+
+ std::vector<float> rout(n * m);
+ hipMemcpy(rout.data(), r, sizeof *r * n * m, hipMemcpyDeviceToHost);
+
+ float tol = 0.001f;
+ for(size_t i = 0; i < n; i++){
+ for(size_t j = 0; j < m; j++){
+ if(std::abs(rout[i]) > tol){
+ std::cout << "Missmatch at index " << i << "," << j << "\n"
+ << "Desired: 0" << "\n"
+ << "Actual : " << rout[i + j * n] << std::endl;
+ return 1;
+ }
+ }
+ }
+
+ std::cout << "TESTS PASSED!" << std::endl;
+
+ hipFree(a);
+ hipFree(ac);
+ hipFree(ipiv);
+ hipFree(x);
+ hipFree(r);
+ hipFree(info);
+ hipblasDestroy(handle);
+}
Deleted: test.sh
===================================================================
--- test.sh 2023-01-28 16:49:51 UTC (rev 1390149)
+++ test.sh 2023-01-28 16:49:59 UTC (rev 1390150)
@@ -1,5 +0,0 @@
-#! /usr/bin/env sh
-
-OUT=$(mktemp -d)
-/opt/rocm/bin/hipcc -o "$OUT"/test test.cpp -lhipblas -lrocsolver -lrocblas
-"$OUT"/test
Copied: hipblas/repos/community-testing-x86_64/test.sh (from rev 1390146,
hipblas/trunk/test.sh)
===================================================================
--- test.sh (rev 0)
+++ test.sh 2023-01-28 16:49:59 UTC (rev 1390150)
@@ -0,0 +1,5 @@
+#! /usr/bin/env sh
+
+OUT=$(mktemp -d)
+/opt/rocm/bin/hipcc -o "$OUT"/test test.cpp -lhipblas -lrocsolver -lrocblas
+"$OUT"/test