diff options
Diffstat (limited to 'dev-libs/rocm-opencl-runtime')
6 files changed, 271 insertions, 3 deletions
diff --git a/dev-libs/rocm-opencl-runtime/Manifest b/dev-libs/rocm-opencl-runtime/Manifest index 4a6a6f92c044..96cb17de9b25 100644 --- a/dev-libs/rocm-opencl-runtime/Manifest +++ b/dev-libs/rocm-opencl-runtime/Manifest @@ -1,13 +1,17 @@ AUX rocclr-5.3.3-fix-include.patch 6053 BLAKE2B e215cefd0f2895beda0e3c029a24e48f4de5060dcc10ccdcb4fdf8771d78a66c59f8b0cfe69d70eed3a80aea2c30e30b41607e1a43a77f4b322fa264dcb539e9 SHA512 636f3b91e6c509d1b34ae0d6757a830bc796429c56d0458137a51b9bf4c8575126de7b8259d761b44bc5888839cdb349fdb35c192d1e92e9ef39a6f671997113 -AUX rocclr-5.3.3-gcc13.patch 706 BLAKE2B dd5561a039d19293290f3cb3234fa5ce98fbcdc7957c60d1cf07edb4a9d557e3b08d355cbf3ca08ee1a592488bf7c0d948c325a3a39fc75f0779f2c4787f81f3 SHA512 dd8b663b35600b1b190e9e3c516be52cf4b55a36d67df7d000826da4654642c9397743a26f289ad7187d8760f40cb84342a9e56075c5026fe652018a23c213b8 +AUX rocclr-5.3.3-gcc13.patch 776 BLAKE2B f34e6167a13dc65a88535492bc0cac7f62fc1c3844bc64170be6b59ae024acc5a776a99c1040a16959c2295012394bc103d64919012b2f76463fa52762a98101 SHA512 ec67a5a04f76204674ed1121f19c642a7eb95656d32da3c0776ba87a5a0a475df60ecb890dbefad069ef5463ea3b3fe3c8da836a878081b7c3ed5df2ac69c94c AUX rocm-opencl-runtime-3.5.0-do-not-install-libopencl.patch 548 BLAKE2B ae4234422acdc1fdf0bd82a0469f63239e709c0626e3918d34e6a023b70452eed98aea1725a3638ee8f46d54d08ca885bf114ad3a7689baaa18794a6d5c983b9 SHA512 27682bb65e281744556c2a99c38ae7b3e22e3306ff10ceb98d8c3204950982b17521309dd11d36e1a07ca33b8448dae1270fa31004db9841025ff9a9e9af3d4c AUX rocm-opencl-runtime-5.0.2-enable-gfx800.patch 970 BLAKE2B 4080ab450457c21de1c81c7e9eebc75578d7326430732f2dab5688150347de2b7977d8804573fd79bb1d14a2e5b87ede0de41cd7c7920f90fe8762686198f931 SHA512 b4f653fbe1b51e789a8213e37c5e6c43d7035e7971c483a3e24903e1d46bdbf206575b16ac6c78b5c32ba4e32dfa428339723b58f672716c05e51c785543c535 AUX rocm-opencl-runtime-5.1.3-remove-clinfo.patch 1178 BLAKE2B b708214f9c4a6860a23281e8ece176d4b1968fc005e1b95a88e67752a8c60a23a7f66ff267ef909ddee4a45f4c8441339ea6f5de867d77df10c98d8043bb54d4 SHA512 626574b948a16cd59513496791bd73a5c1f3bda68ae9e01ea982bd036858f7c8817ea33a22e85f180cecdbe19d999afb2604c8cb549bdd71d4bfc56c18f5d4ad -AUX rocm-opencl-runtime-5.3.3-gcc13.patch 721 BLAKE2B 5ae141614f6c95a6454f184004de7e5b5fa11aa63c44392eb609efb850a60159285e1de8e17ada68f0f246fb9302c4a05f421f90c52e56143e96ca706830c0f2 SHA512 f8d65268e9f76df5057f3a6e19b038e5ea0694164e38aa05d79819e98787e9820605ed3c176a03b438d44c25ad9aa4d59baa8ecd5ca065027bc1b18e2dfada26 +AUX rocm-opencl-runtime-5.3.3-gcc13.patch 791 BLAKE2B 6b284cb6cd9b273ee6d21850f7a29f75079567c70bdb263b3b95b27632ac71dd5e0be1200db58281c3ac737ff9d042dbd87615300e6182c9f43425098ae3389c SHA512 9edcfed7d5a5ed8e5aa1ccd8e09639d95ef373878eb7bc4ad65aa38539d8138c1d589056ffe9fd95cb18e95aebef3f206f5731557a1451758cbf3ae0e7b30e21 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 rocclr-5.4.3.tar.gz 640557 BLAKE2B 9ab91bab7ffb06c9c0d1c2ae79533fccc597071dda289ac375e32eb2965c638a7029951d2a49d46eeead9d7d242fe3a0cedb3e444d877af1bbf0e2d801c91e11 SHA512 c1d1a2ca08c2d762a221c04d394469aa7aff46086151333b145e0db9a7c7eb3dbbf8b9693e50d816aa9a13c16b4ebacf5ff3d5d8ff3393a8a764728ef5172d3a 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 +DIST rocm-opencl-runtime-5.4.3.tar.gz 1005268 BLAKE2B f9398e4c2b0f045f1b5d8df9f31b7f2bef6a9201885aa6ee5fc5d71632cfde26a078d9a5ea38c3da12d3c187faf04c7bdcf1a8ecb9927cdba56b1efdfcdc44ee SHA512 f65d4622ce8721a6b91ab5b5b306d142ba507d3e631ac3ab0b76c5bc6d8d18455e02debd954c82e7eb609f232b509f1ec1a013dc2fad467c2c2ad31fdf15755d EBUILD rocm-opencl-runtime-5.1.3.ebuild 3862 BLAKE2B dcafdf4ab1160b25ebe915a01309dd4b17afbc4234637cded23c727f99fda56b6c3bad7cfc0c9ed3aee080f5ce00fa61409ff39600580454b48e0b7bb0dec257 SHA512 0d3d636980e132e909a0df480698331e92d2a8c0fc11158c26f159003632985927c626f9f23873e6a0c090f3993cd3ecf94250c06e3549416aaf349ace6426cd EBUILD rocm-opencl-runtime-5.3.3-r1.ebuild 3439 BLAKE2B d792a570030d12d5750fbfa928e1d66f240459aae3dfb8f5f6cbea46ef6349eee4b567644c3efded318885276e8c5d1bc88436dc2ba483b92b67f6dfbb684852 SHA512 330dc61720dc774146b604ca392610ca1b07f4785231172a01cc0a1618fda9af01c72d92539e40e6d13ba6e10fc1a30664a2384b4152e6a965e88305490baca4 -MISC metadata.xml 381 BLAKE2B fbd9237f4928b42544799482f55fc0e72e872a554bf96c3066ea59213e7d840d432c320f834cc333a09498d6deabb0fc751657ad0e861be7997fba6f1788ffac SHA512 8d05a33637e38b0596a98f5dfee096a91bba41ca16c4eba5f5e93f05f800290c480a0393bf4d5a7ce70cbff0a541b95e52d3c95b02cc7a079343c8f740b8e479 +EBUILD rocm-opencl-runtime-5.4.3.ebuild 3817 BLAKE2B 0041427e375f41caa0d6b16e3815686d2ba7a0f246c1e07d3ecb3ff2c0e0e13203dac9791fc332d7b235c774c62aba649124b65bbedbaaacb7d7065d2b6e69f0 SHA512 65eaff4c2af3b91fb1d1adda7e9a545954afebcab02109b921f3d4528d0020912f5da8ed5b242b10d2535a7b54c215385b07cdd454df7dbaa79bd6fec646a6c9 +EBUILD rocm-opencl-runtime-9999.ebuild 3720 BLAKE2B adbf87566b21defccd420ed65a350a31d4e775bd876392eca8f67c16083530efd2a0566052ba07b0b71346c178217e71888f4b412e69a9db2525cafc840446cf SHA512 96ec382f016e00ce391100bca0c6f9a8b3c2f7ade745b6b3455ff3bad57c48d0eb3db06a5ac2cf0c272d55bb3efff6806c44f43581b9562bc348515d161a605c +MISC metadata.xml 525 BLAKE2B 9af34c6be2bb5ff304e4d01810b810eb8a0639d1972325fad3b81c93aa4d060cbebddc9c06da702dd80f9aa98549720cf2bc674d5b11ef6f99ed30efe50d2110 SHA512 c50670dde49ec0d9d3acca19d37842ecf567429f455e1b37c5181e5d4361d829eff0980ba35096ef42c0789f8904d52425faf4a2aabf641142722957b626378d diff --git a/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-gcc13.patch b/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-gcc13.patch index 17a64d20bf1e..a86cd9fa120e 100644 --- a/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-gcc13.patch +++ b/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-gcc13.patch @@ -1,3 +1,5 @@ +For https://bugs.gentoo.org/895382 +================================== From ca70cd7c3d63b1036e604116f3b269ca123e7904 Mon Sep 17 00:00:00 2001 From: Jeremy Newton <Jeremy.Newton@amd.com> Date: Wed, 8 Feb 2023 14:03:58 -0500 diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.3.3-gcc13.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.3.3-gcc13.patch index 01b3a68e70be..b1cd513ce6b7 100644 --- a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.3.3-gcc13.patch +++ b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.3.3-gcc13.patch @@ -1,3 +1,5 @@ +For https://bugs.gentoo.org/895382 +================================== From 767241dca886bcd2469d91382afab9d032e1cfa6 Mon Sep 17 00:00:00 2001 From: Jeremy Newton <Jeremy.Newton@amd.com> Date: Wed, 8 Feb 2023 14:16:43 -0500 diff --git a/dev-libs/rocm-opencl-runtime/metadata.xml b/dev-libs/rocm-opencl-runtime/metadata.xml index 7fe466feffeb..c815e421fb36 100644 --- a/dev-libs/rocm-opencl-runtime/metadata.xml +++ b/dev-libs/rocm-opencl-runtime/metadata.xml @@ -5,6 +5,10 @@ <email>candrews@gentoo.org</email> <name>Craig Andrews</name> </maintainer> + <maintainer type="person" proxied="yes"> + <email>xgreenlandforwyy@gmail.com</email> + <name>Yiyang Wu</name> + </maintainer> <upstream> <remote-id type="github">RadeonOpenCompute/ROCm-OpenCL-Runtime</remote-id> </upstream> diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.4.3.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.4.3.ebuild new file mode 100644 index 000000000000..cd0084f89cdb --- /dev/null +++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.4.3.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake edo flag-o-matic + +DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime" +HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime" + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime" + EGIT_CLR_REPO_URI="https://github.com/ROCm-Developer-Tools/ROCclr" + inherit git-r3 + S="${WORKDIR}/${P}" +else + 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" + S="${WORKDIR}/ROCm-OpenCL-Runtime-rocm-${PV}" +fi + +LICENSE="Apache-2.0 MIT" +SLOT="0/$(ver_cut 1-2)" +IUSE="debug test" +RESTRICT="!test? ( test )" + +RDEPEND=">=dev-libs/rocr-runtime-5.3 + >=dev-libs/rocm-comgr-5.3 + >=dev-libs/rocm-device-libs-5.3 + >=virtual/opencl-3 + media-libs/mesa" +DEPEND="${RDEPEND}" +BDEPEND=">=dev-util/rocm-cmake-5.3 + media-libs/glew + test? ( >=x11-apps/mesa-progs-8.5.0[X] ) + " + +CLR_S="${WORKDIR}/ROCclr-rocm-${PV}" +PATCHES=( "${FILESDIR}/${PN}-5.3.3-gcc13.patch" ) + +src_unpack () { +if [[ ${PV} == "9999" ]]; then + git-r3_fetch + git-r3_checkout + git-r3_fetch "${EGIT_CLR_REPO_URI}" + git-r3_checkout "${EGIT_CLR_REPO_URI}" "${CLR_S}" + else + default + fi +} +src_prepare() { + cmake_src_prepare + + pushd ${CLR_S} || die + # Bug #753377 + # patch re-enables accidentally disabled gfx800 family + eapply "${FILESDIR}/${PN}-5.0.2-enable-gfx800.patch" + eapply "${FILESDIR}/rocclr-5.3.3-gcc13.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="${CLR_S}" + -DAMD_OPENCL_PATH="${S}" + -DROCM_PATH="${EPREFIX}/usr" + -DBUILD_TESTS=$(usex test ON OFF) + -DEMU_ENV=ON + -DBUILD_ICD=OFF + -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF + ) + 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 $(realpath liboclgl.so) -A ogl.exclude + eend $? || die "oclgl test failed" + else + ewarn "${instruction1}" + ewarn "${instruction2}" + die "\${OCLGL_DISPLAY} not set." + fi + edob ./ocltst -m $(realpath liboclruntime.so) -A oclruntime.exclude + edob ./ocltst -m $(realpath liboclperf.so) -A oclperf.exclude +} diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-9999.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-9999.ebuild new file mode 100644 index 000000000000..2fdb4a002b1c --- /dev/null +++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-9999.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake edo flag-o-matic + +DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime" +HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime" + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime" + EGIT_CLR_REPO_URI="https://github.com/ROCm-Developer-Tools/ROCclr" + inherit git-r3 + S="${WORKDIR}/${P}" +else + 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" + S="${WORKDIR}/ROCm-OpenCL-Runtime-rocm-${PV}" +fi + +LICENSE="Apache-2.0 MIT" +SLOT="0/$(ver_cut 1-2)" +IUSE="debug test" +RESTRICT="!test? ( test )" + +RDEPEND=">=dev-libs/rocr-runtime-5.3 + >=dev-libs/rocm-comgr-5.3 + >=dev-libs/rocm-device-libs-5.3 + >=virtual/opencl-3 + media-libs/mesa" +DEPEND="${RDEPEND}" +BDEPEND=">=dev-util/rocm-cmake-5.3 + media-libs/glew + test? ( >=x11-apps/mesa-progs-8.5.0[X] ) + " + +CLR_S="${WORKDIR}/ROCclr-rocm-${PV}" + +src_unpack () { +if [[ ${PV} == "9999" ]]; then + git-r3_fetch + git-r3_checkout + git-r3_fetch "${EGIT_CLR_REPO_URI}" + git-r3_checkout "${EGIT_CLR_REPO_URI}" "${CLR_S}" + else + default + fi +} +src_prepare() { + cmake_src_prepare + + pushd ${CLR_S} || 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="${CLR_S}" + -DAMD_OPENCL_PATH="${S}" + -DROCM_PATH="${EPREFIX}/usr" + -DBUILD_TESTS=$(usex test ON OFF) + -DEMU_ENV=ON + -DBUILD_ICD=OFF + -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF + ) + 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 $(realpath liboclgl.so) -A ogl.exclude + eend $? || die "oclgl test failed" + else + ewarn "${instruction1}" + ewarn "${instruction2}" + die "\${OCLGL_DISPLAY} not set." + fi + edob ./ocltst -m $(realpath liboclruntime.so) -A oclruntime.exclude + edob ./ocltst -m $(realpath liboclperf.so) -A oclperf.exclude +} |