Date: Wednesday, February 8, 2023 @ 20:14:03
Author: tpkessler
Revision: 1396546
archrelease: copy trunk to community-testing-x86_64
Added:
rocblas/repos/community-testing-x86_64/PKGBUILD
(from rev 1396545, rocblas/trunk/PKGBUILD)
rocblas/repos/community-testing-x86_64/find-msgpack-5.patch
(from rev 1396545, rocblas/trunk/find-msgpack-5.patch)
rocblas/repos/community-testing-x86_64/test.cpp
(from rev 1396545, rocblas/trunk/test.cpp)
rocblas/repos/community-testing-x86_64/test.sh
(from rev 1396545, rocblas/trunk/test.sh)
Deleted:
rocblas/repos/community-testing-x86_64/PKGBUILD
rocblas/repos/community-testing-x86_64/find-msgpack-5.patch
rocblas/repos/community-testing-x86_64/test.cpp
rocblas/repos/community-testing-x86_64/test.sh
----------------------+
PKGBUILD | 124 +++++++++++++++++++++----------------------
find-msgpack-5.patch | 22 +++----
test.cpp | 140 ++++++++++++++++++++++++-------------------------
test.sh | 10 +--
4 files changed, 148 insertions(+), 148 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2023-02-08 20:13:53 UTC (rev 1396545)
+++ PKGBUILD 2023-02-08 20:14:03 UTC (rev 1396546)
@@ -1,62 +0,0 @@
-# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
-# Contributor: Markus Näther <[email protected]>
-pkgname=rocblas
-pkgver=5.4.2
-pkgrel=2
-pkgdesc='Next generation BLAS implementation for ROCm platform'
-arch=('x86_64')
-url='https://rocblas.readthedocs.io/en/latest'
-license=('MIT')
-depends=('hip' 'openmp')
-makedepends=('rocm-cmake' 'python' 'python-virtualenv' 'python-pyaml'
'python-wheel'
- 'perl-file-which' 'python-msgpack' 'msgpack-cxx' 'gcc-fortran')
-_rocblas='https://github.com/ROCmSoftwarePlatform/rocBLAS'
-_tensile='https://github.com/ROCmSoftwarePlatform/Tensile'
-source=("$pkgname-$pkgver.tar.gz::$_rocblas/archive/rocm-$pkgver.tar.gz"
-
"$pkgname-tensile-$pkgver.tar.gz::$_tensile/archive/refs/tags/rocm-$pkgver.tar.gz"
- "find-msgpack-5.patch")
-sha256sums=('37d3fed075031c1707f9cc6eefe59db6c41aa7bbe13b18f35c3f0394bbad039e'
- '435a5ed86b5bd6022654501f5e27556760f55940f8d23c3cecf924b6239d2712'
- '3f91bf087e4ea72eaef5acd500e16b61aa69c029cfcca14666799a7c42a0c5aa')
-options=(!lto)
-_dirname="$(basename "$_rocblas")-$(basename "${source[0]}" ".tar.gz")"
-_tensile_dir="$(basename "$_tensile")-$(basename "${source[1]}" ".tar.gz")"
-
-prepare() {
- cd "$_tensile_dir"
- patch -Np1 -i "$srcdir/find-msgpack-5.patch"
-}
-
-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
- PATH="/opt/rocm/llvm/bin:/opt/rocm/bin:${PATH}" \
- 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 \
- -DCMAKE_PREFIX_PATH=/opt/rocm/llvm/lib/cmake/llvm \
- -Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr \
- -DBUILD_WITH_TENSILE=ON \
- -DTensile_LIBRARY_FORMAT=msgpack \
- -DTensile_CODE_OBJECT_VERSION=V3 \
- -DCMAKE_TOOLCHAIN_FILE=toolchain-linux.cmake \
- -DTensile_TEST_LOCAL_PATH="$srcdir/$_tensile_dir"
- 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/rocblas.conf"
-
- install -Dm644 "$_dirname/LICENSE.md"
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
Copied: rocblas/repos/community-testing-x86_64/PKGBUILD (from rev 1396545,
rocblas/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2023-02-08 20:14:03 UTC (rev 1396546)
@@ -0,0 +1,62 @@
+# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
+# Contributor: Markus Näther <[email protected]>
+pkgname=rocblas
+pkgver=5.4.3
+pkgrel=1
+pkgdesc='Next generation BLAS implementation for ROCm platform'
+arch=('x86_64')
+url='https://rocblas.readthedocs.io/en/latest'
+license=('MIT')
+depends=('hip' 'openmp')
+makedepends=('rocm-cmake' 'python' 'python-virtualenv' 'python-pyaml'
'python-wheel'
+ 'perl-file-which' 'python-msgpack' 'msgpack-cxx' 'gcc-fortran')
+_rocblas='https://github.com/ROCmSoftwarePlatform/rocBLAS'
+_tensile='https://github.com/ROCmSoftwarePlatform/Tensile'
+source=("$pkgname-$pkgver.tar.gz::$_rocblas/archive/rocm-$pkgver.tar.gz"
+
"$pkgname-tensile-$pkgver.tar.gz::$_tensile/archive/refs/tags/rocm-$pkgver.tar.gz"
+ "find-msgpack-5.patch")
+sha256sums=('d82cd334b7a9b40d16ec4f4bb1fb5662382dcbfc86ee5e262413ed63d9e6a701'
+ 'a4c5e62edd33ea6b8528eb3f017a14c28eaa67c540f5c9023f6a245340198b0f'
+ '3f91bf087e4ea72eaef5acd500e16b61aa69c029cfcca14666799a7c42a0c5aa')
+options=(!lto)
+_dirname="$(basename "$_rocblas")-$(basename "${source[0]}" ".tar.gz")"
+_tensile_dir="$(basename "$_tensile")-$(basename "${source[1]}" ".tar.gz")"
+
+prepare() {
+ cd "$_tensile_dir"
+ patch -Np1 -i "$srcdir/find-msgpack-5.patch"
+}
+
+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
+ PATH="/opt/rocm/llvm/bin:/opt/rocm/bin:${PATH}" \
+ 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 \
+ -DCMAKE_PREFIX_PATH=/opt/rocm/llvm/lib/cmake/llvm \
+ -Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr \
+ -DBUILD_WITH_TENSILE=ON \
+ -DTensile_LIBRARY_FORMAT=msgpack \
+ -DTensile_CODE_OBJECT_VERSION=V3 \
+ -DCMAKE_TOOLCHAIN_FILE=toolchain-linux.cmake \
+ -DTensile_TEST_LOCAL_PATH="$srcdir/$_tensile_dir"
+ 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/rocblas.conf"
+
+ install -Dm644 "$_dirname/LICENSE.md"
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
Deleted: find-msgpack-5.patch
===================================================================
--- find-msgpack-5.patch 2023-02-08 20:13:53 UTC (rev 1396545)
+++ find-msgpack-5.patch 2023-02-08 20:14:03 UTC (rev 1396546)
@@ -1,11 +0,0 @@
---- Tensile-rocm-5.4.2/Tensile/Source/lib/CMakeLists.txt.bak 2023-01-27
08:30:16.374451318 +0100
-+++ Tensile-rocm-5.4.2/Tensile/Source/lib/CMakeLists.txt 2023-01-27
08:30:33.194515443 +0100
-@@ -103,7 +103,7 @@
- endif()
-
- if(TENSILE_USE_MSGPACK)
-- find_package(msgpack REQUIRED)
-+ find_package(msgpackc-cxx REQUIRED)
- target_compile_definitions(TensileHost PUBLIC -DTENSILE_MSGPACK=1)
-
- if(TARGET msgpackc-cxx)
Copied: rocblas/repos/community-testing-x86_64/find-msgpack-5.patch (from rev
1396545, rocblas/trunk/find-msgpack-5.patch)
===================================================================
--- find-msgpack-5.patch (rev 0)
+++ find-msgpack-5.patch 2023-02-08 20:14:03 UTC (rev 1396546)
@@ -0,0 +1,11 @@
+--- Tensile-rocm-5.4.2/Tensile/Source/lib/CMakeLists.txt.bak 2023-01-27
08:30:16.374451318 +0100
++++ Tensile-rocm-5.4.2/Tensile/Source/lib/CMakeLists.txt 2023-01-27
08:30:33.194515443 +0100
+@@ -103,7 +103,7 @@
+ endif()
+
+ if(TENSILE_USE_MSGPACK)
+- find_package(msgpack REQUIRED)
++ find_package(msgpackc-cxx REQUIRED)
+ target_compile_definitions(TensileHost PUBLIC -DTENSILE_MSGPACK=1)
+
+ if(TARGET msgpackc-cxx)
Deleted: test.cpp
===================================================================
--- test.cpp 2023-02-08 20:13:53 UTC (rev 1396545)
+++ test.cpp 2023-02-08 20:14:03 UTC (rev 1396546)
@@ -1,70 +0,0 @@
-#include <rocblas/rocblas.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 *x;
- float *y;
- float *z;
- hipMalloc((void**)&x, sizeof *x * size);
- hipMalloc((void**)&y, sizeof *y * size);
- hipMalloc((void**)&z, sizeof *z * size);
-
- std::vector<float> xin(size);
- std::vector<float> yin(size);
-
- std::generate(xin.begin(), xin.end(), myrand);
- std::generate(yin.begin(), yin.end(), myrand);
-
- hipMemcpy(x, xin.data(), sizeof *x * size, hipMemcpyHostToDevice);
- hipMemcpy(y, yin.data(), sizeof *x * size, hipMemcpyHostToDevice);
-
- rocblas_handle handle;
- rocblas_create_handle(&handle);
-
- float alpha = 15.412f;
- float beta = 0.0f;
- rocblas_sgemm(handle, rocblas_operation_none, rocblas_operation_none,
- n, n, n, &alpha, x, n, y, n, &beta, z, n);
-
- std::vector<float> zout(size);
- hipMemcpy(zout.data(), z, sizeof *z * size, hipMemcpyDeviceToHost);
-
- for(size_t j = 0; j < n; j++){
- for(size_t i = 0; i < n; i++){
- for(size_t k = 0; k < n; k++){
- zout[i + j * n] -= alpha * xin[i + k * n] * yin[k + j * n];
- }
- }
- }
-
- float tol = 0.001f;
- for(size_t i = 0; i < size; i++){
- if(std::abs(zout[i]) > tol){
- std::cout << "Element mismatch at index " << i << "\n";
- std::cout << "Expected: 0\n";
- std::cout << "Actual : " << zout[i] << "\n";
- return 1;
- }
- }
-
- std::cout << "TESTS PASSED!" << std::endl;
-
- hipFree(x);
- hipFree(y);
- hipFree(z);
- rocblas_destroy_handle(handle);
-}
Copied: rocblas/repos/community-testing-x86_64/test.cpp (from rev 1396545,
rocblas/trunk/test.cpp)
===================================================================
--- test.cpp (rev 0)
+++ test.cpp 2023-02-08 20:14:03 UTC (rev 1396546)
@@ -0,0 +1,70 @@
+#include <rocblas/rocblas.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 *x;
+ float *y;
+ float *z;
+ hipMalloc((void**)&x, sizeof *x * size);
+ hipMalloc((void**)&y, sizeof *y * size);
+ hipMalloc((void**)&z, sizeof *z * size);
+
+ std::vector<float> xin(size);
+ std::vector<float> yin(size);
+
+ std::generate(xin.begin(), xin.end(), myrand);
+ std::generate(yin.begin(), yin.end(), myrand);
+
+ hipMemcpy(x, xin.data(), sizeof *x * size, hipMemcpyHostToDevice);
+ hipMemcpy(y, yin.data(), sizeof *x * size, hipMemcpyHostToDevice);
+
+ rocblas_handle handle;
+ rocblas_create_handle(&handle);
+
+ float alpha = 15.412f;
+ float beta = 0.0f;
+ rocblas_sgemm(handle, rocblas_operation_none, rocblas_operation_none,
+ n, n, n, &alpha, x, n, y, n, &beta, z, n);
+
+ std::vector<float> zout(size);
+ hipMemcpy(zout.data(), z, sizeof *z * size, hipMemcpyDeviceToHost);
+
+ for(size_t j = 0; j < n; j++){
+ for(size_t i = 0; i < n; i++){
+ for(size_t k = 0; k < n; k++){
+ zout[i + j * n] -= alpha * xin[i + k * n] * yin[k + j * n];
+ }
+ }
+ }
+
+ float tol = 0.001f;
+ for(size_t i = 0; i < size; i++){
+ if(std::abs(zout[i]) > tol){
+ std::cout << "Element mismatch at index " << i << "\n";
+ std::cout << "Expected: 0\n";
+ std::cout << "Actual : " << zout[i] << "\n";
+ return 1;
+ }
+ }
+
+ std::cout << "TESTS PASSED!" << std::endl;
+
+ hipFree(x);
+ hipFree(y);
+ hipFree(z);
+ rocblas_destroy_handle(handle);
+}
Deleted: test.sh
===================================================================
--- test.sh 2023-02-08 20:13:53 UTC (rev 1396545)
+++ test.sh 2023-02-08 20:14:03 UTC (rev 1396546)
@@ -1,5 +0,0 @@
-#! /usr/bin/env sh
-
-OUT=$(mktemp -d)
-/opt/rocm/bin/hipcc -o "$OUT"/test test.cpp -lrocblas
-"$OUT"/test
Copied: rocblas/repos/community-testing-x86_64/test.sh (from rev 1396545,
rocblas/trunk/test.sh)
===================================================================
--- test.sh (rev 0)
+++ test.sh 2023-02-08 20:14:03 UTC (rev 1396546)
@@ -0,0 +1,5 @@
+#! /usr/bin/env sh
+
+OUT=$(mktemp -d)
+/opt/rocm/bin/hipcc -o "$OUT"/test test.cpp -lrocblas
+"$OUT"/test