Date: Tuesday, February 7, 2023 @ 21:39:44
  Author: tpkessler
Revision: 1396038

archrelease: copy trunk to community-testing-x86_64

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

----------+
 PKGBUILD |   85 +++++++++++++++++----------------
 test.cpp |  156 ++++++++++++++++++++++++++++++-------------------------------
 test.sh  |   10 +--
 3 files changed, 127 insertions(+), 124 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2023-02-07 21:39:33 UTC (rev 1396037)
+++ PKGBUILD    2023-02-07 21:39:44 UTC (rev 1396038)
@@ -1,41 +0,0 @@
-# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
-# Contriubtor: Markus Näther <[email protected]>
-# Contributor: acxz <akashpatel2008 at yahoo dot com>
-
-pkgname=rccl
-pkgver=5.4.2
-pkgrel=1
-pkgdesc="ROCm Communication Collectives Library"
-arch=('x86_64')
-url='https://rccl.readthedocs.io/en/rocm-5.4.2/'
-license=('custom')
-depends=('hip' 'rocm-smi-lib')
-makedepends=('rocm-cmake' 'python')
-_git='https://github.com/ROCmSoftwarePlatform/rccl'
-source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
-sha256sums=('067b19f952d88422afbeb2d3cdd2effa7d33e8503826bba712ac19fb00ddb379')
-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/hip/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 "$srcdir/$_dirname/LICENSE.txt" 
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}

Copied: rccl/repos/community-testing-x86_64/PKGBUILD (from rev 1396037, 
rccl/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2023-02-07 21:39:44 UTC (rev 1396038)
@@ -0,0 +1,44 @@
+# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
+# Contriubtor: Markus Näther <[email protected]>
+# Contributor: acxz <akashpatel2008 at yahoo dot com>
+
+pkgname=rccl
+pkgver=5.4.2
+pkgrel=2
+pkgdesc="ROCm Communication Collectives Library"
+arch=('x86_64')
+url='https://rccl.readthedocs.io/en/rocm-5.4.2/'
+license=('custom')
+depends=('hip' 'rocm-smi-lib')
+makedepends=('rocm-cmake' 'python')
+_git='https://github.com/ROCmSoftwarePlatform/rccl'
+source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
+sha256sums=('067b19f952d88422afbeb2d3cdd2effa7d33e8503826bba712ac19fb00ddb379')
+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/hip/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 "$srcdir/$_dirname/LICENSE.txt" 
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}

Deleted: test.cpp
===================================================================
--- test.cpp    2023-02-07 21:39:33 UTC (rev 1396037)
+++ test.cpp    2023-02-07 21:39:44 UTC (rev 1396038)
@@ -1,78 +0,0 @@
-#include <stdio.h>
-#include <hip/hip_runtime.h>
-#include <rccl/rccl.h>
-#include <math.h>
-
-#define NDEV 1
-
-int main(int argc, char* argv[])
-{
-  ncclComm_t comms[NDEV];
-
-  int size = 100;
-  int devs[NDEV];
-  for(int i = 0; i < NDEV; i++){
-      devs[i] = i;
-  }
-
-  float* hsend = (float*) malloc(size * sizeof *hsend);
-  float* hrecv = (float*) malloc(size * sizeof *hrecv);
-
-  for (int i = 0; i < size; i++) {
-    hsend[i] = 1.0f;
-    hrecv[i] = 0.0f;
-  }
-
-  float* sendbuff[NDEV];
-  float* recvbuff[NDEV];
-  hipStream_t s[NDEV];
-  for (int i = 0; i < NDEV; i++) {
-    hipSetDevice(i);
-    hipMalloc(sendbuff + i, size * sizeof(float));
-    hipMalloc(recvbuff + i, size * sizeof(float));
-    hipMemcpy(sendbuff[i], hsend, size * sizeof *hsend, hipMemcpyHostToDevice);
-    hipMemcpy(recvbuff[i], hrecv, size * sizeof *hrecv, hipMemcpyHostToDevice);
-    hipStreamCreate(s+i);
-    hipDeviceSynchronize();
-  }
-
-  ncclCommInitAll(comms, NDEV, devs);
-
-  ncclGroupStart();
-  for (int i = 0; i < NDEV; i++)
-    ncclAllReduce(&sendbuff[i][0], &recvbuff[i][0], size, ncclFloat, ncclSum,
-        comms[i], s[i]);
-  ncclGroupEnd();
-
-
-  for (int i = 0; i < NDEV; i++) {
-    hipSetDevice(i);
-    hipStreamSynchronize(s[i]);
-  }
- 
-  hipSetDevice(0);
-  hipMemcpy(hrecv, recvbuff[0], size * sizeof *hrecv, hipMemcpyDeviceToHost);
-  hipDeviceSynchronize();
-  for (int i = 0; i < size; i++) {
-    if(fabsf(NDEV * hsend[i] - hrecv[i]) > 0.001f){
-        printf("At entry %i\n", i);
-        printf("Expected %f\n", hsend[i]);
-        printf("Received %f\n", hrecv[i]);
-        return EXIT_FAILURE;
-    }
-  }
-  printf("TESTS PASSED!\n");
-
-  for (int i = 0; i < NDEV; i++) {
-    hipSetDevice(i);
-    hipFree(sendbuff[i]);
-    hipFree(recvbuff[i]);
-  }
-
-  for(int i = 0; i < NDEV; ++i){
-      ncclCommDestroy(comms[i]);
-  }
-
-  free(hsend);
-  free(hrecv);
-}

