Created
August 20, 2019 10:36
-
-
Save rigred/4508e2e5f194e5d81a52588a67b7914c to your computer and use it in GitHub Desktop.
PKGBUILD for rocminfo 2.7.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Jakub Okoński <[email protected]> | |
# Maintainer: Rigo Reddig <[email protected]> | |
pkgname=rocminfo | |
pkgver=2.7.0 | |
pkgrel=1 | |
pkgdesc="ROCm info tools - rocm_agent_enumerator" | |
arch=(x86_64) | |
url="https://github.com/RadeonOpenCompute/rocminfo" | |
license=('NCSA') | |
makedepends=(git cmake ninja) | |
depends=(pciutils rocm-cmake rocr-runtime roct-thunk-interface) | |
source=("$pkgname-$pkgver.tar.gz::https://github.com/RadeonOpenCompute/rocminfo/archive/roc-$pkgver.tar.gz" | |
"sizeof_fix.patch") | |
md5sums=('da82c4a17ee0d760485387c562818bdb' | |
'5674052b93693483b3cddd65dbd9ad21') | |
prepare() { | |
cd $srcdir/$pkgname-roc-$pkgver | |
patch --forward -i "${srcdir}/sizeof_fix.patch" | |
} | |
build() { | |
mkdir -p "$srcdir/$pkgname-roc-$pkgver/build" | |
cd "$srcdir/$pkgname-roc-$pkgver/build" | |
# TODO: fix rocminfo binary, it contains references to $srcdir | |
cmake -DCMAKE_PREFIX_PATH=/opt/rocm \ | |
-DCMAKE_INSTALL_PREFIX="$pkgdir/opt/rocm" \ | |
-DROCM_DIR=/opt/rocm \ | |
-G Ninja \ | |
"$srcdir/rocminfo-roc-$pkgver" | |
ninja | |
} | |
package() { | |
ninja -C "$srcdir/$pkgname-roc-$pkgver/build" install | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/rocminfo-roc-2.7.0/rocminfo.cc b/src/rocminfo-roc-2.7.0/rocminfo.cc | |
index 9fddcfb..30bbc97 100755 | |
--- a/src/rocminfo-roc-2.7.0/rocminfo.cc | |
+++ b/src/rocminfo-roc-2.7.0/rocminfo.cc | |
@@ -72,7 +72,7 @@ | |
char* err_str = NULL; \ | |
if (hsa_status_string(err, \ | |
(const char**)&err_str) != HSA_STATUS_SUCCESS) { \ | |
- snprintf(&(err_val[0]), sizeof(err_val[12]), "%#x", (uint32_t)err); \ | |
+ snprintf(&(err_val[0]), sizeof(err_val), "%#x", (uint32_t)err); \ | |
err_str = &(err_val[0]); \ | |
} \ | |
printf("%shsa api call failure at: %s:%d\n", \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment