mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
dev-libs/rocm-opencl-runtime: add 5.3.3
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
DIST rocclr-5.0.2.tar.gz 853965 BLAKE2B a0d568eb3b230845970d8256a5a2f32018e4b9fb68e0f1aa13a1f3fc953e614025315b90cbe68c107f7150cf91b4b1ea438455429062c7dc06ef77d65dedd2ec SHA512 b30a57c09973d8ef624511f422babaf9722685b9f85643783aebc000671b41fd54f44b308cece0baab187e1ee00b10335c6d22b6bad6fb3468abe6ef0da97d73
|
||||
DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c SHA512 89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
|
||||
DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449 SHA512 3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
|
||||
DIST rocm-opencl-runtime-5.0.2.tar.gz 1004855 BLAKE2B e2c2beb987053204fbe8fda562ae65d6c1a58447e9e88bf1081aabeee6c9a10738fd8562114b564b647682438fdbd2c535db1008ac6e1cc4eb9a915998eeb3c7 SHA512 fa01d1fafc890181b9e67070353ee7c9100619494b7509cae1a3659f24ef1d00f650024cb24bdb0e6e7eacfdec1115e4683ec6f320228a19f41ae83321780780
|
||||
DIST rocm-opencl-runtime-5.1.3.tar.gz 1004765 BLAKE2B 64d9b42026d2be1d0e4aa666785699f6b4ec0584a927904a94bf830883050943503f8bdd7c97438a2fb11c71686a330d526f633959916c5c6c8da2e037841e79 SHA512 b83c3ae0bfad80f867bacce36710a8964f6dd7e64bf50da3ec6ce842217d6de63299d9ceaab9dc25a22252484520a85d02859809463dad5dda9b1f00a86863e0
|
||||
DIST rocm-opencl-runtime-5.3.3.tar.gz 1007773 BLAKE2B a3f600a68183337f92b152a123241cb7025889cca2ef6814d9d5b5a2146a78703b171d20bcb432bc7a2cdd1f24ad349408c17816b25a66702e9f0f5345af9082 SHA512 391f0f244b7f02972df8cada821e69ee8d81d96b9cff3c14f1d0838da583d8fb136ec4bd5ee820f6dd261968e9eef5e9a5b10b7bb76b1b64625c399d79bcb03f
|
||||
|
||||
122
dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3.ebuild
Normal file
122
dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3.ebuild
Normal file
@@ -0,0 +1,122 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake edo flag-o-matic prefix
|
||||
|
||||
DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
|
||||
HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
|
||||
SRC_URI="https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-${PV}.tar.gz -> rocclr-${PV}.tar.gz
|
||||
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz -> rocm-opencl-runtime-${PV}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0 MIT"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
IUSE="debug test"
|
||||
RESTRICT="!test? ( test )"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RDEPEND=">=dev-libs/rocr-runtime-${PV}
|
||||
>=dev-libs/rocm-comgr-${PV}
|
||||
>=dev-libs/rocm-device-libs-${PV}
|
||||
>=virtual/opencl-3
|
||||
media-libs/mesa"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND=">=dev-util/rocm-cmake-${PV}
|
||||
media-libs/glew
|
||||
test? ( >=x11-apps/mesa-progs-8.5.0[X] )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-3.5.0-do-not-install-libopencl.patch"
|
||||
)
|
||||
|
||||
S="${WORKDIR}/ROCm-OpenCL-Runtime-rocm-${PV}"
|
||||
S1="${WORKDIR}/ROCclr-rocm-${PV}"
|
||||
|
||||
src_prepare() {
|
||||
# Remove "clinfo" - use "dev-util/clinfo" instead
|
||||
#[ -d tools/clinfo ] && rm -rf tools/clinfo || die
|
||||
|
||||
cmake_src_prepare
|
||||
|
||||
hprefixify amdocl/CMakeLists.txt
|
||||
|
||||
sed -e "s/DESTINATION lib/DESTINATION ${CMAKE_INSTALL_LIBDIR}/g" -i packaging/CMakeLists.txt || die
|
||||
# remove trailing CR or it won't work
|
||||
sed -e "s/\r$//g" -i tests/ocltst/module/perf/oclperf.exclude || die
|
||||
|
||||
pushd ${S1} || die
|
||||
# Bug #753377
|
||||
# patch re-enables accidentally disabled gfx800 family
|
||||
eapply "${FILESDIR}/${PN}-5.0.2-enable-gfx800.patch"
|
||||
popd || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Reported upstream: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
|
||||
append-cflags -fcommon
|
||||
|
||||
local mycmakeargs=(
|
||||
-Wno-dev
|
||||
-DROCCLR_PATH="${S1}"
|
||||
-DAMD_OPENCL_PATH="${S}"
|
||||
-DROCM_PATH="${EPREFIX}/usr"
|
||||
-DBUILD_TESTS=$(usex test ON OFF)
|
||||
-DEMU_ENV=ON
|
||||
# -DCMAKE_STRIP=""
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /etc/OpenCL/vendors
|
||||
doins config/amdocl64.icd
|
||||
|
||||
cd "${BUILD_DIR}" || die
|
||||
insinto /usr/lib64
|
||||
doins amdocl/libamdocl64.so
|
||||
doins tools/cltrace/libcltrace.so
|
||||
}
|
||||
|
||||
# Copied from rocm.eclass. This ebuild does not need amdgpu_targets
|
||||
# USE_EXPANDS, so it should not inherit rocm.eclass; it only uses the
|
||||
# check_amdgpu function in src_test. Rename it to check-amdgpu to avoid
|
||||
# pkgcheck warning.
|
||||
check-amdgpu() {
|
||||
for device in /dev/kfd /dev/dri/render*; do
|
||||
addwrite ${device}
|
||||
if [[ ! -r ${device} || ! -w ${device} ]]; then
|
||||
eerror "Cannot read or write ${device}!"
|
||||
eerror "Make sure it is present and check the permission."
|
||||
ewarn "By default render group have access to it. Check if portage user is in render group."
|
||||
die "${device} inaccessible"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_test() {
|
||||
check-amdgpu
|
||||
cd "${BUILD_DIR}"/tests/ocltst || die
|
||||
export OCL_ICD_FILENAMES="${BUILD_DIR}"/amdocl/libamdocl64.so
|
||||
local instruction1="Please start an X server using amdgpu driver (not Xvfb!),"
|
||||
local instruction2="and export OCLGL_DISPLAY=\${DISPLAY} OCLGL_XAUTHORITY=\${XAUTHORITY} before reruning the test."
|
||||
if [[ -n ${OCLGL_DISPLAY+x} ]]; then
|
||||
export DISPLAY=${OCLGL_DISPLAY}
|
||||
export XAUTHORITY=${OCLGL_XAUTHORITY}
|
||||
ebegin "Running oclgl test under DISPLAY ${OCLGL_DISPLAY}"
|
||||
if ! glxinfo | grep "OpenGL vendor string: AMD"; then
|
||||
ewarn "${instruction1}"
|
||||
ewarn "${instruction2}"
|
||||
die "This display does not have AMD OpenGL vendor!"
|
||||
fi
|
||||
./ocltst -m liboclgl.so -A ogl.exclude
|
||||
eend $? || die "oclgl test failed"
|
||||
else
|
||||
ewarn "${instruction1}"
|
||||
ewarn "${instruction2}"
|
||||
die "\${OCLGL_DISPLAY} not set."
|
||||
fi
|
||||
edob ./ocltst -m liboclruntime.so -A oclruntime.exclude
|
||||
edob ./ocltst -m liboclperf.so -A oclperf.exclude
|
||||
}
|
||||
Reference in New Issue
Block a user