Copied: rccl/repos/community-testing-x86_64/test.cpp (from rev 1396037, 
rccl/trunk/test.cpp)
===================================================================
--- test.cpp                            (rev 0)
+++ test.cpp    2023-02-07 21:39:44 UTC (rev 1396038)
@@ -0,0 +1,78 @@
+#include <stdio.h>
+#include <hip/hip_runtime.h>
+#include <rccl/rccl.h>
+#include <math.h>
+
+#define NDEV 1
+
+int main(int argc, char* argv[])
+{
+  ncclComm_t comms[NDEV];
+
+  int size = 100;
+  int devs[NDEV];
+  for(int i = 0; i < NDEV; i++){
+      devs[i] = i;
+  }
+
+  float* hsend = (float*) malloc(size * sizeof *hsend);
+  float* hrecv = (float*) malloc(size * sizeof *hrecv);
+
+  for (int i = 0; i < size; i++) {
+    hsend[i] = 1.0f;
+    hrecv[i] = 0.0f;
+  }
+
+  float* sendbuff[NDEV];
+  float* recvbuff[NDEV];
+  hipStream_t s[NDEV];
+  for (int i = 0; i < NDEV; i++) {
+    hipSetDevice(i);
+    hipMalloc(sendbuff + i, size * sizeof(float));
+    hipMalloc(recvbuff + i, size * sizeof(float));
+    hipMemcpy(sendbuff[i], hsend, size * sizeof *hsend, hipMemcpyHostToDevice);
+    hipMemcpy(recvbuff[i], hrecv, size * sizeof *hrecv, hipMemcpyHostToDevice);
+    hipStreamCreate(s+i);
+    hipDeviceSynchronize();
+  }
+
+  ncclCommInitAll(comms, NDEV, devs);
+
+  ncclGroupStart();
+  for (int i = 0; i < NDEV; i++)
+    ncclAllReduce(&sendbuff[i][0], &recvbuff[i][0], size, ncclFloat, ncclSum,
+        comms[i], s[i]);
+  ncclGroupEnd();
+
+
+  for (int i = 0; i < NDEV; i++) {
+    hipSetDevice(i);
+    hipStreamSynchronize(s[i]);
+  }
+ 
+  hipSetDevice(0);
+  hipMemcpy(hrecv, recvbuff[0], size * sizeof *hrecv, hipMemcpyDeviceToHost);
+  hipDeviceSynchronize();
+  for (int i = 0; i < size; i++) {
+    if(fabsf(NDEV * hsend[i] - hrecv[i]) > 0.001f){
+        printf("At entry %i\n", i);
+        printf("Expected %f\n", hsend[i]);
+        printf("Received %f\n", hrecv[i]);
+        return EXIT_FAILURE;
+    }
+  }
+  printf("TESTS PASSED!\n");
+
+  for (int i = 0; i < NDEV; i++) {
+    hipSetDevice(i);
+    hipFree(sendbuff[i]);
+    hipFree(recvbuff[i]);
+  }
+
+  for(int i = 0; i < NDEV; ++i){
+      ncclCommDestroy(comms[i]);
+  }
+
+  free(hsend);
+  free(hrecv);
+}

Deleted: test.sh
===================================================================
--- test.sh     2023-02-07 21:39:33 UTC (rev 1396037)
+++ test.sh     2023-02-07 21:39:44 UTC (rev 1396038)
@@ -1,5 +0,0 @@
-#! /usr/bin/env sh
-
-OUT=$(mktemp -d)
-/opt/rocm/bin/hipcc -o "$OUT"/test test.cpp -lrccl
-"$OUT"/test

Copied: rccl/repos/community-testing-x86_64/test.sh (from rev 1396037, 
rccl/trunk/test.sh)
===================================================================
--- test.sh                             (rev 0)
+++ test.sh     2023-02-07 21:39:44 UTC (rev 1396038)
@@ -0,0 +1,5 @@
+#! /usr/bin/env sh
+
+OUT=$(mktemp -d)
+/opt/rocm/bin/hipcc -o "$OUT"/test test.cpp -lrccl
+"$OUT"/test

Reply via email to