libraries/opencl-amd: Updated for version 22.20.3.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Ciprian Stingu 2024-03-29 21:24:22 +07:00 committed by Willy Sudiarto Raharjo
parent 9df262b25e
commit 64d26550a6
No known key found for this signature in database
GPG key ID: 3F617144D7238786
4 changed files with 177 additions and 107 deletions

View file

@ -1,10 +1,9 @@
OpenCL userspace driver as provided in the amdgpu-pro driver stack and
intended to work along with the free amdgpu stack. It's a repackage
of AUR opencl-amd and don't provide the full amdgpu-pro stack.
intended to work along with the free amdgpu stack.
It's a repackage of AUR opencl-amd and don't provide the full
amdgpu-pro stack.
The Ubuntu 18.04 drivers can be downloaded using:
/usr/bin/wget --referer \
https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx \
--timestamping \
https://drivers.amd.com/drivers/linux/19.50/amdgpu-pro-19.50-967956-ubuntu-18.04.tar.xz
Current version: proprietary drivers 22.20.3 / ROCM 5.2.3
This package works on Slackware 15
For a newer libclc (18.1.2) which could be used in Slackware 15, see
libclc package.

View file

@ -1,13 +1,12 @@
#!/bin/bash
# Copyright 2020 Ciprian Stingu <ciprian dot stingu at gmail dot com>
# Copyright 2024 Ciprian Stingu <ciprian dot stingu at gmail dot com>
# Repackage of AUR : opencl-amd.git for Slackware
# Last version of OpenCL AMD drivers which works with GLIBC 2.33
#
# Original credits of AUR : opencl-amd.git
# Maintainer: Christopher Snowhill <kode54 at gmail dot com>
# Contributor: ipha <ipha00 at gmail dot com>
# Contributor: johnnybash <georgpfahler at wachenzell dot org>
# Contributor: grmat <grmat at sub dot red>
# Maintainer: Carson Rueter <roachh at proton mail dot com>
# Co-Maintainer: George Sofianos
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
@ -26,38 +25,26 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220301 bkw: Modified by SlackBuilds.org, BUILD=2:
# - do not include -$MINVER in the package filename: for one thing,
# dashes aren't allowed in package version numbers.
# - install shared libs executable.
# - include standard Slackware doc dir, with this SlackBuild in it.
# - include a copy of amdgpu.ids, rather than a symlink to the system one.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM="opencl-amd"
VERSION=${VERSION:-19.50}
MINVER="967956"
AMDVER="2.4.99"
BUILD=${BUILD:-2}
VERSION=${VERSION:-22.20.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
SRCNAM="amdgpu-pro-${VERSION}-${MINVER}-ubuntu-18.04"
CLINFO_SHARED="opt/amdgpu-pro/bin"
OPENCL_SHARED="opt/amdgpu-pro/lib/x86_64-linux-gnu"
LIBDRM_SHARED="opt/amdgpu/lib/x86_64-linux-gnu"
# Allow $ARCH to be preset before running the script. This is useful in the
# case where someone is running a 32-bit chroot environment under an x86_64
# kernel:
ARCH=${ARCH:-$(uname -m)}
case "$ARCH" in
x86_64) DEBARCH="amd64" ; LIBDIRSUFFIX="64" ; ARCH=x86_64 ;;
*) echo "Package for $(uname -m) architecture is not available." ; exit 1 ;;
esac
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
if [ ! $UID = 0 ]; then
cat << EOF
@ -67,82 +54,106 @@ EOF
exit 1
fi
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG="${TMP}/package-${PRGNAM}"
SRCDIR="${TMP}/${SRCNAM}"
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
rm -rf "${PKG}"
mkdir -p "${TMP}" "${PKG}" "${OUTPUT}"
cd "${TMP}"
rm -rf ${SRCDIR}
tar -xf "${CWD}/${SRCNAM}.tar.xz"
rm -rf "${TMP}/opencl"
rm -rf "${TMP}/libdrm"
#start AUR : opencl-amd.git
mkdir -p "${TMP}/opencl"
cd "${TMP}/opencl"
# clinfo
ar x "${SRCDIR}/clinfo-amdgpu-pro_${VERSION}-${MINVER}_${DEBARCH}.deb"
tar xJf "data.tar.xz"
# pal
ar x "${SRCDIR}/opencl-amdgpu-pro-icd_${VERSION}-${MINVER}_${DEBARCH}.deb"
tar xJf "data.tar.xz"
ar x "${SRCDIR}/opencl-amdgpu-pro-comgr_${VERSION}-${MINVER}_${DEBARCH}.deb"
tar xJf "data.tar.xz"
# orca
ar x "${SRCDIR}/opencl-orca-amdgpu-pro-icd_${VERSION}-${MINVER}_${DEBARCH}.deb"
tar xJf "data.tar.xz"
cd "${OPENCL_SHARED}"
exz() {
# echo "File:" $1
ar x $1 data.tar.xz
tar xJf data.tar.xz
rm data.tar.xz
}
egz() {
# echo "File:" $1
ar x $1 data.tar.gz
tar xfx data.tar.gz
rm data.tar.gz
}
AMDGPU="opt/amdgpu"
AMDGPU_PRO="opt/amdgpu-pro"
# LIBDRM
exz "${CWD}/libdrm-amdgpu-amdgpu1_2.4.110.50203-1462318~22.04_${DEBARCH}.deb"
# ROCM
egz "${CWD}/rocm-core_5.2.3.50203-109_${DEBARCH}.deb"
egz "${CWD}/comgr_2.4.0.50203-109_${DEBARCH}.deb"
egz "${CWD}/hip-dev_5.2.21153.50203-109_${DEBARCH}.deb"
egz "${CWD}/hip-doc_5.2.21153.50203-109_${DEBARCH}.deb"
egz "${CWD}/hip-samples_5.2.21153.50203-109_${DEBARCH}.deb"
egz "${CWD}/hsakmt-roct-dev_20220426.1.026.50203-109_${DEBARCH}.deb"
egz "${CWD}/hsa-rocr_1.5.0.50203-109_${DEBARCH}.deb"
egz "${CWD}/hsa-rocr-dev_1.5.0.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocminfo_1.0.0.50203-109_${DEBARCH}.deb"
egz "${CWD}/hip-runtime-amd_5.2.21153.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-device-libs_1.0.0.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-language-runtime_5.2.3.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-hip-runtime_5.2.3.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-ocl-icd_2.0.0.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-opencl_2.0.0.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-opencl-dev_2.0.0.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-opencl-runtime_5.2.3.50203-109_${DEBARCH}.deb"
# ROCM DEV
egz "${CWD}/rocm-clang-ocl_0.5.0.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-smi-lib_5.0.0.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-cmake_0.7.3.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-dbgapi_0.65.1.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-debug-agent_2.0.3.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-utils_5.2.3.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocprofiler-dev_1.0.0.50203-109_${DEBARCH}.deb"
egz "${CWD}/roctracer-dev_1.0.0.50203-109_${DEBARCH}.deb"
egz "${CWD}/rocm-dev_5.2.3.50203-109_${DEBARCH}.deb"
egz "${CWD}/hsa-amd-aqlprofile_1.0.0.50203-109_${DEBARCH}.deb"
exz "${CWD}/openmp-extras_14.52.0.50203-109_${DEBARCH}.deb"
exz "${CWD}/rocm-gdb_11.2.50203-109_${DEBARCH}.deb"
# Proprietary
exz "${CWD}/opencl-legacy-amdgpu-pro-icd_22.20-1462318~22.04_${DEBARCH}.deb"
cd ${CWD}/${AMDGPU_PRO}/lib/x86_64-linux-gnu
sed -i "s|libdrm_amdgpu|libdrm_amdgpo|g" libamdocl-orca64.so
# libdrm
mkdir -p "${TMP}/libdrm"
cd "${TMP}/libdrm"
ar x "${SRCDIR}/libdrm-amdgpu-amdgpu1_${AMDVER}-${MINVER}_${DEBARCH}.deb"
tar xJf "data.tar.xz"
cd "${LIBDRM_SHARED}"
cd ${CWD}/${AMDGPU}/lib/x86_64-linux-gnu
rm "libdrm_amdgpu.so.1"
mv "libdrm_amdgpu.so.1.0.0" "libdrm_amdgpo.so.1.0.0"
ln -s "libdrm_amdgpo.so.1.0.0" "libdrm_amdgpo.so.1"
ln -f -s "libdrm_amdgpo.so.1.0.0" "libdrm_amdgpo.so.1"
mv "${TMP}/opencl/etc" "${PKG}/"
mkdir -p "${PKG}/usr/lib${LIBDIRSUFFIX}"
mkdir -p "${PKG}/usr/bin"
# clinfo
mv "${TMP}/opencl/${CLINFO_SHARED}/clinfo" "${PKG}/usr/bin/"
# pal
mv "${TMP}/opencl/${OPENCL_SHARED}/libamdocl64.so" "${PKG}/usr/lib${LIBDIRSUFFIX}/"
mv "${TMP}/opencl/${OPENCL_SHARED}/libamd_comgr.so" "${PKG}/usr/lib${LIBDIRSUFFIX}/"
# orca
mv "${TMP}/opencl/${OPENCL_SHARED}/libamdocl-orca64.so" "${PKG}/usr/lib${LIBDIRSUFFIX}/"
mv "${TMP}/opencl/${OPENCL_SHARED}/libamdocl12cl64.so" "${PKG}/usr/lib${LIBDIRSUFFIX}/"
# libdrm
mv "${TMP}/libdrm/${LIBDRM_SHARED}/libdrm_amdgpo.so.1.0.0" "${PKG}/usr/lib${LIBDIRSUFFIX}/"
chmod 755 $PKG/usr/lib*/lib*.so*
mv "${TMP}/libdrm/${LIBDRM_SHARED}/libdrm_amdgpo.so.1" "${PKG}/usr/lib${LIBDIRSUFFIX}/"
# legacy
mkdir -p ${PKG}/usr/lib${LIBDIRSUFFIX}
mv "${CWD}/${AMDGPU_PRO}/lib/x86_64-linux-gnu/libamdocl-orca64.so" "${PKG}/usr/lib${LIBDIRSUFFIX}/"
rm -r "${CWD}/${AMDGPU_PRO}/"
mv "${CWD}/${AMDGPU}/lib/x86_64-linux-gnu/libdrm_amdgpo.so.1.0.0" "${PKG}/usr/lib${LIBDIRSUFFIX}/"
mv "${CWD}/${AMDGPU}/lib/x86_64-linux-gnu/libdrm_amdgpo.so.1" "${PKG}/usr/lib${LIBDIRSUFFIX}/"
rm -r "${CWD}/${AMDGPU}/"
mv -b "${CWD}/opt/" "${PKG}/"
ln -f -s "rocm-5.2.3" "$PKG/opt/rocm"
mkdir -p "${PKG}/opt/amdgpu/share/libdrm"
cd "${PKG}/opt/amdgpu/share/libdrm"
cp "/usr/share/libdrm/amdgpu.ids" "amdgpu.ids"
ln -s -f /usr/share/libdrm/amdgpu.ids amdgpu.ids
rm -rf "${TMP}/opencl"
rm -rf "${TMP}/libdrm"
mkdir -p ${PKG}/etc/OpenCL/vendors
echo libamdocl64.so > "${PKG}/etc/OpenCL/vendors/amdocl64.icd"
echo libamdocl-orca64.so > "${PKG}/etc/OpenCL/vendors/amdocl-orca64.icd"
rm -r "${CWD}/etc"
rm -r "${CWD}/usr"
mkdir -p ${PKG}/etc/ld.so.conf.d
echo /opt/rocm-5.2.3/opencl/lib > "$PKG/etc/ld.so.conf.d/opencl-amd.conf"
echo /opt/rocm-5.2.3/lib >> "$PKG/etc/ld.so.conf.d/opencl-amd.conf"
echo /opt/rocm-5.2.3/hip/lib >> "$PKG/etc/ld.so.conf.d/opencl-amd.conf"
mkdir -p ${PKG}/etc/profile.d
echo export PATH="\${PATH}:/opt/rocm-5.2.3/bin:/opt/rocm-5.2.3/hip/bin" > "$PKG/etc/profile.d/opencl-amd.sh"
#end AUR : opencl-amd.git
chmod 0755 $PKG/etc/profile.d/opencl-amd.sh
mkdir -p "${PKG}/install"
cat "${CWD}/slack-desc" > "${PKG}/install/slack-desc"
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cd ${PKG}
chown -R root:root .
find -L . \
@ -151,4 +162,4 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
/sbin/makepkg -l y -c n "${OUTPUT}/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.$PKGTYPE"
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

View file

@ -1,10 +1,70 @@
PRGNAM="opencl-amd"
VERSION="19.50"
HOMEPAGE="https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
DOWNLOAD_x86_64="https://ponce.cc/slackware/sources/repo/amdgpu-pro-19.50-967956-ubuntu-18.04.tar.xz"
MD5SUM_x86_64="aa0df956b488789896b82359ddb856c8"
VERSION="22.20.3"
HOMEPAGE="https://docs.amd.com/bundle/ROCm-Release-Notes-v5.2/page/About_This_Document.html"
DOWNLOAD="https://repo.radeon.com/amdgpu/22.20.3/ubuntu/pool/main/libd/libdrm-amdgpu/libdrm-amdgpu-amdgpu1_2.4.110.50203-1462318~22.04_amd64.deb"
MD5SUM="cd291312140d06b001381991c3e6ce24"
DOWNLOAD_x86_64="https://repo.radeon.com/amdgpu/22.20.3/ubuntu/pool/main/libd/libdrm-amdgpu/libdrm-amdgpu-amdgpu1_2.4.110.50203-1462318~22.04_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-core/rocm-core_5.2.3.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/c/comgr/comgr_2.4.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/h/hip-dev/hip-dev_5.2.21153.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/h/hip-doc/hip-doc_5.2.21153.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/h/hip-samples/hip-samples_5.2.21153.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/h/hsakmt-roct-dev/hsakmt-roct-dev_20220426.1.026.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/h/hsa-rocr/hsa-rocr_1.5.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/h/hsa-rocr-dev/hsa-rocr-dev_1.5.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocminfo/rocminfo_1.0.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/h/hip-runtime-amd/hip-runtime-amd_5.2.21153.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-device-libs/rocm-device-libs_1.0.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-language-runtime/rocm-language-runtime_5.2.3.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-hip-runtime/rocm-hip-runtime_5.2.3.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-ocl-icd/rocm-ocl-icd_2.0.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-opencl/rocm-opencl_2.0.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-opencl-dev/rocm-opencl-dev_2.0.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-opencl-runtime/rocm-opencl-runtime_5.2.3.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-clang-ocl/rocm-clang-ocl_0.5.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/o/openmp-extras/openmp-extras_14.52.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-smi-lib/rocm-smi-lib_5.0.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-cmake/rocm-cmake_0.7.3.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-dbgapi/rocm-dbgapi_0.65.1.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-debug-agent/rocm-debug-agent_2.0.3.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-gdb/rocm-gdb_11.2.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-utils/rocm-utils_5.2.3.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocprofiler-dev/rocprofiler-dev_1.0.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/roctracer-dev/roctracer-dev_1.0.0.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/r/rocm-dev/rocm-dev_5.2.3.50203-109_amd64.deb \
https://repo.radeon.com/rocm/apt/5.2.3/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50203-109_amd64.deb \
https://repo.radeon.com/amdgpu/22.20.3/ubuntu/pool/proprietary/o/opencl-legacy-amdgpu-pro/opencl-legacy-amdgpu-pro-icd_22.20-1462318~22.04_amd64.deb"
MD5SUM_x86_64="cd291312140d06b001381991c3e6ce24 \
9e9e454b2f01499b37e4776530eec533 \
b403a97a58f7d3802638e15dc8a566b2 \
95fbf52417c61aa2d441294af3fec030 \
363fc77283f55ba4e586f6026b06ff66 \
7f0c535e5044f79d9e1ba84a63ca6ebf \
ce728c0a2da5e76813cedbaaeee11d6a \
ed125f553e809c57a5cbed66e5937b33 \
68390897e6a4e504bf1e6360ae959f1b \
0c06b99160d3491a9247b9a645769e5f \
f6d5573414d7125d960ca69b0bd8f9a3 \
82d3a0780387c3cac6954bd16b12f9d5 \
e68951700313b6df59ed10c4dbc6489c \
e71692c2c3cb0d68db58601773305bba \
92f6a45225dff496b5388037f4f9b00c \
663bc9a9d4a3697df7c24767a24e1e26 \
ad278038e217d2ec6dfa7f2507dddbff \
af6ad62ba60ba4137ea8af7ddcee8a5b \
8fd3394fec76d9ceaadf3f24cf5ae5dd \
7cfbac553e7190c616c94dc0c53b7cdb \
e8856743812ca9b88e482573cad8dead \
680a433e33bba898e48f1155a235d9ce \
95de9c5569503fb51695b324b49645df \
7a841083b35338a757e63341ffd5ad29 \
b2c9710cb14f27a9314c39977d234c03 \
5c15a2d94b8a6a20c4f336657df1382a \
fd19d8932d7e1e70b313d075cedfc611 \
1a7f89261b907965aba5134fda33e973 \
4a28be2fdacfb192981e52bd5f3c517a \
a9f174669faabb44f696d2ec235d654e \
214f5f10b8806a1d6977af2a3a241493"
REQUIRES=""
MAINTAINER="Ciprian Stingu"
EMAIL="ciprian dot stingu at gmail dot com"

View file

@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
opencl-amd: opencl-amd (OpenCL Userspace Driver)
opencl-amd: opencl-amd (AMD OpenCL driver)
opencl-amd:
opencl-amd: OpenCL userspace driver as provided in the amdgpu-pro driver stack
opencl-amd: This package is intended to work along with the free amdgpu stack
opencl-amd:
opencl-amd:
opencl-amd:
opencl-amd: Homepage: https://support.amd.com/en-us/kb-articles/Pages/
opencl-amd: AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx
opencl-amd: ROCr OpenCL stack, supports Vega 10 and later products
opencl-amd: - Legacy OpenCL stack (Proprietary), supports legacy products
opencl-amd: older than Vega 10 - This package is intended to work
opencl-amd: along with the free amdgpu stack.
opencl-amd:
opencl-amd: Homepage: https://docs.amd.com/bundle/ROCm-Release-Notes-v5.2/
opencl-amd: page/About_This_Document.html
opencl-amd:
opencl-amd: