diff options
Diffstat (limited to 'sci-libs')
35 files changed, 2055 insertions, 0 deletions
diff --git a/sci-libs/Manifest.gz b/sci-libs/Manifest.gz Binary files differindex a0944319eba6..6980a7437e65 100644 --- a/sci-libs/Manifest.gz +++ b/sci-libs/Manifest.gz diff --git a/sci-libs/hipBLAS/Manifest b/sci-libs/hipBLAS/Manifest index 0c5f580574d0..35e24d325900 100644 --- a/sci-libs/hipBLAS/Manifest +++ b/sci-libs/hipBLAS/Manifest @@ -1,5 +1,7 @@ DIST hipBLAS-4.3.0.tar.gz 428016 BLAKE2B 5a86f7a59aaed9cd6219779546135080f4c583a010f47b902f25545046c50451cd48e570b58c9c3721d735f3ab54295d5eddc61fecc01236e960e37fc87761c8 SHA512 128ee56d6db3d19c83b20fbc315eae8de6ee52aae6c2c5727351bab76c14d9131318cd49a6bcc724f5ec73485783058618bca4dddf96b05cd2f3a772c04f469f DIST hipBLAS-5.0.2.tar.gz 475009 BLAKE2B e7cb123c4ce08a8423f48816fe9248d580df59d089379c3c71eba8725470482cde591254cb2c4af7def390c702fdf6e6ddbe4fda70a6bc4579809c3e00e7d088 SHA512 40bccf8845467d14d614d2eba5482668167fa0488f118e30bbf4cf5fad3aea5e591f89ae2ae63bcb898cff624812d2f94572c18b8ed3d55d4bb254a440790c21 +DIST hipBLAS-5.1.3.tar.gz 526704 BLAKE2B d32d7029ea910c341e00dccab1ee9ab984518368cf38524f2264bb808cc1242b3d57db283937650f54460cb01174ec90f02c4bd66866cba4be5d0a1855814f0e SHA512 41dbc86b7ea53e7c0f1d629130f90b719f864ceddae972f1c68911e97b6233286f0c22c0fcfce049ae7db73a1ed41bdaf730040c72f1790fca367362c14ac707 EBUILD hipBLAS-4.3.0.ebuild 1229 BLAKE2B 2fcb641fbe83945020a84546e240b5b14094985d1afe40c144feebc9423ccbed344f01535a04aaaae53bbabcf97abf68315b2eb90df9b050d8b9e59728828d0b SHA512 f62e7b19d28d908863646492e6732563674fbcf07eb7eae68f32e7316085130b522d7c0665a0eee2074cb9fd08b4adeb166245066bc876693c0d52666dc2b6c4 EBUILD hipBLAS-5.0.2.ebuild 1221 BLAKE2B 3e19f4bd5b50dea3ffedc25533df0ef07df4c7c8c10e0643bebde58112680772ec3a8e7b01baeb9e1418834de242715381f7f9310fc96c22cffddb9506773311 SHA512 ae48ef2bb8aaa9ae7dac477ba72c194b8037d2ae237f83551336c601b6af48c7d98485896326b8b20fc5f533397d86fd52132a092d0bd39b6e06b87b63fe7944 +EBUILD hipBLAS-5.1.3.ebuild 1290 BLAKE2B 2d5722359ad1192d245a0d344aa2d3ab794f49be3cf7d6e0e90936d8813c29e7d2b96fb571f0b34aa5cf2883186bf20c5a4e8d974bba148ac20370b032176d1d SHA512 a95a0f8ae694e346aa00d4de3b09938515e8f104e731fa14936dd6f335996c32136d043f326887b8bcde718b5782cb464fc9a23641ea9641492fa21efee4b3a3 MISC metadata.xml 453 BLAKE2B 4c1e76cbc277e93a92a95cda405973cc72863882ab9a6729a07976e7815119e985688387c14fc5017fd6e85aaa64eaa72b900375c7f7428eb6bbb2569c5ecaa6 SHA512 0e42066a5ac8720d1b561bcf23269013d9cceff52a9ddd6a6e0af58c7d2628c335bb290e0dc6c262a0542e286f54fd07cb487dd908343fac5cfca07410df6e56 diff --git a/sci-libs/hipBLAS/hipBLAS-5.1.3.ebuild b/sci-libs/hipBLAS/hipBLAS-5.1.3.ebuild new file mode 100644 index 000000000000..3ac3a0ae1200 --- /dev/null +++ b/sci-libs/hipBLAS/hipBLAS-5.1.3.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} + +inherit cmake rocm +DESCRIPTION="ROCm BLAS marshalling library" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/hipBLAS" +SRC_URI="https://github.com/ROCmSoftwarePlatform/hipBLAS/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" +REQUIRED_USE="${ROCM_REQUIRED_USE}" + +LICENSE="MIT" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" + +RDEPEND="dev-util/hip + sci-libs/rocBLAS:${SLOT}[${ROCM_USEDEP}] + sci-libs/rocSOLVER:${SLOT}[${ROCM_USEDEP}]" +DEPEND="${RDEPEND}" +BDEPEND="" + +S="${WORKDIR}/hipBLAS-rocm-${PV}" + +src_prepare() { + sed -e "s:<INSTALL_INTERFACE\:include:<INSTALL_INTERFACE\:include/hipblas/:" -i library/src/CMakeLists.txt || die + sed -e "/PREFIX hipblas/d" -i library/src/CMakeLists.txt || die + sed -e "/rocm_install_symlink_subdir( hipblas )/d" -i library/src/CMakeLists.txt || die + sed -e "s:hipblas/include:include/hipblas:" -i library/src/CMakeLists.txt || die + + eapply_user + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DBUILD_CLIENTS_TESTS=OFF # currently hipBLAS is a wrapper of rocBLAS which has tests, so no need to perform test here + -DBUILD_CLIENTS_BENCHMARKS=OFF + ) + + cmake_src_configure +} diff --git a/sci-libs/hipCUB/Manifest b/sci-libs/hipCUB/Manifest index 1667787d0e08..a9fb8ccbe5fc 100644 --- a/sci-libs/hipCUB/Manifest +++ b/sci-libs/hipCUB/Manifest @@ -2,7 +2,9 @@ AUX hipCUB-4.3.0-add-memory-header.patch 421 BLAKE2B cd05a027dbf75098fd199783c0a DIST hipCUB-4.0.0.tar.gz 137513 BLAKE2B b7ef4d53037fba04771162ae8993def648f5e1401654286ffc6987bbb4b25baa1b1b14bc37035e1afe46eeffe3e564f244e339cdfd0e5a242574d248bf4683db SHA512 e778b94c86e09bf3b0bc043fb15ed8725387b875e8631a7e8599aee8da2d8085190effc9681d742fc0d286cc0c20762341f1f24699c8a52e9734611c716530d5 DIST hipCUB-4.3.0.tar.gz 154097 BLAKE2B 68a46f1416c969e4bf8e245c2aa8aee626f1e8089182ffb8f5090d540efe98606a616499d52b14da3733b3a6f4da690ea1718ea58fb6166351f4b4807f1b8228 SHA512 7c0abcf034d885615a9a4f05e6ca906e99b0ffbe36ae3d4b9d9d79b01d21077dc86be659548b45dad8498b84bec24dc0a5be78040c1ab21ca458d22fa7fae43d DIST hipCUB-5.0.2.tar.gz 243032 BLAKE2B 68256c0868bd23dbd78075ab286fc0738dc90f330a7e99186803e7920b3366f5608986dd9e3f4c5a045f9ec3f2461a66ab5b708d5d1d3fc748d042dd929a7993 SHA512 ae4d55fcf513eb5dd1316e335a0de30f6098eba70e877b41905bc59f3fb500ad9a46a28de77b74b914a15ffc38ad5c5f4dbdf36139505c26b94c43ffa5c90e01 +DIST hipCUB-5.1.3.tar.gz 278021 BLAKE2B f30e567370fea80ef63a455c2c27b3f4ff241e7e405688fa4dc33d1e0ce3dffb016a1a1523b20613a7963bff061758eac0c0d110243a9a6cedbc100bb087d7d4 SHA512 dd3ca341b78cf6985ba723feeeb560c0503ab283b63067e9a5e68d12ad42f752a7f56fd60f0f0c26c2853538853e09a102cfc6006c18c31c3162fa7b536ffb9f EBUILD hipCUB-4.0.0-r1.ebuild 1099 BLAKE2B 93fb8305ce51fa26eae6be6d26ef05fa5916c7c7f8975d1694209e25d9bb5d69b55ef45175b65a957b79b32f61de6a76b7661f1cca1e2248dce0ce3b7048e6e5 SHA512 59440f40bc7f8600665c30f6098afd18d9219ad9e18db2a43edf654ad4a3d86241f0e12680721d16d056573d690ceae96f0bcb08b6d251d7963c829c9807fa3b EBUILD hipCUB-4.3.0-r1.ebuild 2092 BLAKE2B b5c4dcaa01e66cb04e946492048ccb2f412f50c6e244b8d9493dd539feec633dd2365de878e33a8e99e9d2970d639b424f7f0cb7b7aca9df256504564fd7b2e3 SHA512 b0a9f49b805fc4863732fd208cff95a2421ab332f623eb3d8dd6312bf273e663f36ba37fa196a0ac9506f13cf55dabd0757480408bf8c63c0b2cf0b75a56165e EBUILD hipCUB-5.0.2.ebuild 1980 BLAKE2B ecc6d6ad49c835b120300c112895a661d9a123ac9bedfe293ed435e9960c1324b44875a667406bfabf8c1c4586740c5748eac189f2c5b9cbe7cd45842f99576f SHA512 e3e5ef45778e10426693c0bf9c01183ad58f49ec0cace2a065af848e29ffe67685c9abb5cc900b185bd03af092d1f0a7697b503beee6d5cd627838b169f8f2c8 +EBUILD hipCUB-5.1.3.ebuild 1930 BLAKE2B 9a686ada92902f9ee2fed32ac68e5599a38fd25ab639a22316293efe868701399d6d26c401d9c09b328139d94fe4fccbe8a33e6dd3eb675b7b9704c906af3ce9 SHA512 91a0e1284bb43502525120d031586b12238a71c28583135848b824e555c5ed84ab7d2258eb38945090a00def1ba060ae2ba8aefa7c2fe5cd35ae38808b4df94d MISC metadata.xml 625 BLAKE2B 7f927357a005110b37accb6841e4248e22e8080d0e0d6eb28e50e96c84807f663faf2f85dd222e5f5af448211cc05004d371a6d57ac6f17393609e76980bda81 SHA512 7d16cebc8c7df7dcc5d63e02e88e9d16d2321485de688621fd8628b8473d5ae614d63b0578363ee3b47f5e0aa7f45da9a00950b6a09a8cc9c6e3c77ae856c798 diff --git a/sci-libs/hipCUB/hipCUB-5.1.3.ebuild b/sci-libs/hipCUB/hipCUB-5.1.3.ebuild new file mode 100644 index 000000000000..4588711d36b2 --- /dev/null +++ b/sci-libs/hipCUB/hipCUB-5.1.3.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} + +inherit cmake rocm + +DESCRIPTION="Wrapper of rocPRIM or CUB for GPU parallel primitives" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/hipCUB" +SRC_URI="https://github.com/ROCmSoftwarePlatform/hipCUB/archive/rocm-${PV}.tar.gz -> hipCUB-${PV}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" +IUSE="benchmark test" +REQUIRED_USE="${ROCM_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND="dev-util/hip + sci-libs/rocPRIM:${SLOT}[${ROCM_USEDEP}] + benchmark? ( dev-cpp/benchmark ) + test? ( dev-cpp/gtest ) +" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/hipCUB-rocm-${PV}" + +PATCHES="${FILESDIR}/${PN}-4.3.0-add-memory-header.patch" + +src_prepare() { + sed -e "/PREFIX hipcub/d" \ + -e "/DESTINATION/s:hipcub/include/:include/:" \ + -e "/rocm_install_symlink_subdir(hipcub)/d" \ + -e "/<INSTALL_INTERFACE/s:hipcub/include/:include/hipcub/:" -i hipcub/CMakeLists.txt || die + + sed -e "s:\${ROCM_INSTALL_LIBDIR}:\${CMAKE_INSTALL_LIBDIR}:" -i cmake/ROCMExportTargetsHeaderOnly.cmake || die + + # disable downloading googletest and googlebenchmark + sed -r -e '/Downloading/{:a;N;/\n *\)$/!ba; d}' -i cmake/Dependencies.cmake || die + + # remove GIT dependency + sed -r -e '/find_package\(Git/{:a;N;/\nendif/!ba; d}' -i cmake/Dependencies.cmake || die + + if use benchmark; then + sed -e "/get_filename_component/s,\${BENCHMARK_SOURCE},${PN}_\${BENCHMARK_SOURCE}," \ + -e "/add_executable/a\ install(TARGETS \${BENCHMARK_TARGET})" -i benchmark/CMakeLists.txt || die + fi + + eapply_user + cmake_src_prepare +} + +src_configure() { + addpredict /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DBUILD_TEST=$(usex test ON OFF) + -DBUILD_BENCHMARK=$(usex benchmark ON OFF) + ) + + CXX=hipcc cmake_src_configure +} + +src_test() { + check_amdgpu + MAKEOPTS="-j1" cmake_src_test +} diff --git a/sci-libs/hipFFT/Manifest b/sci-libs/hipFFT/Manifest index 7c6df9ba6773..e480a705415e 100644 --- a/sci-libs/hipFFT/Manifest +++ b/sci-libs/hipFFT/Manifest @@ -3,10 +3,13 @@ AUX hipFFT-4.3.0-gentoo-install-locations.patch 1959 BLAKE2B 1f603bc411eda7aa7b9 AUX hipFFT-4.3.0-remove-git-dependency.patch 1505 BLAKE2B e98eb5b680ef2b5e45f85af8e93e25723dceebd6c849ca65ca132dab83a0eae7933c67affbf020a604c4773147907d40ccabe6cf2df6c92e213f5cab9a3e4736 SHA512 9d3c048d6f4242499d07d3c45baffc39f1766e3411d1e106ccdbae1325543d7df883531c0d2969b67805dd75bc505a63c3d3818ca5d141bbbcf8984f8d51a418 AUX hipFFT-5.0.2-gentoo-install-locations.patch 978 BLAKE2B 3f452b7cf2dd9286a38f94890520d3de92932acba43de60ed66c866fed3b39e56139ff51e345301b41ac7bd0deabdedb040e9a1f80504504fffe87f5bdd4a496 SHA512 2bdfa7804a5ddb7913dc43e5835e16d498e7e08a4678f0de97eafa7829d6da4197bb3bc25824c357e9dc1bdb966f279e7950e8298bd36a16c1e1c43ae09b5484 AUX hipFFT-5.0.2-remove-git-dependency.patch 1489 BLAKE2B 800033e728c4871c9c8de797779f3c9ca0f3441e1946068e4d826aabf02d1e27145e0fc627ae583ac27eaa43abeafba271fda48c22d087eda3cdace18cd62af2 SHA512 4c0ca6282b3fccf99d7ae25c17f5961b10b0ff49e1d1e1a65055d7ff20fe4a17901b8c5e9ec78953a2de86ab9408f583eb85cc211db1e2dc339fb8e2217a9f10 +AUX hipFFT-5.1.3-gentoo-install-locations.patch 1003 BLAKE2B f41fecbfa3556767f59fe4c2516a070664fb105c2d9871640a2ea4679bd50c292ac329e81ba34557423f1e2445a8157630aba9e0d0a9eacd6b3778efbd67734b SHA512 e2cd361116c59215d5a1aa383fc6e9a3a4ea3c22348dfd83a6e5da13f3ab03833b149ba4a60939f41cb933276015b819aab4e4f9356ee6742f38b88598747d45 DIST hipFFT-rocm-4.3.0.tar.gz 83355 BLAKE2B ee99b4cb685cbb846084d8a7c77982d75cf0d1597f9270260284bb26ae00702a31dd4d5ad9ae1885ab631c390f65c0f584f302be189701ba4f0dd9061b1bba5a SHA512 0d3100b054ff485eae06b13b8c568626b8e3a3286f36012c5a5f9bb4918e03c30c687a2714049bd797f6c3973f1730ad0936f02ad044cde1663c9c5750bbcf40 DIST hipFFT-rocm-5.0.2.tar.gz 88405 BLAKE2B c3a2e5e029d7d91c7cdc1c4e2ddec71c17df0cf2d863c81ef263eea3734488fcc31795ea681b27dffd04c0833c99df252256c3ffacfbf29305fa1ba5b8bd4efa SHA512 4fdc080479f1094e9ce92acc0eceb630a6a6ce711ffdc5ffef58d61baf23e8ea9ec45a922d798fb17a7724425d5785451f5f114bc7db40ebbfb50359b56456a6 +DIST hipFFT-rocm-5.1.3.tar.gz 89397 BLAKE2B 3c29d5d660e9f3db8afd8c9e524296c29f50faf06a5d6a58ec628b5cc5ddb47ac2b99f137c7bc5090a311189b44014ea2f6f1f7547d22506f5ba18f837fbeb68 SHA512 8d7a90630cd8bfeade9cb026e45b6b6c1ab9c96dba424559a7ced8c881cd45c1cb06d3f7e82c8e6558e4ccb8bb41b6278842057a0cf0957b0644b1139f2c9706 DIST rocFFT-4.3.0.tar.gz 840748 BLAKE2B 236a5faa930751d35e501a9a32ecc8b4075448ef21a0ffb0bb7ec04f4ed1cb67b908aa153b5b424e0823d3e306cf375d7c01a77d687220ed79de6d374037e003 SHA512 765d41e4018a04a53e847c03de80eec830d3e8766187fb8cb493624afa2673175347c16e6eeeebd4ad7d88bb866e58f7e572708f22238723c710b98565a0cd3d DIST rocFFT-5.0.2.tar.gz 837508 BLAKE2B b74d0c6edd7b232f775bffefbca829d88d9d7cd9108c27a0698f45d7fe2760d40463bcda8c710e923874b3bbfb1e83e0fe8622db4dfa28afb29392b3e135e9a5 SHA512 d6810a92a10a27dbcac8a04e8fcd56c7fa198f208da626d8938d5ff28b6ab8b89a058c7a56b5666464165e8f6bd7c4c031a94315625a3613eb02a9b8eccd9eb9 EBUILD hipFFT-4.3.0.ebuild 1885 BLAKE2B fd0653407acbeaaf3276535b64ddbc4ed33bebcf428b5de47561b583077e30da92314cdfa03a9f1ec1d488dbef38cadbb62087cc8181d8567b1df6aa4ae33c8f SHA512 0ebd42f6b2ae1e1719d227b96bc51023e2117751b6bf4e39ed44f46a81967d8fe9946abb4975eb7bcbad656ded7cbf5a1473e3ceb82ddb90b6546c0c2992b7cf EBUILD hipFFT-5.0.2.ebuild 1920 BLAKE2B 4219451958bea97b48850a26e36048486158b3c19a30702ac283c54a4f0f60cf725a5a122807c86e91348f41be293c7207e4e632224a1bab869aab49e21a6280 SHA512 8061026feaab2bb883e728a0bb064c3a31d0860aa646950ed36130dbd2b1429bb076f1b8f2b01a567c51fcf7a54e36a78765645bddb158efe9e3d69732a1f219 +EBUILD hipFFT-5.1.3.ebuild 1215 BLAKE2B c6247905b76257910c1c04beb4cac06d268184855061b9475d0caa981462497c6fe6ce6eb45de786dbafded3d59cef5f5ba561c3d5d7cdc8b9dfad02ad018871 SHA512 200e46991f56e3158c7c3520fc7a1642b4fcb2a7e622c6a124b0b336d64f62cb7c27798604f4a8fc81d387a9ecfc1cc1ba588d73576097147ff6e0007b6d9e16 MISC metadata.xml 727 BLAKE2B 29e2218926627115b138fc101b5d582d4c6fd29b998bd92d23f8e2a63b33e9882d312bf5ab766d72757a4a2abb1f29357e4d95c663e3525ec536a86b325ff0b9 SHA512 e8d1501ce980d5fba12bdbbc5ef1a17c13c5cfe16cd3ae9f89d151cb8843f4ef581b2c807814e9af542ce94d9924dfade9efd1e1527444b1464132ae2601d208 diff --git a/sci-libs/hipFFT/files/hipFFT-5.1.3-gentoo-install-locations.patch b/sci-libs/hipFFT/files/hipFFT-5.1.3-gentoo-install-locations.patch new file mode 100644 index 000000000000..fe395de42f86 --- /dev/null +++ b/sci-libs/hipFFT/files/hipFFT-5.1.3-gentoo-install-locations.patch @@ -0,0 +1,29 @@ +Fix install location to meet FHS, and remove useless symlink +=================================================================== +--- hipFFT-rocm-5.1.3.orig/library/CMakeLists.txt ++++ hipFFT-rocm-5.1.3/library/CMakeLists.txt +@@ -81,7 +81,7 @@ target_include_directories( hipfft + PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/library/include> + $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> + $<BUILD_INTERFACE:${HIP_INCLUDE_DIRS}> +- $<INSTALL_INTERFACE:include> ++ $<INSTALL_INTERFACE:include/hipfft> + ${HIP_INCLUDE_DIRS} + ) + +@@ -142,13 +142,11 @@ if( ROCM_FOUND ) + rocm_install_targets( TARGETS hipfft + INCLUDE + ${CMAKE_SOURCE_DIR}/library/include +- ${CMAKE_BINARY_DIR}/include +- PREFIX hipfft ) ++ ${CMAKE_BINARY_DIR}/include ) + rocm_export_targets( TARGETS hip::hipfft +- PREFIX hipfft ++ PREFIX . + DEPENDS PACKAGE hip + NAMESPACE hip:: ) +- rocm_install_symlink_subdir( hipfft ) + + # Package specific CPACK vars + if( NOT BUILD_WITH_LIB STREQUAL "CUDA" ) diff --git a/sci-libs/hipFFT/hipFFT-5.1.3.ebuild b/sci-libs/hipFFT/hipFFT-5.1.3.ebuild new file mode 100644 index 000000000000..216d15841546 --- /dev/null +++ b/sci-libs/hipFFT/hipFFT-5.1.3.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} + +inherit cmake rocm + +DESCRIPTION="CU / ROCM agnostic hip FFT implementation" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/hipFFT" +SRC_URI="https://github.com/ROCmSoftwarePlatform/hipFFT/archive/refs/tags/rocm-${PV}.tar.gz -> hipFFT-rocm-${PV}.tar.gz" +REQUIRED_USE="${ROCM_REQUIRED_USE}" + +LICENSE="MIT" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" + +RESTRICT="test" + +RDEPEND="dev-util/hip:${SLOT} + sci-libs/rocFFT:${SLOT}[${ROCM_USEDEP}]" +DEPEND="${RDEPEND}" +BDEPEND="" + +S="${WORKDIR}/hipFFT-rocm-${PV}" + +PATCHES=( + "${FILESDIR}/${PN}-5.1.3-gentoo-install-locations.patch" + "${FILESDIR}/${PN}-5.0.2-remove-git-dependency.patch" + "${FILESDIR}/${PN}-4.3.0-add-complex-header.patch" +) + +src_prepare() { + sed -e "/CMAKE_INSTALL_LIBDIR/d" -i CMakeLists.txt || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DCMAKE_INSTALL_INCLUDEDIR="include/hipfft" + -DCMAKE_MODULE_PATH="${EPREFIX}/usr/$(get_libdir)/cmake" + -DHIP_ROOT_DIR="${EPREFIX}/usr" + -DBUILD_CLIENTS_TESTS=OFF + -DBUILD_CLIENTS_RIDER=OFF + ) + + cmake_src_configure +} diff --git a/sci-libs/hipSPARSE/Manifest b/sci-libs/hipSPARSE/Manifest index ee0deff6dd1c..5cbc73cb532e 100644 --- a/sci-libs/hipSPARSE/Manifest +++ b/sci-libs/hipSPARSE/Manifest @@ -3,6 +3,7 @@ AUX hipSPARSE-5.0.2-remove-matrices-unpacking.patch 3940 BLAKE2B e3815659b328562 DIST hipSPARSE-4.0.tar.gz 271756 BLAKE2B d774632c145a842c5dd97df6e0c1c3b3fc6986a5d3e000564b3b9b4f8a9c72bc01b360baf93a82f8a70a85b8ee1833f4e767a48021d3869391000551ed00e614 SHA512 78c9501e6f9f8b0727d2f2207814048f8c784b2b06797559d6f639244cb1439e9218a46c582a6b337b15791519f0bcb9e0f42c17bff00c096c797c96cc7660ae DIST hipSPARSE-4.3.tar.gz 349357 BLAKE2B e0da23ba8f39af276842eb9bc45232a0dbe7f40197215397bf2d6ae454061626aedb698701703a03a60487dff2b427d54fa3e0fd36db69fcccf9868d0e5a5097 SHA512 b7302ae4205d5c0e8fd8017e345f7677e55a6ea82741a85f77b2af3f669d63013e12435201f9e0ca4b31d3c4af2cb1630775bf101a69338be2df621d68504d60 DIST hipSPARSE-5.0.tar.gz 440916 BLAKE2B 4011dda3d22b373848735bab0570421fed786bd4d9cff992d3eaaf70b84c00334cec6a8fe3bdd2b9cd5241d837522b778b3462064426195db68930af89c21984 SHA512 567c6b05844143834efbb6f5b7a97ec93f349b97ec6bea55e780cb2480cf80aafbbf15b06f83af3d73ff8ab44c51cbe26ada27b4b398b67dc428c1959c3e7222 +DIST hipSPARSE-5.1.tar.gz 449838 BLAKE2B 7727ecb9fa397e2730cfda4c9367188c37ad201d501b50129994869c6ef15b51cdf2d1f481f19f2f37cf0530f1ec3689c40a9651924f70fabe945d80732df64a SHA512 8b01c01a10b8419d14a532ebccfa5b5b5b5c3f6a6e73f3f0ecee58c7e240d2754485a9da020fe4693df3ef9fc08e5bb09b05396472ccbeebf89bc2635d94eb64 DIST rocSPARSE_ASIC_320k.tar.gz 11301444 BLAKE2B a00cc4a3ededab3fb56339319e34e936645ddce2dee3c630153b37e337384c207b0a2829227fb7f4c2db1fe33383e97410ab7ad459d391c025f5410843d51cf2 SHA512 1db3af391c30a371c1ac0087436e266721474273a39d5b2b6d56408d950dcbbee004750e4dce4e3dbc4cb512f38f6d945676d7f29b62c52fd5a7fed0fe789e03 DIST rocSPARSE_Chebyshev4.tar.gz 50165660 BLAKE2B f1a95554c8f38937f501488fabfd406b773eb980d7463cadac0de162529ac2f834c655cadd2b65f4c42a8487bc2d67c749601ae33bd789051f9e4d1e157196a0 SHA512 fdec4947a4af923d28b4be8d23690fd6d356c58f8344a5dcdd2e3fa61769d83e47a84d65316b527e6e82d9f988de2675a852367d406e44b44d784137a90b95c0 DIST rocSPARSE_amazon0312.tar.gz 11303646 BLAKE2B 388947a29380253bb5eecb22d3a3b6f3378711044b3fe98d6d2517cd27330f11b3d12fdb96320a2889e139224f1a6a5ad1c455ff8e91a262aa2aadbe16301330 SHA512 aed2d62581763742d9c7faf3dcaf1eaa983caa1e2e7ad4abebe97c5e7c2aec9942e0e32291092b348b60052c92b130e721ec19ed59bda22e1b233ef72ac7d2ff @@ -25,4 +26,5 @@ DIST rocSPARSE_webbase-1M.tar.gz 11360460 BLAKE2B 01b1d06adb5fb32fa402ed888d25a7 EBUILD hipSPARSE-4.0.0-r2.ebuild 1140 BLAKE2B 9344f8e3678a855fca42b5c14fae5d0973ed3f8922836182d9327d1724e92feca6072933df181228ef95cc4993fc8a7797ebf31fac8a5a95eabe8f3de9165ac5 SHA512 e682f1acb67c282c638fd7594b0268a3dc7a33b71fe667f8bd38fc90449660367f94d1964037c0fbe3dd162e5c8a5a4aa941ec72a7353c2f629ed9f07ca06d6b EBUILD hipSPARSE-4.3.0-r2.ebuild 3709 BLAKE2B eda9d93375d8a3db0da922d615224d27d1e2048c03718c0f77212b09838a3d0627b1dd13025de51bb0779fb99404b1f5b2f65fe1882b26f499dd98b302c99107 SHA512 e11817f8844084bbc129d392c167f9606590a5f23fd35b49bf8586f08ef53616373228524da996ad0539b859619f0384700da423bd1943ef6922c628b6ff0a84 EBUILD hipSPARSE-5.0.2.ebuild 3709 BLAKE2B 57334096115755129d2f97628a7ee0f65eb27b7905a6daa8c01691f8c6e23114fa996437aa5e00b865997d8580d033c3b038dcc75ad07c78b150cfbc34e5cd50 SHA512 96a293fd1643f3d004206573a6ae47ca4450b13ce8e4e93309dee2777f8c1e28032aef98477ca7b4fb26a3a52c0e3b50d8ddeda1fc6f9767a727889b6b9670a6 +EBUILD hipSPARSE-5.1.3.ebuild 3491 BLAKE2B c5d0e287556b118424ad13fcd3305c9f5bc8ab62cb7d4fa69f5e7869d3605c30888b74c6501d8af9dc5c026456b3c6229525f3236a2651f4c2befd7476537f35 SHA512 7aaa9b204142bbdba348a669ce24b8219f78e03485d87afd273243df3bd21003d470729653a7902bf71b94be423bd15fd47c71eecd3051d92379fb23953e6d31 MISC metadata.xml 603 BLAKE2B 21c5f53de40b5582b8541e1cef239a4a2eff2eaaaa966a4168439417cd6f80ea00dbd48636bea73aedbaaf580950803768f02ab5f0cca0f76d433d80a80026e1 SHA512 4ff1ebefa7203326a5c2feed7c0deffa10f17383bb4a05fdf3057d8ab1d6f8427a45126ec17aa88e02a93e9114e79f6d89cd4564e72faebf970b7f63814d701a diff --git a/sci-libs/hipSPARSE/hipSPARSE-5.1.3.ebuild b/sci-libs/hipSPARSE/hipSPARSE-5.1.3.ebuild new file mode 100644 index 000000000000..5962bd36caa1 --- /dev/null +++ b/sci-libs/hipSPARSE/hipSPARSE-5.1.3.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} + +inherit cmake edo rocm toolchain-funcs + +DESCRIPTION="ROCm SPARSE marshalling library" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/hipSPARSE" +# share some test datasets with rocSPARSE +SRC_URI="https://github.com/ROCmSoftwarePlatform/hipSPARSE/archive/rocm-${PV}.tar.gz -> hipSPARSE-$(ver_cut 1-2).tar.gz +test? ( +https://sparse.tamu.edu/MM/SNAP/amazon0312.tar.gz -> rocSPARSE_amazon0312.tar.gz +https://sparse.tamu.edu/MM/Muite/Chebyshev4.tar.gz -> rocSPARSE_Chebyshev4.tar.gz +https://sparse.tamu.edu/MM/FEMLAB/sme3Dc.tar.gz -> rocSPARSE_sme3Dc.tar.gz +https://sparse.tamu.edu/MM/Williams/webbase-1M.tar.gz -> rocSPARSE_webbase-1M.tar.gz +https://sparse.tamu.edu/MM/Bova/rma10.tar.gz -> rocSPARSE_rma10.tar.gz +https://sparse.tamu.edu/MM/JGD_BIBD/bibd_22_8.tar.gz -> rocSPARSE_bibd_22_8.tar.gz +https://sparse.tamu.edu/MM/Williams/mac_econ_fwd500.tar.gz -> rocSPARSE_mac_econ_fwd500.tar.gz +https://sparse.tamu.edu/MM/Williams/mc2depi.tar.gz -> rocSPARSE_mc2depi.tar.gz +https://sparse.tamu.edu/MM/Hamm/scircuit.tar.gz -> rocSPARSE_scircuit.tar.gz +https://sparse.tamu.edu/MM/Sandia/ASIC_320k.tar.gz -> rocSPARSE_ASIC_320k.tar.gz +https://sparse.tamu.edu/MM/GHS_psdef/bmwcra_1.tar.gz -> rocSPARSE_bmwcra_1.tar.gz +https://sparse.tamu.edu/MM/HB/nos1.tar.gz -> rocSPARSE_nos1.tar.gz +https://sparse.tamu.edu/MM/HB/nos2.tar.gz -> rocSPARSE_nos2.tar.gz +https://sparse.tamu.edu/MM/HB/nos3.tar.gz -> rocSPARSE_nos3.tar.gz +https://sparse.tamu.edu/MM/HB/nos4.tar.gz -> rocSPARSE_nos4.tar.gz +https://sparse.tamu.edu/MM/HB/nos5.tar.gz -> rocSPARSE_nos5.tar.gz +https://sparse.tamu.edu/MM/HB/nos6.tar.gz -> rocSPARSE_nos6.tar.gz +https://sparse.tamu.edu/MM/HB/nos7.tar.gz -> rocSPARSE_nos7.tar.gz +https://sparse.tamu.edu/MM/DNVS/shipsec1.tar.gz -> rocSPARSE_shipsec1.tar.gz +)" + +LICENSE="MIT" +KEYWORDS="~amd64" +SLOT="0"/$(ver_cut 1-2) +IUSE="test" +REQUIRED_USE="${ROCM_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +RDEPEND="dev-util/rocminfo + dev-util/hip + sci-libs/rocSPARSE:${SLOT}[${ROCM_USEDEP}]" +DEPEND="${RDEPEND}" +BDEPEND="dev-util/rocm-cmake + >=dev-util/cmake-3.22 + test? ( dev-cpp/gtest )" + +S="${WORKDIR}/hipSPARSE-rocm-${PV}" + +PATCHES=( "${FILESDIR}/${PN}-5.0.2-remove-matrices-unpacking.patch" ) + +src_prepare() { + sed -e "s/PREFIX hipsparse//" \ + -e "/<INSTALL_INTERFACE/s,include,include/hipsparse," \ + -e "s:rocm_install_symlink_subdir(hipsparse):#rocm_install_symlink_subdir(hipsparse):" \ + -i library/CMakeLists.txt || die + + cmake_src_prepare + + # remove GIT dependency + sed -e "/find_package(Git/d" -i cmake/Dependencies.cmake || die + + if use test; then + mkdir -p "${BUILD_DIR}"/clients/matrices + # compile and use the mtx2bin converter. Do not use any optimization flags! + edo $(tc-getCXX) deps/convert.cpp -o deps/convert + find "${WORKDIR}" -maxdepth 2 -regextype egrep -regex ".*/(.*)/\1\.mtx" -print0 | + while IFS= read -r -d '' mtxfile; do + destination=${BUILD_DIR}/clients/matrices/$(basename -s '.mtx' ${mtxfile}).bin + ebegin "Converting ${mtxfile} to ${destination}" + deps/convert ${mtxfile} ${destination} + eend $? + done + fi +} + +src_configure() { + local mycmakeargs=( + -DHIP_RUNTIME="ROCclr" + -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) + -DBUILD_CLIENTS_SAMPLES=OFF + -DCMAKE_INSTALL_INCLUDEDIR=include/hipsparse + ) + + cmake_src_configure +} + +src_test() { + check_amdgpu + cd "${BUILD_DIR}"/clients/staging || die + edob ./${PN,,}-test +} diff --git a/sci-libs/miopen/Manifest b/sci-libs/miopen/Manifest index 90002c4b7555..bf01b50818af 100644 --- a/sci-libs/miopen/Manifest +++ b/sci-libs/miopen/Manifest @@ -7,8 +7,15 @@ AUX miopen-4.3.0-strip-xnack-in-flags.patch 1032 BLAKE2B 6cd0d65676edd394e8b8e06 AUX miopen-5.0.2-gfx1031.patch 11488 BLAKE2B 25b3136015309e8a06de6fcac7864f90d146beb50674db9810ed568b1ff1e8a761bf3a2a96f74ca4e215c1c670df0fcf09bb60c51d54122a063c8c8ee4059ebf SHA512 ebc1fb32aeef147366440e4ded002a833cc2f7b621b5cb2059ec5b3cc5786167c3f5955d04b0e6e3d9cfab86fe6f414e2e74a15db0090429fd97be3671c7445c AUX miopen-5.0.2-no-strip.patch 670 BLAKE2B 20a9c14b5df7d1d964ade240fc5c77ff3d119bded10f3b60e6bb17b98db116d3b7e954a6fb9ff6b5bf47243ca0e2c6160e63f27113a0663ee62eeac438c50f8d SHA512 342238b750bdf8210ccb6fc2e4839ce8d236efeec8bbf23b8fb70b0e31027aac39a8f443f0a38835d59365bc9d55bb0ecb210695c9c6488cd8e765c42754b674 AUX miopen-5.0.2-strip-xnack-in-flags.patch 1205 BLAKE2B d1ba065387050b51288dba37631adea42398b2f7cd8b604e5c305d3491fb661dce8c448e31db42c70f8b6e4dec84c4214ce869dd1419eb67c2ea4c33f18849b5 SHA512 ad32335831c7d1057b53469aa2d1f8f3366b23ccdc71cb7e9a4e7813e7da7e9bb73e62465f1086391653538ccbab2f662baf2446e10e8dbc0f0db631d7368a4d +AUX miopen-5.1.3-avoid-metadata-error-for-vanilla-clang.patch 10748 BLAKE2B 582b362a54d9ee00c8f6062b4ec16bebdaea7734adadcd5f6201801cb8ce3a7ca64e8148a10f2f3ab682560ced1f037b217bdcd161869d80a8489f4d56bd5241 SHA512 08cd489d23a48d0b227dacc514e3f84999c1e9a0ac3dd5424d9376c77c4d745c65f48c0f470cb5e65c20e9dbbfcb457995301a74bfe27a81604bf89213a2f1d2 +AUX miopen-5.1.3-deprecate-clang-ocl.patch 2884 BLAKE2B 4f45f66d87dea51d9f87878f52520863b36defa1403055a580e5f33c18e3de08daad1b3d3d5fad06d7d3f16da4f0945390872f573f168d1893f5f635070f1463 SHA512 c4835559a4005ffd2aac7afb38213d06857ab1a8d4bc5bd5c150b82226671fb1d66c6ef1d4eab2106ad11c475007af441182ca26f659a3fd779cd7d4f5c90247 +AUX miopen-5.1.3-gfx1031.patch 22036 BLAKE2B b3072b4f21162324c4ac63a020e5c448ed2df02032a7bf4e2db6f2dfc9742fddae2a7a780cf197f6c4e08123a3fa19b4f76ac22ae33d89f53adec33151eaa6b7 SHA512 8ca0c6f2aa2ffda460cf895be8d9a68aff581f6c388ba5145aa40a2b952f896901c74a24c9a03aa1c693f5f798909922bc8f056efe746f22feba8adccd0dd3d1 +AUX miopen-5.1.3-include-array.patch 343 BLAKE2B 993a8f3e301f4c16088ca216b2d820b17ceb42eeda4550b4291a70e00592281f992bf184407d024a0f8b2207a26fef2d56c26ef95e7a452d3b97090e1335a404 SHA512 887ac13f25c1bfd524bb2a3be701bf688f002a95ef8218cb798e41feaeb0678dbbd2ffaf905c59070a125001093bf5ede1bb6a77fdfe6f7a4ff19cbccfdc6624 +AUX miopen-5.1.3-no-strip.patch 608 BLAKE2B 3173d95219542a48c6dcd2b87e7157dcf483ff714c3d1c1c47aab8fc8af7b1fd4f6ac52b9d8e892cc25bff973597f4a05426fa4714b0764733b810867af59cfe SHA512 201357718203ee9a4062362541c483e069321b825708c6aa0e8892cc7722bcd520808797307e320df34c4fbf0003198f7a46717d5ff3819b1e2c3a5a3a045725 DIST MIOpen-4.3.0.tar.gz 59405686 BLAKE2B fe91bd91a74023866883d6d0a2a8071a8fe40c4cff2fb4ef58fc6e343a05ac2a731f73e657f4d183ade4e5b7c1fbbe41f3f032918f6e50cb713073aee8d97dc5 SHA512 a8615b7738acfbc7f68d9417b0746c62630d2b48fb8485fafba4db65a4b277a8230f601d249d7e54f89ba25c14176429ca76ad8365a437b09d836b031b0c4fbb DIST MIOpen-5.0.2.tar.gz 76294827 BLAKE2B 7b2a1f0e675793aee4a0fa2a270caac8332cda36c8f04cee483cc2882ed987b6e676e9c24a1acf4976a16a10f922b1a6263470b419aa88a29cfcb6d6d4b4cc29 SHA512 a581b45220797904db3e4dd3840f2ef96085f00baf8187c5ab574325a66da4f599dee6496457bb1cc32825b57a13fb0ef35a2ef1bd2a5f449c7e7b9fa64b27d1 +DIST MIOpen-5.1.3.tar.gz 88118329 BLAKE2B d24722ffc5f5dab6d6a1de2ce34193ad2f25c9a2562e38c52e010a29870f01d9ea1c56970ba0601a088c8286e97958ee95d0da27fc8082126dd2ebe5ccb36b70 SHA512 a14e28cfcb12e5061e0e7b999ef3e67fa0a0e897e31bc50e7288b8a23eb1791312e33d3b697021c2b654ccc065ae1b046c1cfd77ba8e04b0f3e87e9cc0626dcd EBUILD miopen-4.3.0.ebuild 2200 BLAKE2B 2f13af068c451192140c7df7957440e02a7f7721036c344748cb83b8f934d81ea43415625d771fe8cd73d436ad302e61dbfd1477933277ab43e9cf9b58af268c SHA512 28fcd69a452a824de2b0bba8e960940506b9b1f9e9c4eef39c842ee26b0aa6ed6e8349cb55a83658ab3fb7f4cb763092857e02216e86da3aaff54b15826a7807 EBUILD miopen-5.0.2.ebuild 2221 BLAKE2B affa8b448a9b67b91921c1fd1390ecece736fb12e40bf24f614b8460d88134810dae2136fc74a5eae1adcf41f8bfd761354679871d834fd340051745ba449ad4 SHA512 3b3197f2b73ba51e8bf095f35d7e4c11e7baefb9de74c67153c99ab1ce0c589f425a3ee40e1779e1c35eaffdbbb69b02e7ee6af0757684f8e4478647015b5250 +EBUILD miopen-5.1.3.ebuild 3130 BLAKE2B aea79cb60e5eb33d5036037e82dc7f28dd7bc3f91e8441742b570e1b915a5299df715d1416f7fc1f6db0487d31a1971f8132cda54c01c2798f0cf8c2e3cd6ab2 SHA512 6fee1d5acb2c66150c397ba5d2e536c22de1f00a32ba189b63edc1145a7a50165eb95bbd8fd9ba6ee19168473355dd3ac91595d6f3212785795a023d0c38f5d0 MISC metadata.xml 453 BLAKE2B 4c1e76cbc277e93a92a95cda405973cc72863882ab9a6729a07976e7815119e985688387c14fc5017fd6e85aaa64eaa72b900375c7f7428eb6bbb2569c5ecaa6 SHA512 0e42066a5ac8720d1b561bcf23269013d9cceff52a9ddd6a6e0af58c7d2628c335bb290e0dc6c262a0542e286f54fd07cb487dd908343fac5cfca07410df6e56 diff --git a/sci-libs/miopen/files/miopen-5.1.3-avoid-metadata-error-for-vanilla-clang.patch b/sci-libs/miopen/files/miopen-5.1.3-avoid-metadata-error-for-vanilla-clang.patch new file mode 100644 index 000000000000..3dca20f1fb12 --- /dev/null +++ b/sci-libs/miopen/files/miopen-5.1.3-avoid-metadata-error-for-vanilla-clang.patch @@ -0,0 +1,183 @@ +Together with find-sed command in 5.1.3 ebuild, this fixes +https://github.com/ROCmSoftwarePlatform/MIOpen/issues/1731 +index 71b2cabf1..60e7fab6e 100644 +--- a/src/kernels/Conv_Winograd_v13_3_12_epilogue.inc ++++ b/src/kernels/Conv_Winograd_v13_3_12_epilogue.inc +@@ -76,7 +76,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/Conv_Winograd_v16_5_0_epilogue.inc b/src/kernels/Conv_Winograd_v16_5_0_epilogue.inc +index 36d47c862..f8f677ec6 100644 +--- a/src/kernels/Conv_Winograd_v16_5_0_epilogue.inc ++++ b/src/kernels/Conv_Winograd_v16_5_0_epilogue.inc +@@ -76,7 +76,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/Conv_Winograd_v21_1_3_metadata.inc b/src/kernels/Conv_Winograd_v21_1_3_metadata.inc +index deff81e84..ed47abea7 100644 +--- a/src/kernels/Conv_Winograd_v21_1_3_metadata.inc ++++ b/src/kernels/Conv_Winograd_v21_1_3_metadata.inc +@@ -51,7 +51,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/conv1x1u.s b/src/kernels/conv1x1u.s +index 5dc213546..c890d45a4 100644 +--- a/src/kernels/conv1x1u.s ++++ b/src/kernels/conv1x1u.s +@@ -1076,7 +1076,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/conv1x1u_bias_activ.s b/src/kernels/conv1x1u_bias_activ.s +index 1675e819a..6bbdd9936 100644 +--- a/src/kernels/conv1x1u_bias_activ.s ++++ b/src/kernels/conv1x1u_bias_activ.s +@@ -1230,7 +1230,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/conv1x1u_stride2.s b/src/kernels/conv1x1u_stride2.s +index c5ea1e90c..6241edcf7 100644 +--- a/src/kernels/conv1x1u_stride2.s ++++ b/src/kernels/conv1x1u_stride2.s +@@ -1162,7 +1162,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/conv1x1wrw.s b/src/kernels/conv1x1wrw.s +index b13b6ffa4..eb63f17c6 100644 +--- a/src/kernels/conv1x1wrw.s ++++ b/src/kernels/conv1x1wrw.s +@@ -1243,7 +1243,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/conv3x3wrw.s b/src/kernels/conv3x3wrw.s +index a3f73aeae..b6fb1632c 100755 +--- a/src/kernels/conv3x3wrw.s ++++ b/src/kernels/conv3x3wrw.s +@@ -1033,7 +1033,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/conv_3x3_wheel_alpha_v3_0b_epilogue.inc b/src/kernels/conv_3x3_wheel_alpha_v3_0b_epilogue.inc +index 358772e63..b27ad5284 100644 +--- a/src/kernels/conv_3x3_wheel_alpha_v3_0b_epilogue.inc ++++ b/src/kernels/conv_3x3_wheel_alpha_v3_0b_epilogue.inc +@@ -76,7 +76,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/conv_3x3_wheel_alpha_v7_0_3b_epilogue.inc b/src/kernels/conv_3x3_wheel_alpha_v7_0_3b_epilogue.inc +index d3296969a..f873ce153 100644 +--- a/src/kernels/conv_3x3_wheel_alpha_v7_0_3b_epilogue.inc ++++ b/src/kernels/conv_3x3_wheel_alpha_v7_0_3b_epilogue.inc +@@ -76,7 +76,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/conv_3x3_wheel_alpha_v9_0_15_epilogue.inc b/src/kernels/conv_3x3_wheel_alpha_v9_0_15_epilogue.inc +index a253cc0f9..1582d002c 100644 +--- a/src/kernels/conv_3x3_wheel_alpha_v9_0_15_epilogue.inc ++++ b/src/kernels/conv_3x3_wheel_alpha_v9_0_15_epilogue.inc +@@ -76,7 +76,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/conv_3x3_wheel_alpha_v9_2_7_epilogue.inc b/src/kernels/conv_3x3_wheel_alpha_v9_2_7_epilogue.inc +index e40ac1f60..78495e024 100644 +--- a/src/kernels/conv_3x3_wheel_alpha_v9_2_7_epilogue.inc ++++ b/src/kernels/conv_3x3_wheel_alpha_v9_2_7_epilogue.inc +@@ -76,7 +76,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/xform_bidirect_winograd_code.inc b/src/kernels/xform_bidirect_winograd_code.inc +index 724845f49..d03314ef5 100644 +--- a/src/kernels/xform_bidirect_winograd_code.inc ++++ b/src/kernels/xform_bidirect_winograd_code.inc +@@ -1566,7 +1566,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } +diff --git a/src/kernels/xform_metadata.inc b/src/kernels/xform_metadata.inc +index 960a9a2d8..83b736bee 100644 +--- a/src/kernels/xform_metadata.inc ++++ b/src/kernels/xform_metadata.inc +@@ -74,7 +74,7 @@ amdhsa.kernels: + .max_flat_workgroup_size: \wg_x + .wavefront_size: 64 + .args: +- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N } ++ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X } + - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C } + - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H } + - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W } diff --git a/sci-libs/miopen/files/miopen-5.1.3-deprecate-clang-ocl.patch b/sci-libs/miopen/files/miopen-5.1.3-deprecate-clang-ocl.patch new file mode 100644 index 000000000000..93c66fd3ef05 --- /dev/null +++ b/sci-libs/miopen/files/miopen-5.1.3-deprecate-clang-ocl.patch @@ -0,0 +1,55 @@ +This is a cherry picked PR on 5.1.3, which replace clang-ocl with clang +From 98f001dfe61208af04ecf7690023efd772ee7d43 Mon Sep 17 00:00:00 2001 +From: Jehandad Khan <jahandad@gmail.com> +Date: Tue, 19 Jul 2022 17:24:05 -0500 +Subject: [PATCH] Remove clang-ocl and replace with clang + +--- + CMakeLists.txt | 7 +------ + README.md | 1 - + src/hipoc/hipoc_program.cpp | 7 ++++++- + 3 files changed, 7 insertions(+), 8 deletions(-) + +Index: MIOpen-rocm-5.1.3/CMakeLists.txt +=================================================================== +--- MIOpen-rocm-5.1.3.orig/CMakeLists.txt ++++ MIOpen-rocm-5.1.3/CMakeLists.txt +@@ -241,7 +241,7 @@ if( MIOPEN_BACKEND STREQUAL "HIP" OR MIO + # miopentensile default off + set(MIOPEN_USE_MIOPENTENSILE OFF CACHE BOOL "") + +- find_program(HIP_OC_COMPILER clang-ocl ++ find_program(HIP_OC_COMPILER clang + PATH_SUFFIXES bin + PATHS + /opt/rocm +Index: MIOpen-rocm-5.1.3/README.md +=================================================================== +--- MIOpen-rocm-5.1.3.orig/README.md ++++ MIOpen-rocm-5.1.3/README.md +@@ -14,7 +14,6 @@ MIOpen supports two programming models - + * OpenCL - OpenCL libraries and header files + * HIP - + * HIP and HCC libraries and header files +- * [clang-ocl](https://github.com/RadeonOpenCompute/clang-ocl) -- **required** + * [MIOpenGEMM](https://github.com/ROCmSoftwarePlatform/MIOpenGEMM) to enable various functionalities including transposed and dilated convolutions. This is optional on the HIP backend. Users can enable this library using the cmake configuration flag `-DMIOPEN_USE_MIOPENGEMM=On`. + * ROCm cmake modules can be installed from [here](https://github.com/RadeonOpenCompute/rocm-cmake) + * [Half](http://half.sourceforge.net/) - IEEE 754-based half-precision floating point library +Index: MIOpen-rocm-5.1.3/src/hipoc/hipoc_program.cpp +=================================================================== +--- MIOpen-rocm-5.1.3.orig/src/hipoc/hipoc_program.cpp ++++ MIOpen-rocm-5.1.3/src/hipoc/hipoc_program.cpp +@@ -255,7 +255,12 @@ void HIPOCProgramImpl::BuildCodeObjectIn + if(miopen::IsEnabled(MIOPEN_DEBUG_OPENCL_WAVE64_NOWGP{})) + params += " -mwavefrontsize64 -mcumode"; + WriteFile(src, dir->path / filename); +- dir->Execute(HIP_OC_COMPILER, params + " " + filename + " -o " + hsaco_file.string()); ++ params += " -target amdgcn-amd-amdhsa -x cl -D__AMD__=1 -O3"; ++ params += " -cl-kernel-arg-info -cl-denorms-are-zero"; ++ params += " -cl-std=CL1.2 -mllvm -amdgpu-early-inline-all"; ++ params += " -mllvm -amdgpu-internalize-symbols "; ++ params += " " + filename + " -o " + hsaco_file.string(); ++ dir->Execute(HIP_OC_COMPILER, params); + } + if(!boost::filesystem::exists(hsaco_file)) + MIOPEN_THROW("Cant find file: " + hsaco_file.string()); diff --git a/sci-libs/miopen/files/miopen-5.1.3-gfx1031.patch b/sci-libs/miopen/files/miopen-5.1.3-gfx1031.patch new file mode 100644 index 000000000000..42041f2414ed --- /dev/null +++ b/sci-libs/miopen/files/miopen-5.1.3-gfx1031.patch @@ -0,0 +1,397 @@ +Enable gfx1031 support +====================== +--- MIOpen-rocm-5.1.3/fin/src/include/conv_fin.hpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/fin/src/include/conv_fin.hpp 2022-09-01 18:36:18.630980283 +0800 +@@ -111,6 +111,10 @@ class ConvFin : public Fin + { + assert(num_cu == 72 || num_cu == 36); + } ++ else if(arch == "gfx1031") ++ { ++ assert(num_cu == 40 || num_cu == 20); ++ } + else if(arch == "gfx90a") + { + assert(num_cu == 110); +Only in MIOpen-rocm-5.1.3: patches +diff --color -upr MIOpen-rocm-5.1.3/src/composable_kernel/composable_kernel/include/utility/config.hpp gfx1031/src/composable_kernel/composable_kernel/include/utility/config.hpp +--- MIOpen-rocm-5.1.3/src/composable_kernel/composable_kernel/include/utility/config.hpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/composable_kernel/composable_kernel/include/utility/config.hpp 2022-09-01 18:36:18.634980274 +0800 +@@ -13,7 +13,7 @@ + // GPU target + // should enable one and only one GPU target + #if !(defined(CK_AMD_GPU_GFX803) || defined(CK_AMD_GPU_GFX900) || defined(CK_AMD_GPU_GFX906) || \ +- defined(CK_AMD_GPU_GFX908) || defined(CK_AMD_GPU_GFX90A) || defined(CK_AMD_GPU_GFX1030)) ++ defined(CK_AMD_GPU_GFX908) || defined(CK_AMD_GPU_GFX90A) || defined(CK_AMD_GPU_GFX1030) || defined(CK_AMD_GPU_GFX1031)) + #error Need to define (only) one GPU target + #endif + +@@ -29,7 +29,7 @@ + #if defined(CK_AMD_GPU_GFX803) || defined(CK_AMD_GPU_GFX900) || defined(CK_AMD_GPU_GFX906) || \ + defined(CK_AMD_GPU_GFX908) || defined(CK_AMD_GPU_GFX90A) + #define CK_BUFFER_RESOURCE_3RD_DWORD 0x00020000 +-#elif defined(CK_AMD_GPU_GFX1030) ++#elif (defined(CK_AMD_GPU_GFX1030) || defined(CK_AMD_GPU_GFX1031)) + #define CK_BUFFER_RESOURCE_3RD_DWORD 0x31014000 + #endif + +@@ -37,7 +37,7 @@ + #if defined(CK_AMD_GPU_GFX803) || defined(CK_AMD_GPU_GFX900) + #define CK_USE_AMD_V_MAC_F32 + #elif defined(CK_AMD_GPU_GFX906) || defined(CK_AMD_GPU_GFX908) || defined(CK_AMD_GPU_GFX90a) || \ +- defined(CK_AMD_GPU_GFX1030) ++ (defined(CK_AMD_GPU_GFX1030) || defined(CK_AMD_GPU_GFX1031)) + #define CK_USE_AMD_V_FMAC_F32 + #define CK_USE_AMD_V_DOT2_F32_F16 + #define CK_USE_AMD_V_DOT4_I32_I8 +diff --color -upr MIOpen-rocm-5.1.3/src/include/miopen/solver/ck_utility_common.hpp gfx1031/src/include/miopen/solver/ck_utility_common.hpp +--- MIOpen-rocm-5.1.3/src/include/miopen/solver/ck_utility_common.hpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/include/miopen/solver/ck_utility_common.hpp 2022-09-01 18:36:18.638980266 +0800 +@@ -54,6 +54,7 @@ static inline bool is_ck_supported_hardw + StartsWith(handle.GetDeviceName(), "gfx908") || + StartsWith(handle.GetDeviceName(), "gfx90a") || + StartsWith(handle.GetDeviceName(), "gfx1030"); ++ StartsWith(handle.GetDeviceName(), "gfx1031"); + } + + static inline bool is_support_amd_buffer_atomic_fadd(const std::string& device_name) +@@ -83,6 +84,8 @@ static inline auto get_ck_common_compile + compiler_flag << " -DCK_AMD_GPU_GFX90A"; + else if(StartsWith(device_name, "gfx1030")) + compiler_flag << " -DCK_AMD_GPU_GFX1030"; ++ else if(StartsWith(device_name, "gfx1031")) ++ compiler_flag << " -DCK_AMD_GPU_GFX1031"; + + // buffer atomic-fadd + compiler_flag << " -DCK_USE_AMD_BUFFER_ATOMIC_FADD=" +diff --color -upr MIOpen-rocm-5.1.3/src/include/miopen/solver/implicitgemm_util.hpp gfx1031/src/include/miopen/solver/implicitgemm_util.hpp +--- MIOpen-rocm-5.1.3/src/include/miopen/solver/implicitgemm_util.hpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/include/miopen/solver/implicitgemm_util.hpp 2022-09-01 18:36:18.638980266 +0800 +@@ -469,7 +469,7 @@ static inline bool is_use_amd_buffer_loa + { + #if WORKAROUND_MIOPEN_ISSUE_557 + const auto device_name = ctx.GetStream().GetDeviceName(); +- return !StartsWith(device_name, "gfx1030"); ++ return !StartsWith(device_name, "gfx1030") && !StartsWith(device_name, "gfx1031"); + #else + return true; + #endif +@@ -478,7 +478,7 @@ static inline bool is_use_amd_buffer_loa + static inline bool is_use_v_fmac_f32(const ConvolutionContext& ctx) + { + const auto device_name = ctx.GetStream().GetDeviceName(); +- return StartsWith(device_name, "gfx1030"); ++ return StartsWith(device_name, "gfx1030") || StartsWith(device_name, "gfx1031"); + } + + static inline bool support_amd_buffer_atomic_fadd(const std::string& device_name) +@@ -599,7 +599,8 @@ static inline bool IsComposableKernelSup + StartsWith(c.GetStream().GetDeviceName(), "gfx906") || + StartsWith(c.GetStream().GetDeviceName(), "gfx908") || + StartsWith(c.GetStream().GetDeviceName(), "gfx90a") || +- StartsWith(c.GetStream().GetDeviceName(), "gfx1030"); ++ StartsWith(c.GetStream().GetDeviceName(), "gfx1030")|| ++ StartsWith(c.GetStream().GetDeviceName(), "gfx1031"); + } + + // greatest common divisor, aka highest common factor +diff --color -upr MIOpen-rocm-5.1.3/src/kernels/batchnorm_functions.h gfx1031/src/kernels/batchnorm_functions.h +--- MIOpen-rocm-5.1.3/src/kernels/batchnorm_functions.h 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/kernels/batchnorm_functions.h 2022-09-01 18:36:18.858979772 +0800 +@@ -159,6 +159,10 @@ + #define MIO_BN_GFX1030 0 + #endif + ++#ifndef MIO_BN_GFX1031 ++#define MIO_BN_GFX1031 0 ++#endif ++ + #define UNUSED __attribute__((__unused__)) + + #if(MIO_BN_VARIANT != 4) +diff --color -upr MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormActivBwdPerAct.cl gfx1031/src/kernels/MIOpenBatchNormActivBwdPerAct.cl +--- MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormActivBwdPerAct.cl 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/kernels/MIOpenBatchNormActivBwdPerAct.cl 2022-09-01 18:36:18.858979772 +0800 +@@ -34,7 +34,7 @@ + #endif + + #define MIOPEN_USE_AMDGCN 0 +-#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 ++#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1 + #undef MIOPEN_USE_AMDGCN + #define MIOPEN_USE_AMDGCN 1 + #endif +diff --color -upr MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormActivBwdSpatial.cl gfx1031/src/kernels/MIOpenBatchNormActivBwdSpatial.cl +--- MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormActivBwdSpatial.cl 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/kernels/MIOpenBatchNormActivBwdSpatial.cl 2022-09-01 18:36:18.858979772 +0800 +@@ -32,7 +32,7 @@ + #endif + + #define MIOPEN_USE_AMDGCN 0 +-#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 ++#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1 + #undef MIOPEN_USE_AMDGCN + #define MIOPEN_USE_AMDGCN 1 + #endif +diff --color -upr MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormActivFwdTrainSpatial.cl gfx1031/src/kernels/MIOpenBatchNormActivFwdTrainSpatial.cl +--- MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormActivFwdTrainSpatial.cl 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/kernels/MIOpenBatchNormActivFwdTrainSpatial.cl 2022-09-01 18:36:18.858979772 +0800 +@@ -33,7 +33,7 @@ + #endif + + #define MIOPEN_USE_AMDGCN 0 +-#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 ++#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1 + #undef MIOPEN_USE_AMDGCN + #define MIOPEN_USE_AMDGCN 1 + #endif +diff --color -upr MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormBwdSpatial.cl gfx1031/src/kernels/MIOpenBatchNormBwdSpatial.cl +--- MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormBwdSpatial.cl 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/kernels/MIOpenBatchNormBwdSpatial.cl 2022-09-01 18:36:18.858979772 +0800 +@@ -33,7 +33,7 @@ + #endif + + #define MIOPEN_USE_AMDGCN 0 +-#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 ++#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1 + #undef MIOPEN_USE_AMDGCN + #define MIOPEN_USE_AMDGCN 1 + #endif +diff --color -upr MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormFwdTrainSpatial.cl gfx1031/src/kernels/MIOpenBatchNormFwdTrainSpatial.cl +--- MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormFwdTrainSpatial.cl 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/kernels/MIOpenBatchNormFwdTrainSpatial.cl 2022-09-01 18:36:18.858979772 +0800 +@@ -33,7 +33,7 @@ + #endif + + #define MIOPEN_USE_AMDGCN 0 +-#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 ++#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1 + #undef MIOPEN_USE_AMDGCN + #define MIOPEN_USE_AMDGCN 1 + #endif +diff --color -upr MIOpen-rocm-5.1.3/src/md_graph.cpp gfx1031/src/md_graph.cpp +--- MIOpen-rocm-5.1.3/src/md_graph.cpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/md_graph.cpp 2022-09-01 18:36:18.630980283 +0800 +@@ -738,8 +738,8 @@ void FusionMDGraph::InitConv(FusionMDGra + + add_v21_wino("gfx9", {"gfx900", "gfx906", "gfx908", "gfx90a"}, 1); + add_v21_wino("gfx9", {"gfx900", "gfx906", "gfx908", "gfx90a"}, 2); +- add_v21_wino("gfx10", {"gfx1011", "gfx1012", "gfx1030"}, 1); +- add_v21_wino("gfx10", {"gfx1011", "gfx1012", "gfx1030"}, 2); ++ add_v21_wino("gfx10", {"gfx1011", "gfx1012", "gfx1030", "gfx1031"}, 1); ++ add_v21_wino("gfx10", {"gfx1011", "gfx1012", "gfx1030", "gfx1031"}, 2); + } + } + +diff --color -upr MIOpen-rocm-5.1.3/src/ocl/fusionopbiasbnactivocl.cpp gfx1031/src/ocl/fusionopbiasbnactivocl.cpp +--- MIOpen-rocm-5.1.3/src/ocl/fusionopbiasbnactivocl.cpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/ocl/fusionopbiasbnactivocl.cpp 2022-09-01 18:36:18.634980274 +0800 +@@ -392,7 +392,8 @@ miopenStatus_t BatchNormBwdTrainFusionOp + " -DMIO_BN_USESAVED=" + std::to_string(static_cast<int>(true)) + + " -DMIO_BN_VARIANT=" + std::to_string(variant) + + " -DMIO_BN_CBA_WRITE_INTERMEDIATE=" + std::to_string(0) + +- " -DMIO_BN_GFX1030=" + ((handle.GetDeviceName() == "gfx1030") ? "1" : "0"); ++ " -DMIO_BN_GFX1030=" + ((handle.GetDeviceName() == "gfx1030") ? "1" : "0") + ++ " -DMIO_BN_GFX1031=" + ((handle.GetDeviceName() == "gfx1031") ? "1" : "0"); + + compile_config += add; + MIOPEN_LOG_I2(add); +@@ -607,7 +608,8 @@ miopenStatus_t BatchNormFwdTrainFusionOp + " -DMIO_SAVE_MEAN_VARIANCE=" + (saveBatchStats ? "1" : "0") + + " -DMIO_RUNNING_RESULT=" + ((savePopStats) ? "1" : "0") + + " -DMIO_BN_VARIANT=" + std::to_string(variant) + +- " -DMIO_BN_GFX1030=" + ((handle.GetDeviceName() == "gfx1030") ? "1" : "0"); ++ " -DMIO_BN_GFX1030=" + ((handle.GetDeviceName() == "gfx1030") ? "1" : "0") + ++ " -DMIO_BN_GFX1031=" + ((handle.GetDeviceName() == "gfx1031") ? "1" : "0"); + + compile_config += add; + MIOPEN_LOG_I2(add); +diff --color -upr MIOpen-rocm-5.1.3/src/solver/batchnorm/backward_per_activation.cpp gfx1031/src/solver/batchnorm/backward_per_activation.cpp +--- MIOpen-rocm-5.1.3/src/solver/batchnorm/backward_per_activation.cpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/solver/batchnorm/backward_per_activation.cpp 2022-09-01 18:36:18.638980266 +0800 +@@ -113,6 +113,7 @@ BnBwdTrainingPerActivation::GetSolution( + {"MIO_BN_GRP1", ylocalsize}, + {"MIO_BN_GRP2", zlocalsize}, + {"MIO_BN_GFX1030", ((handle.GetDeviceName() == "gfx1030") ? "1" : "0")}, ++ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")}, + }; + + kernel.comp_options = build_params.GenerateFor(kbp::OpenCL{}); +diff --color -upr MIOpen-rocm-5.1.3/src/solver/batchnorm/backward_spatial_multiple.cpp gfx1031/src/solver/batchnorm/backward_spatial_multiple.cpp +--- MIOpen-rocm-5.1.3/src/solver/batchnorm/backward_spatial_multiple.cpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/solver/batchnorm/backward_spatial_multiple.cpp 2022-09-01 18:36:18.638980266 +0800 +@@ -210,6 +210,7 @@ ConvSolution BnBwdTrainingSpatialMultipl + {"MIO_BN_GRP1", ylocalsize}, + {"MIO_BN_GRP2", zlocalsize}, + {"MIO_BN_GFX1030", ((handle.GetDeviceName() == "gfx1030") ? "1" : "0")}, ++ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")}, + {"MIO_LAYOUT_NHWC", static_cast<int>(problem.IsLayoutNHWC())}, + }; + +diff --color -upr MIOpen-rocm-5.1.3/src/solver/batchnorm/backward_spatial_single.cpp gfx1031/src/solver/batchnorm/backward_spatial_single.cpp +--- MIOpen-rocm-5.1.3/src/solver/batchnorm/backward_spatial_single.cpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/solver/batchnorm/backward_spatial_single.cpp 2022-09-01 18:36:18.638980266 +0800 +@@ -247,6 +247,7 @@ BnBwdTrainingSpatialSingle::GetSolution( + + build_params << KernelBuildParameters{ + {"MIO_BN_GFX1030", (handle.GetDeviceName() == "gfx1030") ? "1" : "0"}, ++ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")}, + }; + + kernel.comp_options = build_params.GenerateFor(kbp::OpenCL{}); +diff --color -upr MIOpen-rocm-5.1.3/src/solver/batchnorm/forward_inference.cpp gfx1031/src/solver/batchnorm/forward_inference.cpp +--- MIOpen-rocm-5.1.3/src/solver/batchnorm/forward_inference.cpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/solver/batchnorm/forward_inference.cpp 2022-09-01 18:36:18.638980266 +0800 +@@ -103,6 +103,7 @@ ConvSolution BnFwdInference::GetSolution + {"MIO_BN_GRP1", ylocalsize},
+ {"MIO_BN_GRP2", zlocalsize},
+ {"MIO_BN_GFX1030", ((handle.GetDeviceName() == "gfx1030") ? "1" : "0")},
++ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")},
+ };
+
+ kernel.comp_options = build_params.GenerateFor(kbp::OpenCL{});
+diff --color -upr MIOpen-rocm-5.1.3/src/solver/batchnorm/forward_per_activation.cpp gfx1031/src/solver/batchnorm/forward_per_activation.cpp +--- MIOpen-rocm-5.1.3/src/solver/batchnorm/forward_per_activation.cpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/solver/batchnorm/forward_per_activation.cpp 2022-09-01 18:36:18.638980266 +0800 +@@ -105,6 +105,7 @@ BnFwdTrainingPerActivation::GetSolution( + {"MIO_BN_GRP1", ylocalsize}, + {"MIO_BN_GRP2", zlocalsize}, + {"MIO_BN_GFX1030", ((handle.GetDeviceName() == "gfx1030") ? "1" : "0")}, ++ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")}, + }; + + auto kernel = KernelInfo{}; +diff --color -upr MIOpen-rocm-5.1.3/src/solver/batchnorm/forward_spatial_multiple.cpp gfx1031/src/solver/batchnorm/forward_spatial_multiple.cpp +--- MIOpen-rocm-5.1.3/src/solver/batchnorm/forward_spatial_multiple.cpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/solver/batchnorm/forward_spatial_multiple.cpp 2022-09-01 18:36:18.638980266 +0800 +@@ -177,6 +177,7 @@ ConvSolution BnFwdTrainingSpatialMultipl + {"MIO_BN_GRP1", ylocalsize}, + {"MIO_BN_GRP2", zlocalsize}, + {"MIO_BN_GFX1030", ((handle.GetDeviceName() == "gfx1030") ? "1" : "0")}, ++ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")}, + {"MIO_LAYOUT_NHWC", static_cast<int>(problem.IsLayoutNHWC())}, + }; + +diff --color -upr MIOpen-rocm-5.1.3/src/solver/batchnorm/forward_spatial_single.cpp gfx1031/src/solver/batchnorm/forward_spatial_single.cpp +--- MIOpen-rocm-5.1.3/src/solver/batchnorm/forward_spatial_single.cpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/solver/batchnorm/forward_spatial_single.cpp 2022-09-01 18:36:18.638980266 +0800 +@@ -211,6 +211,7 @@ BnFwdTrainingSpatialSingle::GetSolution( + {"MIO_BN_GRP1", ylocalsize}, + {"MIO_BN_GRP2", zlocalsize}, + {"MIO_BN_GFX1030", ((handle.GetDeviceName() == "gfx1030") ? "1" : "0")}, ++ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")}, + {"MIO_LAYOUT_NHWC", static_cast<int>(problem.IsLayoutNHWC())}, + }; + +diff --color -upr MIOpen-rocm-5.1.3/src/target_properties.cpp gfx1031/src/target_properties.cpp +--- MIOpen-rocm-5.1.3/src/target_properties.cpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/src/target_properties.cpp 2022-09-01 18:36:18.630980283 +0800 +@@ -54,6 +54,7 @@ static std::string GetDeviceNameFromMap( + {"Vega10", "gfx900"}, + {"gfx901", "gfx900"}, + {"10.3.0 Sienna_Cichlid 18", "gfx1030"}, ++ {"10.3.1 Navi_flounder 18", "gfx1031"}, + }; + + const char* const p_asciz = miopen::GetStringEnv(MIOPEN_DEBUG_ENFORCE_DEVICE{}); +diff --color -upr MIOpen-rocm-5.1.3/test/CMakeLists.txt gfx1031/test/CMakeLists.txt +--- MIOpen-rocm-5.1.3/test/CMakeLists.txt 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/test/CMakeLists.txt 2022-09-01 18:36:19.022979405 +0800 +@@ -38,6 +38,7 @@ option( MIOPEN_TEST_GFX90A "Test on gfx9 + option( MIOPEN_TEST_GFX900 "Test on Vega10 (gfx900)" OFF ) + option( MIOPEN_TEST_GFX906 "Test on Vega20 (gfx906)" OFF ) + option( MIOPEN_TEST_GFX1030 "Test on Navi21 (gfx1030)" OFF ) ++option( MIOPEN_TEST_GFX1031 "Test on Navi21 (gfx1031)" OFF ) + option( MIOPEN_TEST_GPU_XNACK_ENABLED "Test as if XNACK mode is enabled" OFF ) + option( MIOPEN_TEST_CONV Off) + option( MIOPEN_TEST_DEEPBENCH Off) +@@ -74,7 +75,7 @@ endif() + # Also we do not detect GPU when target GPU for testing is specified explicitly. + set(MIOPEN_TEST_GPU_DETECTION_FAILED FALSE) + set(MIOPEN_NO_GPU FALSE) +-if(NOT (MIOPEN_TEST_GFX900 OR MIOPEN_TEST_GFX906 OR MIOPEN_TEST_GFX908 OR MIOPEN_TEST_GFX90A OR MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_HIP_NOGPU)) ++if(NOT (MIOPEN_TEST_GFX900 OR MIOPEN_TEST_GFX906 OR MIOPEN_TEST_GFX908 OR MIOPEN_TEST_GFX90A OR MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_GFX1031 OR MIOPEN_TEST_HIP_NOGPU)) + find_program(ROCMINFO + NAMES rocminfo + PATHS +@@ -96,6 +97,8 @@ if(NOT (MIOPEN_TEST_GFX900 OR MIOPEN_TES + elseif (NOT ROCMINFO_EXIT_STATUS EQUAL 0) + message(WARNING "ROCMINFO FAILED, GPU TYPE UNKNOWN. Manually set respective MIOPEN_TEST_GFX* CMake variable to specify target GPU for testing.") + set(MIOPEN_TEST_GPU_DETECTION_FAILED TRUE) ++ elseif(ROCMINFO_OUTPUT MATCHES "gfx1031") ++ set(MIOPEN_TEST_GFX1031 ON) + elseif(ROCMINFO_OUTPUT MATCHES "gfx1030") + set(MIOPEN_TEST_GFX1030 ON) + elseif(ROCMINFO_OUTPUT MATCHES "gfx900") +@@ -125,6 +128,7 @@ message(STATUS "MIOPEN_TEST_GFX906 ${MIO + message(STATUS "MIOPEN_TEST_GFX908 ${MIOPEN_TEST_GFX908}") + message(STATUS "MIOPEN_TEST_GFX90A ${MIOPEN_TEST_GFX90A}") + message(STATUS "MIOPEN_TEST_GFX1030 ${MIOPEN_TEST_GFX1030}") ++message(STATUS "MIOPEN_TEST_GFX1031 ${MIOPEN_TEST_GFX1031}") + message(STATUS "MIOPEN_TEST_GPU_XNACK_ENABLED ${MIOPEN_TEST_GPU_XNACK_ENABLED}") + message(STATUS "MIOPEN_TEST_GPU_DETECTION_FAILED ${MIOPEN_TEST_GPU_DETECTION_FAILED}") + +@@ -167,10 +171,10 @@ endmacro() + set_var_to_condition(WORKAROUND_ISSUE_1187_DEFAULT MIOPEN_TEST_GFX90A AND MIOPEN_TEST_FLOAT) + option( WORKAROUND_ISSUE_1187 "" ${WORKAROUND_ISSUE_1187_DEFAULT}) + +-set_var_to_condition(WORKAROUND_ISSUE_1148_DEFAULT MIOPEN_TEST_GFX1030 AND MIOPEN_TEST_FLOAT) ++set_var_to_condition(WORKAROUND_ISSUE_1148_DEFAULT MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_GFX1031 AND MIOPEN_TEST_FLOAT) + option( WORKAROUND_ISSUE_1148 "" ${WORKAROUND_ISSUE_1148_DEFAULT}) + +-set_var_to_condition(WORKAROUND_ISSUE_1334_DEFAULT MIOPEN_TEST_GFX1030 AND MIOPEN_TEST_FLOAT) ++set_var_to_condition(WORKAROUND_ISSUE_1334_DEFAULT MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_GFX1031 AND MIOPEN_TEST_FLOAT) + option( WORKAROUND_ISSUE_1334 "" ${WORKAROUND_ISSUE_1334_DEFAULT}) + + if(NOT MIOPEN_TEST_MIOTENSILE) +@@ -216,7 +220,7 @@ if (MIOPEN_NO_GPU) + test_pooling3d test_perfdb) + endif() + +-if(MIOPEN_TEST_GFX1030) ++if(MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_GFX1031) + if(WORKAROUND_ISSUE_1053 AND MIOPEN_TEST_ALL) + list(APPEND SKIP_TESTS test_lrn_test) + endif() +@@ -439,7 +443,7 @@ endfunction() + # If nothing is specified, the default value is taken. + # Default: FLOAT_ENABLED HALF_DISABLED BF16_DISABLED INT8_DISABLED + # +-# GPU types: GFX900, GFX906, GFX908, GFX90A, GFX1030 ++# GPU types: GFX900, GFX906, GFX908, GFX90A, GFX1030, GFX1031 + # The option can be enabled or disabled by using '_ENABLED' and '_DISABLED' suffix. + # If nothing is specified, the default value is taken. + # Default: GFX900_ENABLED, GFX906_ENABLED, GFX908_ENABLED, GFX90A_ENABLED, GFX1030_DISABLED +@@ -571,7 +575,7 @@ function(add_custom_test NAME) + set_tests_properties(${NAME} PROPERTIES RUN_SERIAL On) + endif() + +- if( (is_gfx900_check OR is_gfx906_check OR is_gfx908_check OR is_gfx1030_check OR is_gfx90a_check) ++ if( (is_gfx900_check OR is_gfx906_check OR is_gfx908_check OR is_gfx1030_check OR is_gfx1031_check OR is_gfx90a_check) + AND is_full_check + AND is_xnack_on_check + AND (is_miotensile_check AND is_mlir_check) +diff --color -upr MIOpen-rocm-5.1.3/test/handle_test.cpp gfx1031/test/handle_test.cpp +--- MIOpen-rocm-5.1.3/test/handle_test.cpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/test/handle_test.cpp 2022-09-01 18:36:19.018979413 +0800 +@@ -234,7 +234,7 @@ void test_warnings(kernel_type_t kern_ty + void test_arch_name() + { + auto&& h = get_handle(); +- auto known_arch = {"gfx908", "gfx90a", "gfx906", "gfx900", "gfx803", "gfx1030"}; ++ auto known_arch = {"gfx908", "gfx90a", "gfx906", "gfx900", "gfx803", "gfx1030", "gfx1031"}; + auto this_arch = h.GetDeviceName(); + EXPECT(std::any_of( + known_arch.begin(), known_arch.end(), [&](std::string arch) { return arch == this_arch; })); +diff --color -upr MIOpen-rocm-5.1.3/test/mdgraph.cpp gfx1031/test/mdgraph.cpp +--- MIOpen-rocm-5.1.3/test/mdgraph.cpp 2022-05-08 14:08:05.000000000 +0800 ++++ gfx1031/test/mdgraph.cpp 2022-09-01 18:36:19.022979405 +0800 +@@ -222,7 +222,7 @@ struct mdgraph_driver : test_driver + auto target = h.GetTargetProperties(); + + auto wino_supported_arch = { +- "gfx1030", "gfx1012", "gfx1011", "gfx90a", "gfx908", "gfx906", "gfx900", "gfx803"}; ++ "gfx1030", "gfx1031","gfx1012", "gfx1011", "gfx90a", "gfx908", "gfx906", "gfx900", "gfx803"}; + + auto is_wino_support = !xnack_enabled && + !miopen::IsDisabled(MIOPEN_DEBUG_GCN_ASM_KERNELS{}) && diff --git a/sci-libs/miopen/files/miopen-5.1.3-include-array.patch b/sci-libs/miopen/files/miopen-5.1.3-include-array.patch new file mode 100644 index 000000000000..fc6a36d22548 --- /dev/null +++ b/sci-libs/miopen/files/miopen-5.1.3-include-array.patch @@ -0,0 +1,12 @@ +This fixes compile error upon gcc-12 libstdc++ +index 1cfb2a72c..0f4feb406 100644 +--- a/test/sequences.cpp ++++ b/test/sequences.cpp +@@ -25,6 +25,7 @@ + *******************************************************************************/ + #include "test.hpp" + #include <miopen/sequences.hpp> ++#include <array> + + namespace miopen { + namespace seq { diff --git a/sci-libs/miopen/files/miopen-5.1.3-no-strip.patch b/sci-libs/miopen/files/miopen-5.1.3-no-strip.patch new file mode 100644 index 000000000000..0d1d429dbb85 --- /dev/null +++ b/sci-libs/miopen/files/miopen-5.1.3-no-strip.patch @@ -0,0 +1,17 @@ +Don't strip for release. Let portage handle stripping. +Index: MIOpen-rocm-5.1.3/CMakeLists.txt +=================================================================== +--- MIOpen-rocm-5.1.3.orig/CMakeLists.txt ++++ MIOpen-rocm-5.1.3/CMakeLists.txt +@@ -78,11 +78,6 @@ option( BUILD_DEV "Build for development + option(MIOPEN_ENABLE_FIN "Enable the fin driver for MIOpen" OFF) + + +-# Strip symbols for release +-if(NOT WIN32 AND NOT APPLE) +- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s") +- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s") +-endif() + + rocm_setup_version(VERSION 2.16.0) + diff --git a/sci-libs/miopen/miopen-5.1.3.ebuild b/sci-libs/miopen/miopen-5.1.3.ebuild new file mode 100644 index 000000000000..a7d8b5083f60 --- /dev/null +++ b/sci-libs/miopen/miopen-5.1.3.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} + +inherit cmake flag-o-matic llvm rocm + +LLVM_MAX_SLOT=14 + +DESCRIPTION="AMD's Machine Intelligence Library" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/MIOpen" +SRC_URI="https://github.com/ROCmSoftwarePlatform/MIOpen/archive/rocm-${PV}.tar.gz -> MIOpen-${PV}.tar.gz" + +LICENSE="MIT" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" + +IUSE="debug test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-util/hip-5.1.3 + >=dev-db/sqlite-3.17 + sci-libs/rocBLAS:${SLOT}[${ROCM_USEDEP}] + >=dev-libs/boost-1.72 +" + +DEPEND="${RDEPEND}" + +BDEPEND="dev-libs/half:0/1 + dev-util/rocm-cmake +" + +S="${WORKDIR}/MIOpen-rocm-${PV}" + +PATCHES=( + "${FILESDIR}/${PN}-4.2.0-disable-no-inline-boost.patch" + "${FILESDIR}/${PN}-4.2.0-gcc11-numeric_limits.patch" + "${FILESDIR}/${PN}-5.0.2-strip-xnack-in-flags.patch" + "${FILESDIR}/${PN}-4.3.0-fix-interface-include-in-HIP_COMPILER_FLAGS.patch" + "${FILESDIR}/${PN}-4.3.0-enable-test.patch" + "${FILESDIR}/${PN}-5.1.3-gfx1031.patch" + "${FILESDIR}/${PN}-5.1.3-deprecate-clang-ocl.patch" + "${FILESDIR}/${PN}-5.1.3-no-strip.patch" + "${FILESDIR}/${PN}-5.1.3-include-array.patch" + "${FILESDIR}/${PN}-5.1.3-avoid-metadata-error-for-vanilla-clang.patch" +) + +src_prepare() { + cmake_src_prepare + + sed -e "s:/opt/rocm/llvm:$(get_llvm_prefix ${LLVM_MAX_SLOT}) NO_DEFAULT_PATH:" \ + -e "s:/opt/rocm/hip:$(hipconfig -p) NO_DEFAULT_PATH:" \ + -e '/set( MIOPEN_INSTALL_DIR/s:miopen:${CMAKE_INSTALL_PREFIX}:' \ + -e '/MIOPEN_TIDY_ERRORS ALL/d' \ + -i CMakeLists.txt || die + + sed -e "/rocm_install_symlink_subdir(\${MIOPEN_INSTALL_DIR})/d" -i src/CMakeLists.txt || die + sed -e "/add_test/s:--build \${CMAKE_CURRENT_BINARY_DIR}:--build ${BUILD_DIR}:" -i test/CMakeLists.txt || die + + sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:${EPREFIX}/usr/lib/amdgcn/bitcode:" -i cmake/hip-config.cmake || die + + # This plus avoid-metadata-error-for-vanilla-clang.patch fix bug mentioned + # in https://github.com/ROCmSoftwarePlatform/MIOpen/issues/1731 + find src/kernels -name "*.s" -exec \ + sed -e "s/.name: n /.name: x /g" -e "s/.name: y /.name: z /g" \ + -e "s/.name: y,/.name: z,/g" -i {} \; || die +} + +src_configure() { + if ! use debug; then + append-cflags "-DNDEBUG" + append-cxxflags "-DNDEBUG" + CMAKE_BUILD_TYPE="Release" + else + CMAKE_BUILD_TYPE="Debug" + fi + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=ON + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DMIOPEN_BACKEND=HIP + -DBoost_USE_STATIC_LIBS=OFF + -DMIOPEN_USE_MLIR=OFF + -DBUILD_TESTS=$(usex test ON OFF) + -DMIOPEN_TEST_ALL=$(usex test ON OFF) + ) + + if use test; then + for gpu_target in ${AMDGPU_TARGETS}; do + mycmakeargs+=( -DMIOPEN_TEST_${gpu_target^^}=ON ) + done + fi + + addpredict /dev/kfd + addpredict /dev/dri/ + append-cxxflags "--rocm-path=$(hipconfig -R)" + append-cxxflags "--hip-device-lib-path=${EPREFIX}/usr/lib/amdgcn/bitcode" + CXX="$(get_llvm_prefix ${LLVM_MAX_SLOT})/bin/clang++" cmake_src_configure +} + +src_test() { + check_amdgpu + export LD_LIBRARY_PATH="${BUILD_DIR}"/lib + MAKEOPTS="-j1" cmake_src_test +} diff --git a/sci-libs/rocBLAS/Manifest b/sci-libs/rocBLAS/Manifest index 3588745278a8..c4839105098d 100644 --- a/sci-libs/rocBLAS/Manifest +++ b/sci-libs/rocBLAS/Manifest @@ -13,7 +13,9 @@ DIST rocBLAS-5.0.2-Tensile-asm_full-navi22.tar.gz 1110323 BLAKE2B 80fab97c6f89fc DIST rocm-Tensile-4.3.0.tar.gz 14250149 BLAKE2B 030138eaca2a0aadd96801e6dbd72e510716dd90553ef3795c5e04e00a34a05ecae82b24f755e4033a4acfcdb1cf26291da1e7902bb090f89a010d403e832beb SHA512 126db0b413c716fba8d5be9bff7a44fd1badacbf32f3db8d0db649819177db37ebd56fd22dd3c809655f5d29675be115e698cd10bc3d0b4b23878ae3726fce47 DIST rocm-rocBLAS-4.3.0.tar.gz 11569970 BLAKE2B f11b0acf2bbd5737b036142d3b2cc1e18c38e088a8b7db58156d478dd6718befbb82bb7fd43a38fe64a5427124c5ad5241fa37977f094e6efd195d168d3e5f65 SHA512 490ab1c1e98a8b311ad5630515c448d9bb0a2bf588a08bcbebee345e2954d616b4ffe7c2e03dadca82c590438c42afccb98fe8ba00856aece101b5ffe62ef1e0 DIST rocm-rocBLAS-5.0.2.tar.gz 13295178 BLAKE2B e1abfa06b9ac1545732465857839dae3f3708af49439a306a2b5b1b1b392101c38c95815f2c05a0d9ed29d41b154bc2e16a4f9203a37f5e2f68ee12cc4b44a06 SHA512 2f4a74f49350ede0debcf32229a6b6b95505615723c3f2bee16e4c169a3bb966dfb1971819028f47c525f571bea5662b892e63f655b0d1d2b8f20746bc5fe770 +DIST rocm-rocBLAS-5.1.3.tar.gz 13741546 BLAKE2B af10d8cb69bee44ef5aab2dc350e1d9f3b6fddb3a840c17230c4b55b2649a4724c9f2e58c1eafdb3e2716eea016a72a35c3ddb498881b1ce682d780baa8d8b07 SHA512 5ab71838fdd0e9c5848cbf28a19d113353b619a878d8c7d05f64feb32faae2054169c95ed6e9dd6b05a2e807b57229dd2c361c4d289b6e6f17c196558640890f EBUILD rocBLAS-4.3.0-r1.ebuild 3897 BLAKE2B 3100406bc65c2292c5b444760bb73bff4804181405d1a174397191ea31f41e8ecebe050bb2bee060a5be344ea5e514c0acde028f8fc483879dbff8b504a69454 SHA512 aab616bb0662c7983c0edd25fb12d79687c9c5f9b6552ac758156b756e8d4db764c50dd6534c92f02be0ba7ff45904586976d0918626b3ebb0d791d38445ec70 EBUILD rocBLAS-4.3.0.ebuild 4226 BLAKE2B 0e4814b92bf97e230dee8ff54565ca718d2482d12e3f31d194e6321a55b064f3653059dfef623d665ac5d25fadad20a8bca81ace83980c3ee8f5e62cb5c4cd24 SHA512 06528ef0cf5767ed0b9bc58794cddebfc7e247091ff78c4e0e8eeb8f75ed3cdfd5443044671837f9573cf0e576d8006ef6a7c1a96786f5d4a8f06657c5b6308c EBUILD rocBLAS-5.0.2-r2.ebuild 3844 BLAKE2B 533b6eb02440c1a485d9933b88a5e554fac7638b72e2209dfe8ab83cea53575cdb2e0ae968c8206fda18aca6a695c38df97457d0ea36832f096b0e92af4c91c3 SHA512 aa8e6749b96e54bc3881a265f8719d6c48995f12b033ed6166f30935d2c47ddfaf52af5f7feaf9911aa47c3b4e628a50eedf9f1ffbefbb5923d5996acedd7383 +EBUILD rocBLAS-5.1.3.ebuild 3046 BLAKE2B 8c508afc782607532296e3439923db2f2f4b4cc4b9c59c18fd331b16819c82f78a5196cc8852650b1829761fcc8e73105ab96767b68fc00e3b1bb325aa3ec039 SHA512 7a85e77c2a8cc2be8305dd0137bb63446e80a5cfb039bdad07da1c35daf0a49fbadb94b65686f35c445f285378f69e48ba68c4cde26f408c265864a91a131558 MISC metadata.xml 654 BLAKE2B b8a1d40e2ccc2aadccb9a1200e9c78fccb37544fa01c353645372a4ed01a6d153c04ff5d0d96cd7661e80b09eb6c69e8cbc59e466fef117ea1ad5ef54b1334ae SHA512 b880f8f495aee8c337b7cac4054a30f877a1204d0cda03fa90aaa25e4ae163d435c113141f2afef62967f603dea372419b228655e1b26fff53c010c8efdcebf1 diff --git a/sci-libs/rocBLAS/rocBLAS-5.1.3.ebuild b/sci-libs/rocBLAS/rocBLAS-5.1.3.ebuild new file mode 100644 index 000000000000..d9316725fe8c --- /dev/null +++ b/sci-libs/rocBLAS/rocBLAS-5.1.3.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DOCS_BUILDER="doxygen" +DOCS_DIR="docs" +DOCS_DEPEND="media-gfx/graphviz" +ROCM_VERSION=${PV} +inherit cmake docs edo multiprocessing prefix rocm + +DESCRIPTION="AMD's library for BLAS on ROCm" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocBLAS" +SRC_URI="https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-${PV}.tar.gz -> rocm-${P}.tar.gz + https://media.githubusercontent.com/media/littlewu2508/littlewu2508.github.io/main/gentoo-distfiles/${PN}-5.0.2-Tensile-asm_full-navi22.tar.gz" +S="${WORKDIR}/${PN}-rocm-${PV}" + +LICENSE="BSD" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" +IUSE="benchmark test" +REQUIRED_USE="${ROCM_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +BDEPEND=" + dev-util/rocm-cmake:${SLOT} + dev-util/Tensile:${SLOT} +" + +DEPEND=" + dev-util/hip + dev-libs/msgpack + test? ( + virtual/blas + dev-cpp/gtest + sys-libs/libomp + ) + benchmark? ( + virtual/blas + sys-libs/libomp + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-4.3.0-fix-glibc-2.32-and-above.patch + "${FILESDIR}"/${PN}-5.0.2-change-default-Tensile-library-dir.patch + "${FILESDIR}"/${PN}-5.0.2-cpp_lib_filesystem.patch + "${FILESDIR}"/${PN}-5.0.2-unbundle-Tensile.patch + ) + +src_prepare() { + cmake_src_prepare + cp -a "${WORKDIR}/asm_full/" library/src/blas3/Tensile/Logic/ || die + # Fit for Gentoo FHS rule + sed -e "/PREFIX rocblas/d" \ + -e "/<INSTALL_INTERFACE/s:include:include/rocblas:" \ + -e "s:rocblas/include:include/rocblas:" \ + -e "s:\\\\\${CPACK_PACKAGING_INSTALL_PREFIX}rocblas/lib:${EPREFIX}/usr/$(get_libdir)/rocblas:" \ + -e "s:share/doc/rocBLAS:share/doc/${P}:" \ + -e "/rocm_install_symlink_subdir( rocblas )/d" -i library/src/CMakeLists.txt || die + + sed -e "s:,-rpath=.*\":\":" -i clients/CMakeLists.txt || die + + eprefixify library/src/tensile_host.cpp +} + +src_configure() { + addpredict /dev/random + addpredict /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=On + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DTensile_LOGIC="asm_full" + -DTensile_COMPILER="hipcc" + -DTensile_LIBRARY_FORMAT="msgpack" + -DTensile_CODE_OBJECT_VERSION="V3" + -DTensile_TEST_LOCAL_PATH="${EPREFIX}/usr/share/Tensile" + -DTensile_ROOT="${EPREFIX}/usr/share/Tensile" + -DBUILD_WITH_TENSILE=ON + -DCMAKE_INSTALL_INCLUDEDIR="include/rocblas" + -DBUILD_TESTING=OFF + -DBUILD_CLIENTS_SAMPLES=OFF + -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) + -DBUILD_CLIENTS_BENCHMARKS=$(usex benchmark ON OFF) + -DTensile_CPU_THREADS=$(makeopts_jobs) + ) + + CXX=hipcc cmake_src_configure +} + +src_compile() { + docs_compile + cmake_src_compile +} + +src_test() { + check_amdgpu + cd "${BUILD_DIR}"/clients/staging || die + export ROCBLAS_TEST_TIMEOUT=3600 ROCBLAS_TENSILE_LIBPATH="${BUILD_DIR}/Tensile/library" + export LD_LIBRARY_PATH="${BUILD_DIR}/clients:${BUILD_DIR}/library/src" + edob ./${PN,,}-test +} + +src_install() { + cmake_src_install + + if use benchmark; then + cd "${BUILD_DIR}" || die + dolib.so clients/librocblas_fortran_client.so + dobin clients/staging/rocblas-bench + fi +} diff --git a/sci-libs/rocFFT/Manifest b/sci-libs/rocFFT/Manifest index 77383fa2aff8..e88da98f80cc 100644 --- a/sci-libs/rocFFT/Manifest +++ b/sci-libs/rocFFT/Manifest @@ -1,10 +1,14 @@ AUX rocFFT-4.2.0-add-functional-header.patch 426 BLAKE2B 82c289bb6663690163c11950d05c21acf73ac3c759b9c081f30bd2f86e8416a1d9e064d6879e3e5624b44488a6caf3d6d215e8a3c37647e5bfb0d58b85985081 SHA512 09bcfe421f20a6e5ba66a0efc4beecbdb591b2422eecc851c99c6cde12da904ab2bb86c5985bbc68fe9a859fdc986b21f6ae855cb631eb5e15819b6f39e3ef00 AUX rocFFT-5.0.2-add-math-header.patch 468 BLAKE2B 66cedbbc2b7aeaa2e42324e02325dc3f0c8869b109cdeb46892d597346532dcae2bd51739b85b97ecb6982935ec38f1332a4857d719b1c7c9e3a1e83f60623d1 SHA512 f714ba071838ebba8c6ab32b92eab52430622ef5f7eeea04f7a8c71b8a2a547688faf0f8d93a9be90183aebb976ec51722bcee81d960545046c82fd3df9b6f01 AUX rocFFT-5.0.2-unbundle-sqlite.patch 1997 BLAKE2B aee0737f52870d8b154b18b8961f0e8059d50d134afe014edf25439084f112b1f4d91a8123d5133fcde129305050447355df341898563ed950b80af3589d1153 SHA512 8dc74594c698e45a41a4632c2211a7c23c9f9ff4c2c3716b99c74888529414684d52e8e146853e69370d1c80893da35fcd1076a55cf9e7eddc9d2e6fb71296f7 +AUX rocFFT-5.1.3-add-stdexcept-header.patch 340 BLAKE2B b21454151dd2c41948e00b50360b3adbc93c08e7e849b11c032ba0b8dc76d1159883349065d7c87bf3098d0e67d4da48db220b58934de39fcb3c4d006a902a5e SHA512 a49f2bad5ea87f67a7d5dc7adb820a42ab2b92b0f1436a564c3906dcc4598de154d18247d8b4e8f3e12c3947da05890a4a9ba6f76852bebd1fcf26928ee48e0c +AUX rocFFT-5.1.3-unbundle-sqlite.patch 2326 BLAKE2B 5a08f2ec7486f0687c4af46e09a01678e8255254bb78ae864436353d10017f86f1b3b557527a32771de43fa24148c3be5d233639bdf3e6746b2d120623bf934d SHA512 c545053741c55abf1dbcda89e9ece1bccb42a5db86c0329499b332299c5c7b73150650634cc7506bef2ee7e16a25bf1aacd5477bf13884e2cb01c48a113b33ab DIST rocFFT-4.0.0.tar.gz 772176 BLAKE2B f08db9487449e707ba814a66d23992f68c140017a38f72ee45b3b224fc3e46abd40b976aef645f4432601265b38cff8939456981c686360eba135349b5d28fb5 SHA512 db9a6b49162dfb7924aa5f5dc8d42c92a5a741e03c3c0b4ece2cfb72de7506a345f3d28d31a3d7755cfe78078c448c9f952ca671e472335a4301de8702916176 DIST rocFFT-4.3.0.tar.gz 840748 BLAKE2B 236a5faa930751d35e501a9a32ecc8b4075448ef21a0ffb0bb7ec04f4ed1cb67b908aa153b5b424e0823d3e306cf375d7c01a77d687220ed79de6d374037e003 SHA512 765d41e4018a04a53e847c03de80eec830d3e8766187fb8cb493624afa2673175347c16e6eeeebd4ad7d88bb866e58f7e572708f22238723c710b98565a0cd3d DIST rocFFT-5.0.2.tar.gz 837508 BLAKE2B b74d0c6edd7b232f775bffefbca829d88d9d7cd9108c27a0698f45d7fe2760d40463bcda8c710e923874b3bbfb1e83e0fe8622db4dfa28afb29392b3e135e9a5 SHA512 d6810a92a10a27dbcac8a04e8fcd56c7fa198f208da626d8938d5ff28b6ab8b89a058c7a56b5666464165e8f6bd7c4c031a94315625a3613eb02a9b8eccd9eb9 +DIST rocFFT-5.1.3.tar.gz 845470 BLAKE2B 86060ce4f8612869fedc5bc92ed6a5bb7fbc539b26c7f5ab0ded5406ab6c340f64116782285d040824e54557af87d9ddb6f907fd1550b80c3da903d3c1d5e5c0 SHA512 175402856bd4753e74ce14326569be99221e21d0ce675e007900f6982c53e1566ad0b060eec545e0f17ff4dc4811688cc1003dc986226205ee95ee6f22d1ca43 EBUILD rocFFT-4.0.0-r1.ebuild 1131 BLAKE2B 71aa2f8a3318d92ac9ec0739b0e921b10b54bd8d3b1416d23a9ac3e41b23401626c382cba34b1d9e1249e42951d8b7fdba9604cda01cb9e12cb0980850f1c997 SHA512 dbbc8c2cd0c79b16c90fbb41bdd0f901e61195b373d0ebcce5df0e9cb4eebb116af142c8f10a85ce68cc1cf9aeb1f7578eee3d360d80ecf0512ae7821db15aa2 EBUILD rocFFT-4.3.0-r1.ebuild 2815 BLAKE2B 048cac2df33144519cf7b61f59887ea7ced86fc8234076bd3c4c50257d0af1bc86b57080beb88442ad830fcaafb5c169ff04c8ec99e7ade6eaf5fcde61e39b9e SHA512 caaba36af9e4c8a98029ff6fbf29282227824a4361544f5a7049ab6a40449dd1f9f4c39ea4429f151587fa99d518aed77a0c42cb6c415495892b994af44137a6 EBUILD rocFFT-5.0.2-r1.ebuild 4012 BLAKE2B 31231cf86a3b9c30d3b72919daff46c313826aa11c980c630b5ee64a4139819c8f734538ddac2ce260f2d2192e7c1df44e1d2c846f1f9710861725fc768ec81e SHA512 5fc6a0276eb150f1ba30652aa5691ac08a8a466e9f5bded3b5317b244abb4f4926caf8f728d38efe5eb6a71603932997dcdf9c4ba2acca2bb84757b3c8b52062 +EBUILD rocFFT-5.1.3.ebuild 3900 BLAKE2B c11070889fc468f8b4abecc89bd6b85d1ef9585d62de48afbc7639db61ddf8323111e70aadf93fb2fb0638ebb521b56da1c34f218cc1a15bee7d46a37c8d95ad SHA512 a6b07c33c314706e21ac6023d4850297806ba75f149dc570e750f65109b39449ecb1be8e06dac8deed4388c1fb78d7c9001ab8eeae3aefc60e53eeca7a535ec5 MISC metadata.xml 791 BLAKE2B d61b1f8788dd0d531aebd0b3273072a1ef2cd2e13423dd3b040cb077a6f12b2790a22159c339f98ce4ee93ee674db83390066a05d93d23e6de9dd47283a59ac7 SHA512 a33e10d3fcb784a75bf2b1d3ecddd53cf80328c37a6829202c7b74001338a2a10bdb122ce7aea65c68315e3985a890889b833cd65f4d1fb14bbf6d9bd59752e8 diff --git a/sci-libs/rocFFT/files/rocFFT-5.1.3-add-stdexcept-header.patch b/sci-libs/rocFFT/files/rocFFT-5.1.3-add-stdexcept-header.patch new file mode 100644 index 000000000000..edfd89ea4b70 --- /dev/null +++ b/sci-libs/rocFFT/files/rocFFT-5.1.3-add-stdexcept-header.patch @@ -0,0 +1,11 @@ +Contributed-by: perestoronin https://bugs.gentoo.org/693200#c25 +--- a/library/src/include/twiddles.h ++++ b/library/src/include/twiddles.h +@@ -14,6 +14,7 @@ + #include <numeric> + #include <tuple> + #include <vector> ++#include <stdexcept> + + static const size_t LTWD_BASE_DEFAULT = 8; + static const size_t LARGE_TWIDDLE_THRESHOLD = 4096; diff --git a/sci-libs/rocFFT/files/rocFFT-5.1.3-unbundle-sqlite.patch b/sci-libs/rocFFT/files/rocFFT-5.1.3-unbundle-sqlite.patch new file mode 100644 index 000000000000..b18b55eb8048 --- /dev/null +++ b/sci-libs/rocFFT/files/rocFFT-5.1.3-unbundle-sqlite.patch @@ -0,0 +1,67 @@ +Disable rocFFT fetching SQLite3 and link to system libsqlite.so +Index: rocFFT-rocm-5.1.3/library/src/CMakeLists.txt +=================================================================== +--- rocFFT-rocm-5.1.3.orig/library/src/CMakeLists.txt ++++ rocFFT-rocm-5.1.3/library/src/CMakeLists.txt +@@ -134,49 +134,22 @@ set( rocfft_source + rtcsubprocess.cpp + ) + +-# SQLite 3.36.0 enabled the backup API by default, which we need +-# for cache serialization. We also want to use a static SQLite, +-# and distro static libraries aren't typically built +-# position-independent. +-include( FetchContent ) +- +-set(SQLITE_SRC_URL https://sqlite.org/2021/sqlite-amalgamation-3360000.zip CACHE STRING "Location of SQLite source code") +-set(SQLITE_SRC_SHA256 999826fe4c871f18919fdb8ed7ec9dd8217180854dd1fe21eea96aed36186729 CACHE STRING "SHA256 hash of SQLite source code") +- +-# embed SQLite +-FetchContent_Declare(sqlite_local +- URL ${SQLITE_SRC_URL} +- URL_HASH SHA256=${SQLITE_SRC_SHA256} +-) +-FetchContent_MakeAvailable(sqlite_local) +-add_library( sqlite3 OBJECT ${sqlite_local_SOURCE_DIR}/sqlite3.c ) +-set_target_properties( sqlite3 PROPERTIES +- C_VISIBILITY_PRESET "hidden" +- VISIBILITY_INLINES_HIDDEN ON +- POSITION_INDEPENDENT_CODE ON +- ) +- +-# we don't need extensions, and omitting them from SQLite removes the +-# need for dlopen/dlclose from within rocFFT +-target_compile_options( +- sqlite3 +- PRIVATE -DSQLITE_OMIT_LOAD_EXTENSION +-) +- + set_property( + SOURCE rtc.cpp + PROPERTY OBJECT_DEPENDS ${kgen_embed_h} + ) + ++find_package( SQLite3 REQUIRED ) ++ + prepend_path( ".." rocfft_headers_public relative_rocfft_headers_public ) + + add_library( rocfft + ${rocfft_source} + ${relative_rocfft_headers_public} +- $<TARGET_OBJECTS:sqlite3> + ) + add_library( roc::rocfft ALIAS rocfft ) + ++target_link_libraries( rocfft PRIVATE ${SQLite3_LIBRARIES} ) + if( NOT WIN32 ) + target_link_libraries( rocfft PRIVATE -lstdc++fs ) + endif() +@@ -209,7 +182,7 @@ endif() + target_include_directories( rocfft + PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/library/src/include> + $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/library/src/device> +- ${sqlite_local_SOURCE_DIR} ++ ${SQLite3_LIBRARIES} + PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/library/include> + $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> + $<INSTALL_INTERFACE:include> diff --git a/sci-libs/rocFFT/rocFFT-5.1.3.ebuild b/sci-libs/rocFFT/rocFFT-5.1.3.ebuild new file mode 100644 index 000000000000..67d33f28847e --- /dev/null +++ b/sci-libs/rocFFT/rocFFT-5.1.3.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +ROCM_VERSION=${PV} + +inherit cmake check-reqs edo multiprocessing python-r1 rocm + +DESCRIPTION="Next generation FFT implementation for ROCm" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocFFT" +SRC_URI="https://github.com/ROCmSoftwarePlatform/rocFFT/archive/rocm-${PV}.tar.gz -> rocFFT-${PV}.tar.gz" + +LICENSE="MIT" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" + +# RDEPEND: perfscripts? dev-python/plotly[${PYTHON_USEDEP}] # currently masked by arch/amd64/x32/package.mask +RDEPEND=" +perfscripts? ( + >=media-gfx/asymptote-2.61 + dev-texlive/texlive-latex + dev-tex/latexmk + sys-apps/texinfo + dev-python/sympy[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/scipy[${PYTHON_USEDEP}] + dev-python/pandas[${PYTHON_USEDEP}] ) +${PYTHON_DEPS}" + +DEPEND="dev-util/hip + ${PYTHON_DEPS}" + +BDEPEND=" + test? ( dev-cpp/gtest dev-libs/boost + >=sci-libs/fftw-3 sys-libs/libomp ) + >=dev-util/cmake-3.22 + dev-util/rocm-cmake:${SLOT} +" + +CHECKREQS_DISK_BUILD="7G" + +IUSE="benchmark perfscripts test" +REQUIRED_USE="perfscripts? ( benchmark ) ${PYTHON_REQUIRED_USE} ${ROCM_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +S="${WORKDIR}/rocFFT-rocm-${PV}" + +PATCHES=( + "${FILESDIR}/${PN}-4.2.0-add-functional-header.patch" + "${FILESDIR}/${PN}-5.1.3-unbundle-sqlite.patch" + "${FILESDIR}/${PN}-5.0.2-add-math-header.patch" + "${FILESDIR}/${PN}-5.1.3-add-stdexcept-header.patch" ) + +required_mem() { + if use test; then + echo "52G" + else + if [[ -n "${AMDGPU_TARGETS}" ]]; then + local NARCH=$(($(awk -F";" '{print NF-1}' <<< "${AMDGPU_TARGETS}" || die)+1)) # count how many archs user specified in ${AMDGPU_TARGETS} + else + local NARCH=7 # The default number of AMDGPU_TARGETS for rocFFT-4.3.0. May change in the future. + fi + echo "$(($(makeopts_jobs)*${NARCH}*25+2200))M" # A linear function estimating how much memory required + fi +} + +pkg_pretend() { + return # leave the disk space check to pkg_setup phase +} + +pkg_setup() { + export CHECKREQS_MEMORY=$(required_mem) + check-reqs_pkg_setup + python_setup +} + +src_prepare() { + sed -e "s/PREFIX rocfft//" \ + -e "/rocm_install_symlink_subdir/d" \ + -e "/<INSTALL_INTERFACE/s,include,include/rocFFT," \ + -i library/src/CMakeLists.txt || die + + sed -e "/rocm_install_symlink_subdir/d" \ + -e "$!N;s:PREFIX\n[ ]*rocfft:# PREFIX rocfft\n:;P;D" \ + -i library/src/device/CMakeLists.txt || die + + if use perfscripts; then + pushd scripts/perf || die + sed -e "/\/opt\/rocm/d" -e "/rocmversion/s,rocm_info.strip(),\"${PV}\"," -i perflib/specs.py || dir + sed -e "/^top/,+1d" -i rocfft-perf suites.py || die + sed -e "s,perflib,${PN}_perflib,g" -i rocfft-perf suites.py perflib/*.py || die + sed -e "/^top = /s,__file__).*$,\"${EPREFIX}/usr/share/${PN}-perflib\")," -i perflib/pdf.py perflib/generators.py || die + popd + fi + + cmake_src_prepare +} + +src_configure() { + addpredict /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=On + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -Wno-dev + -DCMAKE_INSTALL_INCLUDEDIR="include/rocFFT/" + -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) + -DBUILD_CLIENTS_SELFTEST=$(usex test ON OFF) + -DPYTHON3_EXE=${EPYTHON} + -DBUILD_CLIENTS_RIDER=$(usex benchmark ON OFF) + ) + + CXX=hipcc cmake_src_configure +} + +src_test() { + check_amdgpu + cd "${BUILD_DIR}/clients/staging" || die + export LD_LIBRARY_PATH=${BUILD_DIR}/library/src/:${BUILD_DIR}/library/src/device + edob ./${PN,,}-test + edob ./${PN,,}-selftest +} + +src_install() { + cmake_src_install + + if use benchmark; then + cd "${BUILD_DIR}"/clients/staging || die + dobin *rider + fi + + if use perfscripts; then + cd "${S}"/scripts/perf || die + python_foreach_impl python_doexe rocfft-perf + python_moduleinto ${PN}_perflib + python_foreach_impl python_domodule perflib/*.py + insinto /usr/share/${PN}-perflib + doins *.asy suites.py + fi +} diff --git a/sci-libs/rocPRIM/Manifest b/sci-libs/rocPRIM/Manifest index 0a8e55bd3d35..66bb64c1ac01 100644 --- a/sci-libs/rocPRIM/Manifest +++ b/sci-libs/rocPRIM/Manifest @@ -1,7 +1,9 @@ DIST rocPRIM-4.0.0.tar.gz 285576 BLAKE2B 44f3542068dee48c0f2bb475f4d3fd74592fe27f4ca00a7b754014deaaa7187c4363d4b2e7fe13ff771b48d2885b848b9632ef71ce85e80e0946e4e5f13495d8 SHA512 c37fce4f16788d82379459af69b9f47f2bccb3b0e655e7314a23936cc99a474afb0092f240bd950341f1b02ce93d03abce0df7ce62ffcb5d577171ce870dd1d2 DIST rocPRIM-4.3.0.tar.gz 290071 BLAKE2B f69ada9859ef9238d4f8c50bc2b10d131c986dbd8982cc0c7f8614cd51746080aba3b3e7b0ef3e1d5006c179a823f4fcb8ce03cc0a4c88fad3cb46947c7b7fb6 SHA512 9925f832637d19360bf1624dd7a6ef931fb740ee725e35c3159a09a3c569af6f61e3337124c8e0561e60c8595d0d533a4402b91345056ff8d276c6e1dd491036 DIST rocPRIM-5.0.2.tar.gz 364102 BLAKE2B 4e56f37c8ed02a4c4dadfab25e1e840c85c90b6f656858ad15dfa0f8de38b8f130d49a49461dfa09d3f07389e57b2a9cdefe5958b6faa80a639f98d276ca3e66 SHA512 d4d14203d721f7f62f35b2af91c261366f150a24fc21dc5a508743ee5a6246a6a3ad437db03f3ddaad5799cc2ba6d7b8d1e37a8e038eb4156d7962313e36f520 +DIST rocPRIM-5.1.3.tar.gz 374510 BLAKE2B ab6960e7bd2159ac7a0d72ba6d594684f8d47028eca0940eabd35b346ac3d432a734ec575ee71341f339a9d0dead10dfafe81fb651a3b7da681aa900a5132d0e SHA512 54e14f2b40795153b862a64c9b3d336f35feccfda725daad75fae356b0147c577735884b65218c26c370ebec710af0f84aeef3103067a50db077cf9e24d2b64a EBUILD rocPRIM-4.0.0-r1.ebuild 1264 BLAKE2B eb3c16d117287c9a7c13b761b10af63e79b6f83d079f469319878c033bf690fed40ce0e73d29d06c2511fbc6e9a7cb87452d9019bb50e55a3a24b5b94dbe323f SHA512 69f4fb57bb026e85eebae3655a7f3f7f0ebc0155e6e503df93043cdceec8b1d5ec3a4bba4e217ea64def8be19314ddd7b4352ee6d4c8a003f9c447d25db3163a EBUILD rocPRIM-4.3.0-r2.ebuild 2044 BLAKE2B fccd3a591b642e211f209d67bd3713feacf99f362ae9ae77de6b0976c5e31bddf0073b4e2973ef6482a97118ea488fd8866d17fc82c4ea0abe1d599c6daa8c64 SHA512 f5b24193b281e60da19eba8d29dafede7dfa18e2a02606cfa0800a04fbe8a6d5ecd5b4b2f619d677e84e4e302b9a3a0e3a3f38d02ef59777461f6585c0a53ad3 EBUILD rocPRIM-5.0.2.ebuild 2059 BLAKE2B 171352aa4fb5897ce6624d8812357d9bb1a929e4062ecb8da46e6bad0427ab9c0fe36978d7ca6b2e2c205d0c34e5ecc25988d8fcbee8574a758f398b4c6c78aa SHA512 785d96ff01213edcc08674a610dcf4cf799c80badb2345bc63c2bc7cbff0e6aa639f71466caf8213c0b2f014adeb91e92881c26e18b408a559e59a08b3f6bb3e +EBUILD rocPRIM-5.1.3.ebuild 2010 BLAKE2B 218a066418881203dbeb62f807710b03d65280ec8248a6c695b83a166adec72164d86e58e678275f4660c3623c31fd825886ba732452cea580eeee19b2200557 SHA512 74016423cd91a7b7ea67f3086d1170cddd6d8e8b51ad3fb7d9da0ebcc88adb3076347b25d1e5e09ca59a6a61c3e2a4e4eaee541705050de3b553d6cc4a030bc6 MISC metadata.xml 698 BLAKE2B 41839a7a92ff73302c0f0dd8be65cd33882a71cdc0dc481a78198e148597c6345bac8870181d73097cbdc55cf65cc5b45de3ab43a9bf851d2312340bfa63a36e SHA512 379960d8a0d1375f37e27fa7f6ec9dc4d0b05bbfb2bd0f99e224abdd72d36c3a979e59c9551469d686e14770317138f7b9c3ce4b5ed8116f04b5bd0be6ea976e diff --git a/sci-libs/rocPRIM/rocPRIM-5.1.3.ebuild b/sci-libs/rocPRIM/rocPRIM-5.1.3.ebuild new file mode 100644 index 000000000000..c6fc2d52e88e --- /dev/null +++ b/sci-libs/rocPRIM/rocPRIM-5.1.3.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} +inherit cmake rocm + +DESCRIPTION="HIP parallel primitives for developing performant GPU-accelerated code on ROCm" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocPRIM" +SRC_URI="https://github.com/ROCmSoftwarePlatform/rocPRIM/archive/rocm-${PV}.tar.gz -> rocPRIM-${PV}.tar.gz" + +LICENSE="MIT" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" +IUSE="benchmark test" +REQUIRED_USE="${ROCM_REQUIRED_USE}" + +RDEPEND="dev-util/hip + benchmark? ( dev-cpp/benchmark ) + test? ( dev-cpp/gtest )" +BDEPEND="dev-util/rocm-cmake + >=dev-util/cmake-3.22" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/rocPRIM-rocm-${PV}" + +RESTRICT="!test? ( test )" + +src_prepare() { + # "hcc" is depcreated, new platform ist "rocclr" + sed -e "/HIP_PLATFORM STREQUAL/s,hcc,rocclr," -i cmake/VerifyCompiler.cmake || die + + # Install according to FHS + sed -e "/PREFIX rocprim/d" \ + -e "/INSTALL_INTERFACE/s,rocprim/include,include/rocprim," \ + -e "/DESTINATION/s,rocprim/include,include," \ + -e "/rocm_install_symlink_subdir(rocprim)/d" \ + -i rocprim/CMakeLists.txt || die + + # disable downloading googletest and googlebenchmark + sed -r -e '/Downloading/{:a;N;/\n *\)$/!ba; d}' -i cmake/Dependencies.cmake || die + + # remove GIT dependency + sed -r -e '/find_package\(Git/{:a;N;/\nendif/!ba; d}' -i cmake/Dependencies.cmake || die + + # install benchmark files + if use benchmark; then + sed -e "/get_filename_component/s,\${BENCHMARK_SOURCE},${PN}_\${BENCHMARK_SOURCE}," \ + -e "/add_executable/a\ install(TARGETS \${BENCHMARK_TARGET})" -i benchmark/CMakeLists.txt || die + fi + + eapply_user + cmake_src_prepare +} + +src_configure() { + addpredict /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DSKIP_RPATH=On + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DBUILD_TEST=$(usex test ON OFF) + -DBUILD_BENCHMARK=$(usex benchmark ON OFF) + ) + + CXX=hipcc cmake_src_configure +} + +src_test() { + check_amdgpu + MAKEOPTS="-j1" cmake_src_test +} diff --git a/sci-libs/rocRAND/Manifest b/sci-libs/rocRAND/Manifest index f218c1c8dd79..ae595c01d584 100644 --- a/sci-libs/rocRAND/Manifest +++ b/sci-libs/rocRAND/Manifest @@ -1,7 +1,10 @@ +DIST hipRAND-de941a7eb9ede2a862d719cd3ca23234a3692d07.tar.gz 80820 BLAKE2B f2894187455cf1da70c486e9efc336a01dc53589c56afe994858b2344c1e74e8d35260f70ad9cd80c5da1103dd9e98da6f5f2bf8e1ddf97023effc8a434a76ce SHA512 cdc70799ddca456c37c2a65875b98acff74800aa2b4f28d77b27c38c32428dd5edb2837bf88bfb6fcc32bdae7f2b27f1b547831bad98101b04959b7ba6b74a85 DIST rocRAND-4.0.0.tar.gz 3105585 BLAKE2B 0466d88c286290a9cd179fac61209051f7db5323457ccad9c5f0b579439662e1fe2b8951f85101c7c31bd058bc1448e839a19dc9a3a2d4ca42eb4e0b2baf4eb4 SHA512 c02bc32a9cf7660739ecf7ef99262fb14efa2c76afb3476105eedc4264dec987351ebd461c13c9e0aef9e640b42960b2a63295479664b83924cf0d5c34a157e8 DIST rocRAND-4.3.0.tar.gz 3107367 BLAKE2B 23cfac271c1cd4e4edcfd315aa775d4d62e6a50ffa3b9a3372d4ae427a02def52486e88b3f4f89daaa539f2653cf76c8d44afec70d8d916268bc9f27534bda4c SHA512 3eefeb55014a8ee681e1cee73e0e092bd29a81767e772e712f8f871e94380a772a433e93a59276b0cd5a364fc4e482186771809d67ebdab24b2e3020173f5e18 DIST rocRAND-5.0.2.tar.gz 11765778 BLAKE2B f93c3530fba2b416c5ef3d227ebe65f3ee36607e6b4e1d0584c410768b9d71f86c40468bfad0935afb8ca13c7c87b20ee23f1ea89bdedcb6b3149fd932cbdbe6 SHA512 c19beb0eef8dcf4e090e53cb544f21adb61f8c9cb463c74da1c9767b1d75539bb3e296e7b8a70dee517817d181abd8c713e22770a1a4f66363150a879cbb3e48 +DIST rocRAND-5.1.3.tar.gz 11729425 BLAKE2B f61aaedb7b72ceba3868a2069c93db1e2cd88a7a0188a9d5a33f520af3b42235c0dca62495460fd5e7abbca5fe7acc01acfdc90e53ae9a6e45128df5da472f49 SHA512 12859e52b79e40fcd1fb97d0915c191bbbc24e31e00aac4dbeecb625f9978a00ece3d7a42d0f9d37516031c1fbeb66e14dcd476ea83fe32fb13e0dd5c3964a28 EBUILD rocRAND-4.0.0-r1.ebuild 1063 BLAKE2B 69823e3904b62ed811a7ea68c28b95c09e1059134e17fd62f006352e5870d2e3e9e111fbf8a1647cba517135ac46dcb829cabd98c91344bbfc1e38d7b996420a SHA512 06b4732ae433bc0996bd07fda884c7a302a4f33f92bde4b0c73eb684c8d793c3c9a0252e9961874e0fb4ab456ef584da7c47a98651fb704adf72f02e202b8c63 EBUILD rocRAND-4.3.0-r1.ebuild 1717 BLAKE2B 4f62a363f30aab00ad433c7b9283119b7d8a26c462560902cc082a83a3f9d567b961faa98e4d52ad4fe70aafbf382e5d7cc7099aeb344e0c00b42e68fef7f328 SHA512 1af77ddb6a6a9e4c654c135ebba11f14a4ff33d556f2bce7a244a6b9eb0ceedae7daf39c3cb472d114d5e954074e0b3428822c5b699786ff8c121d0efa8a9e22 EBUILD rocRAND-5.0.2.ebuild 1671 BLAKE2B d807b36b9c2bc47271e83292b9fddc25ff7f92c56e320ae6b0c7852b2554c6a2d09e41142d183d103e09aa962ef3a5d6ee845f88bcf83e07bfd29b681c79c646 SHA512 8f523e9494c5b4f98462cb70bcbe9d8270fbb96fe0033ac5c842236893274ce272610820aeb85aa5cee5d18186a7d4d2ee0333f00f0289aaacbb76d3987a1ba4 +EBUILD rocRAND-5.1.3.ebuild 1943 BLAKE2B 35e25904fea875e8e940c35679ec3fae6f4d1eb195de7a00674d3ca961331855d1170734c5b9bcf5b4a614487a4338d772c4954d0b8aa6f3b06ff715bdf02910 SHA512 1be4d70c30d9f6f575f755a5a94b4ecdc553d38abaad04830fc55f23b5885feb2568e37e8ab2be3b964f5159f98b8fda2115a5818c7865c958e5d4706359759c MISC metadata.xml 698 BLAKE2B fd85075e1414d7756cb16ed17f79cfc8302db5319df3a0862d7ce9006277c33a392e1a37aa7f2b2bcb80fbae4589240dd43751eebdeb5688a90a868299c3ecad SHA512 645a284a2c3b0f95df57110a04d5f131f28e3d673ba12eb5b3f3d5e7ee30e3099a022187b86ed458d5b4d6bed1451bd3dfe620debe0e8c480aee35f57bc878eb diff --git a/sci-libs/rocRAND/rocRAND-5.1.3.ebuild b/sci-libs/rocRAND/rocRAND-5.1.3.ebuild new file mode 100644 index 000000000000..26ca0c5042b1 --- /dev/null +++ b/sci-libs/rocRAND/rocRAND-5.1.3.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} + +inherit cmake rocm + +DESCRIPTION="Generate pseudo-random and quasi-random numbers" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocRAND" +HIPRAND_COMMIT_HASH=de941a7eb9ede2a862d719cd3ca23234a3692d07 +SRC_URI="https://github.com/ROCmSoftwarePlatform/${PN}/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz +https://github.com/ROCmSoftwarePlatform/hipRAND/archive/${HIPRAND_COMMIT_HASH}.tar.gz -> hipRAND-${HIPRAND_COMMIT_HASH}.tar.gz" + +LICENSE="MIT" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" +IUSE="benchmark test" +REQUIRED_USE="${ROCM_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND="dev-util/hip" +DEPEND="${RDEPEND} +dev-util/rocm-cmake +test? ( dev-cpp/gtest )" +BDEPEND="dev-util/rocm-cmake +>=dev-util/cmake-3.22" + +S="${WORKDIR}/rocRAND-rocm-${PV}" + +src_prepare() { + rmdir hipRAND || die + mv -v ../hipRAND-${HIPRAND_COMMIT_HASH} hipRAND || die + # change installed include and lib dir, and avoid symlink overwrite the installed headers + # avoid setting RPATH + sed -r -e "s:(hip|roc)rand/lib:\${CMAKE_INSTALL_LIBDIR}:" \ + -e "s:(hip|roc)rand/include:include/\1rand:" \ + -e '/\$\{INSTALL_SYMLINK_COMMAND\}/d' \ + -e "/INSTALL_RPATH/d" -i library/CMakeLists.txt || die + + # remove GIT dependency + sed -e "/find_package(Git/,+4d" -i cmake/Dependencies.cmake || die + + eapply_user + cmake_src_prepare +} + +src_configure() { + addpredict /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=On + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DBUILD_HIPRAND=ON + -DBUILD_TEST=$(usex test ON OFF) + -DBUILD_BENCHMARK=$(usex benchmark ON OFF) + ) + + CXX=hipcc cmake_src_configure +} + +src_test() { + check_amdgpu + export LD_LIBRARY_PATH="${BUILD_DIR}/library" + MAKEOPTS="-j1" cmake_src_test +} + +src_install() { + cmake_src_install + + if use benchmark; then + cd "${BUILD_DIR}"/benchmark + dobin benchmark_rocrand_* + fi +} diff --git a/sci-libs/rocSOLVER/Manifest b/sci-libs/rocSOLVER/Manifest index 63773db0c999..97a7b82843f2 100644 --- a/sci-libs/rocSOLVER/Manifest +++ b/sci-libs/rocSOLVER/Manifest @@ -1,8 +1,11 @@ AUX rocSOLVER-4.2.0-add-stdint-header.patch 475 BLAKE2B 268a1813d4e26dbaaa2360d0a187ce2a1448da075ae5f98a4a829c979411ab7e0c06f150ddcb445c9b295268a1e9f1770adbe7e68a1c3f84edde3c3477a57610 SHA512 ede56f9579e655ddd098ca9006612537f8ed61dc585274afe6b2b0bdee875431b62e0c6da6bc01e2cabeeb5244a91bb1e00b442bb549c075a286eefd8d9edc09 AUX rocSOLVER-4.3.0-link-blas.patch 604 BLAKE2B 863c1807d281e219b429a58c9e9e582a346e72be6004fb3f5a818479ae02b4efd896873f7c689084eefc50c331d8734c5dbf2dcb9e9756a54ce092e5ace22da5 SHA512 413692c2a7e40cb3bb169eef078fc4caa0ebaba760f535fb27afafcc49713fae26c9ca5c82793c54d4e07ccafe43a0d7d65b7e76d0207bdd20a5581bd71216d9 AUX rocSOLVER-5.0.2-libfmt8.patch 7493 BLAKE2B 0327f78dd94f0102a5c4aabf13cab2ec6adaec3efee82acdb24d223b56a58bece34b505b9fdb2964ffa6f3f574730c2e74110e12e198fe26bc682ea294038749 SHA512 124dd445e188475777e3dee017f7380675594717b1e58458397780dc5c32ee8221935234954554510bd169af10a3bdb4fef0674bf93030081c5c12c1f3061a13 +AUX rocSOLVER-5.1.3-libfmt8.patch 7493 BLAKE2B 0327f78dd94f0102a5c4aabf13cab2ec6adaec3efee82acdb24d223b56a58bece34b505b9fdb2964ffa6f3f574730c2e74110e12e198fe26bc682ea294038749 SHA512 124dd445e188475777e3dee017f7380675594717b1e58458397780dc5c32ee8221935234954554510bd169af10a3bdb4fef0674bf93030081c5c12c1f3061a13 DIST rocSOLVER-4.3.0.tar.gz 454249 BLAKE2B 727ae416d85c5a19983257d2a0b01836013c1d69cddf3334b2c1b808b96b401db938b46b7ecf1e7faf26ff555374d1d3abed74abbe7be47110a36b44019469ee SHA512 2910e1cfad4d17a2877e2ae572d80179b84903c632652571c01bd12856c92c22e073ea1005ed9aac04244b4c502a7e0c18d96445e57658ae8eb5b320bada549b DIST rocSOLVER-5.0.2.tar.gz 530085 BLAKE2B f3c3594b5ee2703424da289cc0c520a589da28f9d3f4c04d81cace35a4f77f3ca79ff9a1e7139d83d7a2ae1907083aded99b5d9fbe216d81b225dc1b9fc4105b SHA512 ab349044aba0c1b6b7d0019d15f2bdf068805d2da73790f424ae90835f2d7dd4137d0a641d8edbf98fcb190989f0d0fa57dfc448a376a19e21fd62940046b3a1 +DIST rocSOLVER-5.1.3.tar.gz 545627 BLAKE2B 2cca24a1310efba7f8c66d1614fb50704221ebc8aa50d6aba11083baf9a7427575642fd28218ce80f8a7b83d3406348c2dd18373fb32e533509d01d37cf06927 SHA512 38e7a4ed6b67e83960ad3416d1008f82f895d19dc85427cd6f9c76f00b1ce18f78a4dd73d1ab53ffe81588890cd5545315029e903e2e09b85d6cfb854d405753 EBUILD rocSOLVER-4.3.0-r1.ebuild 1924 BLAKE2B 4d9f6af3842357336ef725b2185d329352a6f2a27bf6743b4389d21f7fc3271e41bd2f557a511004352218b2976731198ee28724a236277a64026bd44070d29a SHA512 e3ed8a7da1454a3f0f2822bbd921521a37401c84adf337f8b1379bf0fa7dc75a3947410c040ac0fcbe16684aec67bf9a5c4e3edd059e85e6e431cf99fb6e66b8 EBUILD rocSOLVER-5.0.2.ebuild 1951 BLAKE2B 43fc670d8de93b8d5ee43d5ab4fed4d6744c9ff331f1a0fca4832ce4cb9505c96dd5d4b2450a441d9328876d383fb14ceb20acfaab6f728365f2230234d073c5 SHA512 65ef60715df10da01845bf2adaaf749466d23b391cbff93dadaa9f0963fc545defc45cb0455ba3ac79a270748795a6f650cd885c4ec37acca49542fb394c9ebd +EBUILD rocSOLVER-5.1.3.ebuild 1943 BLAKE2B 4f455f8a6629bc42716d1d825c7471e3f358db78d83b1d04d6dddd93bf85c804720fb01ea34ba240e5a86c7c4b062d59911ff366b1653781c9cef20d8ed0f312 SHA512 cb7d90943ffa8a02a86e854063131d759c014aae075ec3638f634e6bc0c0c1451fbd6bb347f1c1136d025a746ad88d9ceb8321454cff03e427ea1a7341fb5097 MISC metadata.xml 662 BLAKE2B 6dc116ac630fbd30c5f6c18d716bcd12bc994bfa0b2aea4eacf65e31507c24bb1eeed55942ee8e0b5bed8e361d28950d433c13136771673308dbf96906e270c9 SHA512 cc5cc6401303169dd423234615b748b38a58191b058befe0f40e8b8996fe50b3554b99a14f2f63c3596227aab43558f23c64ddce88172157366cc78d4aeefb56 diff --git a/sci-libs/rocSOLVER/files/rocSOLVER-5.1.3-libfmt8.patch b/sci-libs/rocSOLVER/files/rocSOLVER-5.1.3-libfmt8.patch new file mode 100644 index 000000000000..3f2c0553689b --- /dev/null +++ b/sci-libs/rocSOLVER/files/rocSOLVER-5.1.3-libfmt8.patch @@ -0,0 +1,173 @@ +Backported from upstream to fix dev-cpp/libfmt-8 compatibility + +remove changes of CHANGELOG.md from original git commit + +From 2bbfb8976f6e4d667499c77e41a6433850063e88 Mon Sep 17 00:00:00 2001 +From: Cory Bloor <Cordell.Bloor@amd.com> +Date: Tue, 8 Feb 2022 23:53:57 -0700 +Subject: [PATCH] Fix compatibility with fmt v8.1 (#371) + +* Make rocsolver_logvalue fmt specializations const + +This allows for compile-time format string processing in fmt v8.0. + +* Fix compatibility with fmt v7.1 + +* Update CHANGELOG.md +--- + CHANGELOG.md | 2 ++ + library/src/include/rocsolver_logvalue.hpp | 38 +++++++++++++--------- + 2 files changed, 25 insertions(+), 15 deletions(-) + +diff --git a/library/src/include/rocsolver_logvalue.hpp b/library/src/include/rocsolver_logvalue.hpp +index 199f8d57d..9b3791031 100644 +--- a/library/src/include/rocsolver_logvalue.hpp ++++ b/library/src/include/rocsolver_logvalue.hpp +@@ -1,5 +1,5 @@ + /* ************************************************************************ +- * Copyright (c) 2021 Advanced Micro Devices, Inc. ++ * Copyright (c) 2021-2022 Advanced Micro Devices, Inc. + * ************************************************************************ */ + + #pragma once +@@ -8,6 +8,14 @@ + + #include "rocsolver_datatype2string.hpp" + ++/* The format function for user-defined types cannot be const before fmt v8.0 ++ but must be const in fmt v8.1 if the type is used in a tuple. */ ++#if FMT_VERSION < 80000 ++#define ROCSOLVER_FMT_CONST ++#else ++#define ROCSOLVER_FMT_CONST const ++#endif ++ + /*************************************************************************** + * Wrapper for types passed to logger, so we can more easily adjust the + * default way of printing built-in types without doing it globally. (e.g. +@@ -37,7 +45,7 @@ template <typename T> + struct formatter<rocsolver_logvalue<T>> : formatter<T> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<T> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<T> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<T>::format(wrapper.value, ctx); + } +@@ -49,7 +57,7 @@ template <> + struct formatter<rocsolver_logvalue<bool>> : formatter<char> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<bool> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<bool> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<char>::format(wrapper.value ? '1' : '0', ctx); + } +@@ -58,7 +66,7 @@ template <> + struct formatter<rocsolver_logvalue<rocblas_operation>> : formatter<char> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<rocblas_operation> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<rocblas_operation> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<char>::format(rocblas2char_operation(wrapper.value), ctx); + } +@@ -67,7 +75,7 @@ template <> + struct formatter<rocsolver_logvalue<rocblas_fill>> : formatter<char> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<rocblas_fill> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<rocblas_fill> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<char>::format(rocblas2char_fill(wrapper.value), ctx); + } +@@ -76,7 +84,7 @@ template <> + struct formatter<rocsolver_logvalue<rocblas_diagonal>> : formatter<char> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<rocblas_diagonal> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<rocblas_diagonal> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<char>::format(rocblas2char_diagonal(wrapper.value), ctx); + } +@@ -85,7 +93,7 @@ template <> + struct formatter<rocsolver_logvalue<rocblas_side>> : formatter<char> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<rocblas_side> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<rocblas_side> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<char>::format(rocblas2char_side(wrapper.value), ctx); + } +@@ -94,7 +102,7 @@ template <> + struct formatter<rocsolver_logvalue<rocblas_direct>> : formatter<char> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<rocblas_direct> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<rocblas_direct> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<char>::format(rocblas2char_direct(wrapper.value), ctx); + } +@@ -104,7 +112,7 @@ template <> + struct formatter<rocsolver_logvalue<rocblas_storev>> : formatter<char> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<rocblas_storev> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<rocblas_storev> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<char>::format(rocblas2char_storev(wrapper.value), ctx); + } +@@ -113,7 +121,7 @@ template <> + struct formatter<rocsolver_logvalue<rocblas_workmode>> : formatter<char> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<rocblas_workmode> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<rocblas_workmode> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<char>::format(rocblas2char_workmode(wrapper.value), ctx); + } +@@ -122,7 +130,7 @@ template <> + struct formatter<rocsolver_logvalue<rocblas_svect>> : formatter<char> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<rocblas_svect> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<rocblas_svect> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<char>::format(rocblas2char_svect(wrapper.value), ctx); + } +@@ -131,7 +139,7 @@ template <> + struct formatter<rocsolver_logvalue<rocblas_evect>> : formatter<char> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<rocblas_evect> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<rocblas_evect> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<char>::format(rocblas2char_evect(wrapper.value), ctx); + } +@@ -140,7 +148,7 @@ template <> + struct formatter<rocsolver_logvalue<rocblas_eform>> : formatter<char> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<rocblas_eform> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<rocblas_eform> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<char>::format(rocblas2char_eform(wrapper.value), ctx); + } +@@ -149,7 +157,7 @@ template <> + struct formatter<rocsolver_logvalue<rocblas_datatype>> : formatter<string_view> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<rocblas_datatype> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<rocblas_datatype> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<string_view>::format(rocblas2string_datatype(wrapper.value), ctx); + } +@@ -158,7 +166,7 @@ template <> + struct formatter<rocsolver_logvalue<rocblas_initialization>> : formatter<string_view> + { + template <typename FormatCtx> +- auto format(rocsolver_logvalue<rocblas_initialization> wrapper, FormatCtx& ctx) ++ auto format(rocsolver_logvalue<rocblas_initialization> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST + { + return formatter<string_view>::format(rocblas2string_initialization(wrapper.value), ctx); + } diff --git a/sci-libs/rocSOLVER/rocSOLVER-5.1.3.ebuild b/sci-libs/rocSOLVER/rocSOLVER-5.1.3.ebuild new file mode 100644 index 000000000000..77092f820467 --- /dev/null +++ b/sci-libs/rocSOLVER/rocSOLVER-5.1.3.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} + +inherit cmake edo rocm + +DESCRIPTION="Implementation of a subset of LAPACK functionality on the ROCm platform" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocSOLVER" +SRC_URI="https://github.com/ROCmSoftwarePlatform/rocSOLVER/archive/rocm-${PV}.tar.gz -> rocSOLVER-${PV}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" + +IUSE="test benchmark" +REQUIRED_USE="${ROCM_REQUIRED_USE}" + +RDEPEND="dev-util/hip + sci-libs/rocBLAS:${SLOT}[${ROCM_USEDEP}] + =dev-libs/libfmt-8* + benchmark? ( virtual/blas )" +DEPEND="${RDEPEND}" +BDEPEND="test? ( dev-cpp/gtest + >=dev-util/cmake-3.22 + virtual/blas )" + +PATCHES=( + "${FILESDIR}/${PN}-4.2.0-add-stdint-header.patch" + "${FILESDIR}/${P}-libfmt8.patch" +) + +RESTRICT="!test? ( test )" + +S=${WORKDIR}/${PN}-rocm-${PV} + +src_prepare() { + sed -e "s: PREFIX rocsolver:# PREFIX rocsolver:" -i library/src/CMakeLists.txt + sed -e "s:\$<INSTALL_INTERFACE\:include>:\$<INSTALL_INTERFACE\:include/rocsolver>:" -i library/src/CMakeLists.txt + sed -e "s:rocm_install_symlink_subdir( rocsolver ):#rocm_install_symlink_subdir( rocsolver ):" -i library/src/CMakeLists.txt + + cmake_src_prepare +} + +src_configure() { + # avoid sandbox violation + addpredict /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=On + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -Wno-dev + -DCMAKE_INSTALL_INCLUDEDIR="${EPREFIX}/usr/include/rocsolver" + -DBUILD_CLIENTS_SAMPLES=NO + -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) + -DBUILD_CLIENTS_BENCHMARKS=$(usex benchmark ON OFF) + ) + + CXX=hipcc cmake_src_configure +} + +src_test() { + check_amdgpu + cd "${BUILD_DIR}"/clients/staging || die + LD_LIBRARY_PATH="${BUILD_DIR}/library/src" edob ./rocsolver-test +} + +src_install() { + cmake_src_install + + if use benchmark; then + cd "${BUILD_DIR}" || die + dobin clients/staging/rocsolver-bench + fi +} diff --git a/sci-libs/rocSPARSE/Manifest b/sci-libs/rocSPARSE/Manifest index 760a1305cc4a..48a0abbe820e 100644 --- a/sci-libs/rocSPARSE/Manifest +++ b/sci-libs/rocSPARSE/Manifest @@ -2,9 +2,11 @@ AUX rocSPARSE-4.3.0-remove-matrices-unpacking.patch 933 BLAKE2B 03e9ded8e313352d AUX rocSPARSE-5.0.2-enable-gfx1031.patch 645 BLAKE2B 4e20882057d1f8687f47831cc8945b787606b6f6d1d676ba5e5e12d8ff61e1c22711da57b50d988d44b2962c6001d270ebe2ffcb751901a6eb64635e553a7cd9 SHA512 24fbfed3cafdf00c7e13d25136427b30c573191e32830431f7185fd9a2f537c110f83f4e6f8603f3c17381d316f13c3b626eeaa9331f9035e7bc9b34d0c7c70e AUX rocSPARSE-5.0.2-remove-incorrect-assert.patch 1658 BLAKE2B 26aa66d7d61657eb591f7b345b64211f3cfb47f0a1b656716b32e299799bb8172483b4898878e532f7c6ca3f99bcb4a8789a1b6a913bc40dfebdc144613b0f27 SHA512 bfae11079c621b3372678ade78bea979b751777a48060b5ef26b3567fb89b1cf8591c998e199be649b03157662ef9b4889ca79498b16cf0bf6fbd1b9a532e485 AUX rocSPARSE-5.0.2-remove-matrices-unpacking.patch 1205 BLAKE2B 0d903453692025f6f239c8b5d2f11dd6f9dfe5c09a63395898920326e0dbd6aeff37fdf2dde8e89ea1cbdc60252ab87b7ef020b56a726853d2f7261addcf00c8 SHA512 52ec3913f89f7886d6b8fb9ef54ca313c64e4c9d374507a0d89a8c7cf846e8f8f6b8a4ad266b23015869a79d2eaadb75c5540ca53e40163cb0fbdc2b1819e645 +AUX rocSPARSE-5.1.3-add-stdexcept-header.patch 356 BLAKE2B c6faa2e3744e8cf050a8e34f5db663af6d73caadda763aeb3cac0341899d745bf50fc8a3c81c1175137c7ad6722d94d88b7f11b25c38cee139a39baeeff84e91 SHA512 4935dca0188dd8451f6ec62c2060ffd9ec9fe1e816a21a5738d50a47bea2cd393c40f1b45866d118094e6005a219b98dd55de007e626397ced0e6fb1d5246940 DIST rocSPARSE-4.0.0.tar.gz 587761 BLAKE2B 25f9f0183c06b574505fe6e9011b32ea4fbe48c0a1883b8991baf45b8a2238312f352e614c0069531c986e548453b6e7b7a77f883dffea82ed41df488964b55d SHA512 4a4acf24a789ea58b53a8d06ea528a6aed8eabac21a7a3cd73011e9b31d03dceb488cc72f29c5513205f2b538d24e9dbaccda1a932bcc466cd04a65606a77b3b DIST rocSPARSE-4.3.0.tar.gz 809183 BLAKE2B 06a83d98572927f0f2c65f4f36194394b66a02a5ce9d3e21da04c53e9ad97809daffe02a35691aa52466f7dfb4d4a8c645b87e1e4da579de7f91323df3a41d59 SHA512 e3ee5a15d36c3002ee60aabd94c7f47b0cb9f0b5a33cefa9061df9f04b1fcc3c1503e4f01e2f36c07477179c6753827b505e9b512e8b5bfca00f76e3efd99c1d DIST rocSPARSE-5.0.2.tar.gz 855762 BLAKE2B dc1e84157f1eecd6bedd6620147e4f88341b94cb0f1507a6264af40c891541ef3e81a8a429b3160dac1606a855a566abbff98e458f581f5f60de31d5751682ef SHA512 4f985c0784246616dd1b3e4fd669033296e45b1f8faa1ab25143e2f085b9bf6556a495de23e9463c2ae45d6038c1cff01d18930c9762d53975e15d4d2d5d4d0a +DIST rocSPARSE-5.1.3.tar.gz 943788 BLAKE2B f9d5fc34d74bc10f3e5bd0a18da41fe9b35a2f01aca3a74979960958fd0e7648fca96493ba9d767119a452dd75ede0733959d0d4bae84615b7a1ff212c8412a3 SHA512 735aa210bbdc3f31b0ed4defe0288606e255788e877f24ed25506d780552a779305fe5bfd692a3e720e9b286073894300fcbcf161d41e1b23abf2110a9536bf3 DIST rocSPARSE_ASIC_320k.tar.gz 11301444 BLAKE2B a00cc4a3ededab3fb56339319e34e936645ddce2dee3c630153b37e337384c207b0a2829227fb7f4c2db1fe33383e97410ab7ad459d391c025f5410843d51cf2 SHA512 1db3af391c30a371c1ac0087436e266721474273a39d5b2b6d56408d950dcbbee004750e4dce4e3dbc4cb512f38f6d945676d7f29b62c52fd5a7fed0fe789e03 DIST rocSPARSE_Chebyshev4.tar.gz 50165660 BLAKE2B f1a95554c8f38937f501488fabfd406b773eb980d7463cadac0de162529ac2f834c655cadd2b65f4c42a8487bc2d67c749601ae33bd789051f9e4d1e157196a0 SHA512 fdec4947a4af923d28b4be8d23690fd6d356c58f8344a5dcdd2e3fa61769d83e47a84d65316b527e6e82d9f988de2675a852367d406e44b44d784137a90b95c0 DIST rocSPARSE_Chevron2.tar.gz 3210636 BLAKE2B 919bc19931cbcb32c09e6b623c9d3890400895dfd65e83845d351a8e3dd8b30ef43374c3c0ca3ee9708c81b5fb8886f1a4adbea6086495f08f9498f19a2279d5 SHA512 22b71deddec4f1af5b239d4065089230cf70e521102803a77ab3f16b34a0d69534817e54d81dfa7f8d1f299932c0f0424237baeb3d8289bcfffa4b902b00e256 @@ -32,4 +34,5 @@ DIST rocSPARSE_webbase-1M.tar.gz 11360460 BLAKE2B 01b1d06adb5fb32fa402ed888d25a7 EBUILD rocSPARSE-4.0.0-r1.ebuild 1166 BLAKE2B fc45fdaaf8d5f20afcc0d477eac01d30100a3ac3355ddae786ee934f46ef55b4f6ac3b284875fc905f75452cbfbb655ad4cfb9f916905e1a6091e8b97a14f141 SHA512 221e3aea6c45e7d7a6edc3b96db32ed9d2deb040f1f4cafa9cbb139a146aa7500d4619e6e8db39683fed9c0bc34053dc8ede22525340457c1774f6ea90297a98 EBUILD rocSPARSE-4.3.0-r3.ebuild 4916 BLAKE2B 350c192f3fa3456d45564eb6dc48ae405df21221fd4d373ba0fe15abebb7ffbbefa3a3938f88530b929c87064cfccaecb260b16e773dd9a8bcd50878139a6d24 SHA512 913d98214489545a4624e9ad774b33cb954ee1cbe5bf14d4910de00695f340a34dd57ecb6e70ba3a6e7539775af90734033b7518f1bc58c3d4e6de5697251277 EBUILD rocSPARSE-5.0.2.ebuild 5060 BLAKE2B 5801d8816ecf962150ee8a11512f7d90001f9c271cb8eaa0f0ce44f03430767628105e66ab85426904c3f202021b63820ecc4999e55f91265bb8b7efec6f0308 SHA512 2f60b9d2643063f6b767a6ad3d48a7018ab66c1fa62de7e67264a2731638a5eb6e23df26b39ffd6cfb40b9e229613e68e8fd268903050c8ff966a04c142413fd +EBUILD rocSPARSE-5.1.3.ebuild 4848 BLAKE2B a33fa68ad1e2a8bb0b6dcbca0a5c7b0c83e5b0e9a8d7291ad97115d11c5c5afa073bc8ac8c484f02f551cb3f74ce0d6a0ff5001fc2cba76b44ec995136ac203e SHA512 66db4fc14fefc372f9cae3805c1a5651215c703e04c4a97c93c5b2facbcdb657d1bc3d3a2e0b195d10fb17d1f2ae262535f71351502b8d1cbc581679a1846c2b MISC metadata.xml 695 BLAKE2B db1c67ff216cd9c9a972c9b388f85f6e762e0a7bddffca1336219ce6ebe39f6a841da4c8c78084d91f48a5bb6a26ad0047a2a1a60915da5110b3a41977f3b641 SHA512 2f246ec382d78e414a00aedcd7a2c871ccf5b74d25d160a0f7d6012feb51c6c12861b5152cac32d3e46d0d1acea7e8b10f42f4b501abb9d778cd3c886331f59c diff --git a/sci-libs/rocSPARSE/files/rocSPARSE-5.1.3-add-stdexcept-header.patch b/sci-libs/rocSPARSE/files/rocSPARSE-5.1.3-add-stdexcept-header.patch new file mode 100644 index 000000000000..c61c723ef4ad --- /dev/null +++ b/sci-libs/rocSPARSE/files/rocSPARSE-5.1.3-add-stdexcept-header.patch @@ -0,0 +1,12 @@ +This fixes compilation issue with gcc-12 +=================================================================== +--- rocSPARSE-rocm-5.1.3.orig/clients/common/utility.cpp ++++ rocSPARSE-rocm-5.1.3/clients/common/utility.cpp +@@ -29,6 +29,7 @@ + + #include <chrono> + #include <cstdlib> ++#include <stdexcept> + + #ifdef WIN32 + #define strcasecmp(A, B) _stricmp(A, B) diff --git a/sci-libs/rocSPARSE/rocSPARSE-5.1.3.ebuild b/sci-libs/rocSPARSE/rocSPARSE-5.1.3.ebuild new file mode 100644 index 000000000000..0ed300de5755 --- /dev/null +++ b/sci-libs/rocSPARSE/rocSPARSE-5.1.3.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +ROCM_VERSION=${PV} + +inherit cmake edo python-any-r1 toolchain-funcs rocm + +DESCRIPTION="Basic Linear Algebra Subroutines for sparse computation" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocSPARSE" + +SRC_URI="https://github.com/ROCmSoftwarePlatform/rocSPARSE/archive/rocm-${PV}.tar.gz -> rocSPARSE-${PV}.tar.gz +test? ( +https://sparse.tamu.edu/MM/SNAP/amazon0312.tar.gz -> ${PN}_amazon0312.tar.gz +https://sparse.tamu.edu/MM/Muite/Chebyshev4.tar.gz -> ${PN}_Chebyshev4.tar.gz +https://sparse.tamu.edu/MM/FEMLAB/sme3Dc.tar.gz -> ${PN}_sme3Dc.tar.gz +https://sparse.tamu.edu/MM/Williams/webbase-1M.tar.gz -> ${PN}_webbase-1M.tar.gz +https://sparse.tamu.edu/MM/Bova/rma10.tar.gz -> ${PN}_rma10.tar.gz +https://sparse.tamu.edu/MM/JGD_BIBD/bibd_22_8.tar.gz -> ${PN}_bibd_22_8.tar.gz +https://sparse.tamu.edu/MM/Williams/mac_econ_fwd500.tar.gz -> ${PN}_mac_econ_fwd500.tar.gz +https://sparse.tamu.edu/MM/Williams/mc2depi.tar.gz -> ${PN}_mc2depi.tar.gz +https://sparse.tamu.edu/MM/Hamm/scircuit.tar.gz -> ${PN}_scircuit.tar.gz +https://sparse.tamu.edu/MM/Sandia/ASIC_320k.tar.gz -> ${PN}_ASIC_320k.tar.gz +https://sparse.tamu.edu/MM/GHS_psdef/bmwcra_1.tar.gz -> ${PN}_bmwcra_1.tar.gz +https://sparse.tamu.edu/MM/HB/nos1.tar.gz -> ${PN}_nos1.tar.gz +https://sparse.tamu.edu/MM/HB/nos2.tar.gz -> ${PN}_nos2.tar.gz +https://sparse.tamu.edu/MM/HB/nos3.tar.gz -> ${PN}_nos3.tar.gz +https://sparse.tamu.edu/MM/HB/nos4.tar.gz -> ${PN}_nos4.tar.gz +https://sparse.tamu.edu/MM/HB/nos5.tar.gz -> ${PN}_nos5.tar.gz +https://sparse.tamu.edu/MM/HB/nos6.tar.gz -> ${PN}_nos6.tar.gz +https://sparse.tamu.edu/MM/HB/nos7.tar.gz -> ${PN}_nos7.tar.gz +https://sparse.tamu.edu/MM/DNVS/shipsec1.tar.gz -> ${PN}_shipsec1.tar.gz +https://sparse.tamu.edu/MM/Cote/mplate.tar.gz -> ${PN}_mplate.tar.gz +https://sparse.tamu.edu/MM/Bai/qc2534.tar.gz -> ${PN}_qc2534.tar.gz +https://sparse.tamu.edu/MM/Chevron/Chevron2.tar.gz -> ${PN}_Chevron2.tar.gz +https://sparse.tamu.edu/MM/Chevron/Chevron3.tar.gz -> ${PN}_Chevron3.tar.gz +https://sparse.tamu.edu/MM/Chevron/Chevron4.tar.gz -> ${PN}_Chevron4.tar.gz +)" + +LICENSE="MIT" +KEYWORDS="~amd64" +IUSE="benchmark test" +REQUIRED_USE="${ROCM_REQUIRED_USE}" +SLOT="0/$(ver_cut 1-2)" + +RDEPEND="dev-util/hip + sci-libs/rocPRIM:${SLOT}" +DEPEND="${RDEPEND}" +BDEPEND="test? ( + dev-cpp/gtest + >=dev-util/cmake-3.22 + $(python_gen_any_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]') +) +benchmark? ( app-admin/chrpath ) +" + +RESTRICT="!test? ( test )" + +S="${WORKDIR}/rocSPARSE-rocm-${PV}" + +PATCHES=( "${FILESDIR}/${PN}-5.0.2-remove-matrices-unpacking.patch" + "${FILESDIR}/${PN}-5.0.2-enable-gfx1031.patch" + "${FILESDIR}/${PN}-5.0.2-remove-incorrect-assert.patch" ) + +python_check_deps() { + if use test; then + python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" + fi +} + +src_prepare() { + sed -e "s/PREFIX rocsparse//" \ + -e "/<INSTALL_INTERFACE/s,include,include/rocsparse," \ + -e "/rocm_install_symlink_subdir(rocsparse)/d" \ + -e "s:rocsparse/include:include/rocsparse:" \ + -i "${S}/library/CMakeLists.txt" || die + + # remove GIT dependency + sed -e "/find_package(Git/d" -i cmake/Dependencies.cmake || die + + # use python interpreter specifyied by python-any-r1 + sed -e "/COMMAND ..\/common\/rocsparse_gentest.py/s,COMMAND ,COMMAND ${EPYTHON} ," -i clients/tests/CMakeLists.txt || die + + cmake_src_prepare + + # Test need download data from https://sparse.tamu.edu (or other mirror site), check MD5, unpack and convert them into csr format + # This process is handled default by ${S}/cmake/ClientMatrices.cmake, but should be the responsibility of portage. + if use test; then + mkdir -p "${BUILD_DIR}"/clients/matrices + # compile and use the mtx2csr converter. Do not use any optimization flags, because it causes error! + edo $(tc-getCXX) deps/convert.cpp -o deps/convert + find "${WORKDIR}" -maxdepth 2 -regextype egrep -regex ".*/(.*)/\1\.mtx" -print0 | + while IFS= read -r -d '' mtxfile; do + destination=${BUILD_DIR}/clients/matrices/$(basename -s '.mtx' ${mtxfile}).csr + ebegin "Converting ${mtxfile} to ${destination}" + deps/convert ${mtxfile} ${destination} + eend $? + done + fi +} + +src_configure() { + addpredict /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=On + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DBUILD_CLIENTS_SAMPLES=OFF + -DCMAKE_INSTALL_INCLUDEDIR="include/rocsparse" + -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) + -DBUILD_CLIENTS_BENCHMARKS=$(usex benchmark ON OFF) + ) + + CXX=hipcc cmake_src_configure +} + +src_test() { + check_amdgpu + cd "${BUILD_DIR}/clients/staging" || die + LD_LIBRARY_PATH="${BUILD_DIR}/library" edob ./${PN,,}-test +} + +src_install() { + cmake_src_install + + if use benchmark; then + cd "${BUILD_DIR}" || die + dobin clients/staging/rocsparse-bench + fi +} diff --git a/sci-libs/rocThrust/Manifest b/sci-libs/rocThrust/Manifest index 86d0d4bda03a..62b5d7ddac10 100644 --- a/sci-libs/rocThrust/Manifest +++ b/sci-libs/rocThrust/Manifest @@ -3,7 +3,9 @@ AUX rocThrust-4.3.0-deprecate-hcc_detail.patch 492 BLAKE2B cde3fb2210e482f6b76e2 DIST rocThrust-4.0.0.tar.gz 1166346 BLAKE2B 02c89e0c4ab2c888a20b7c956a73012157f2735e6ec76369a1f75fbc17bb3f995d1914106ec58562f28243fbe5f019ac230ac3313b6aacb4d8b868f3ac1f091e SHA512 476aa5706487c5801cc91908806a1a1fcb550171f63e0b2debd9b59b18c7435c484578ec456ccfabc140dd7bca7d9bb432a7ba223946b1fca22e72e7d053af2d DIST rocThrust-4.3.0.tar.gz 1156832 BLAKE2B a462cfaa31883253fabba584ca77622cc5a7234bd9979472a84ec77b91c60f48f1064149b86d624aaedd70262fb65fb6aadb03cc6e00939d4eed6cd11bfc0090 SHA512 8c6aa3aefd59c87cc8278930bf90021867f519c356c86a3c3ebfcdf90887b8631250b6a9a8156f77c0cbf7ddbad7881e5e1b802f1cd1305cc3a2e7d95ef4e6f3 DIST rocThrust-5.0.2.tar.gz 1183550 BLAKE2B 88021266dc9ffcb8f5e803acfe767c52aaa04b2348d0dcb204eb74bdf44ed26eb6d98f8d85324b90fe73228b52a0ad22686b87274c868ef19ec8ded825b58ea9 SHA512 3599b9498db392d480c08873d9e84ff1c05e5417e14e43e56f190fe4490873fec37c944a3c252942d6275a4fa4af85c82d39b62b0fdb5daa82023a2df8a3228f +DIST rocThrust-5.1.3.tar.gz 1186518 BLAKE2B 2defe71247915940917438d4f0d0a811dca7de39e5168248968fa9c165b81d94b0e20f3df9b84db1fbdcd2eb87942dec5d3adbbe1a699eb51eeb4e1b2f0a88d0 SHA512 189c70343a410cf3f3c1589ef24c68a38b5270d8780d15261a124b8250f279a3c3c7afef38e6310d57cb1741b3ee75f0b4ac0bb9dfcf4a4fb0e7e6c0516faf74 EBUILD rocThrust-4.0.0-r1.ebuild 1244 BLAKE2B 4f8019ccf296a915a305a405d3e80d2de348ac7717782671b76306882872a6e356bdbdb63316094ce8ccc8410fced42db56423b4d96f8d690ec6838d3721612e SHA512 40671932493ab5a2a2597a4181d03c666a9272ed881d053ecc8d8285aa8a5b68b9527b4fa0e29b6acff3f31fdfafd9cc060b9e098b16a12a7370eaa37542f5de EBUILD rocThrust-4.3.0-r2.ebuild 1992 BLAKE2B 67a34d8a87ede7599a72217dbcb97541dc498ca1523569b275e3f2673f2ce0236affe9ef33e04c5c37565f0a875222540c9269bea202fb4f58c14b9791f71cad SHA512 b183e41584615b0ee97ee1ec8401f83d3f229abec959e948e50b06b1b5b4449b8af1ed709ab1e1d402f62af1c2dbd42dd0bfaf3c0bf94bdebe251e7c91aa159f EBUILD rocThrust-5.0.2-r1.ebuild 1947 BLAKE2B 652b462a694df39527e4530318dd8b5fa80a7de8039e6ad8a28e7bb3a049e602330b9f42499b8d8e235b7e7ed0d7d4ee7abea215d86e6ac8eeef21f984969d30 SHA512 1229e211aaa383a8150e30e2caaf951db51100396e31f9a9e10df4b436349d3064e01728aedb44ddeb625e8f4d1d507125cbd08b099cab1a69c99d3d46e3dfe8 +EBUILD rocThrust-5.1.3.ebuild 1928 BLAKE2B d26a61ca2cbe3519a9a33cfe39146bc93b4233d62a17fde1377ee9db98673dbcc81f4cb77e30c17a5f1714a824cd0c84fc21018d547c3f4ad062ef43af7b0943 SHA512 c843826b0d9a312a06022519d7d069ff1ccb21d7ad4363396ef28776bc8af7d778fee2a2e4b954d7ca0db60c21d4ed639672b9db4c370992d8b10400e1db90bf MISC metadata.xml 656 BLAKE2B cdcee7af9e0c2f8e0553cc0d41ea208dbaa27aae0847f90b048e4c8791a9be511a84c7fb5ba8dc4c0409266d5a8a855fd4ebf578ad55c5882a000fbb4c5b05c0 SHA512 adefa0bbe1487a7c29a3b175c8d27e694c5464b0f7a3f20afcfd07952ef95cb54a789f7ae174053493d893338f52cf175f4b1939b998e850b62a7fd435dc592a diff --git a/sci-libs/rocThrust/rocThrust-5.1.3.ebuild b/sci-libs/rocThrust/rocThrust-5.1.3.ebuild new file mode 100644 index 000000000000..c7ef0e87fa4a --- /dev/null +++ b/sci-libs/rocThrust/rocThrust-5.1.3.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} + +inherit cmake rocm + +DESCRIPTION="HIP back-end for the parallel algorithm library Thrust" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocThrust" +SRC_URI="https://github.com/ROCmSoftwarePlatform/rocThrust/archive/rocm-${PV}.tar.gz -> rocThrust-${PV}.tar.gz" + +LICENSE="Apache-2.0" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" +IUSE="benchmark test" +REQUIRED_USE="${ROCM_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +RDEPEND="dev-util/hip + sci-libs/rocPRIM:${SLOT}[${ROCM_USEDEP}] + test? ( dev-cpp/gtest )" +DEPEND="${RDEPEND}" +BDEPEND=">=dev-util/cmake-3.22" + +S="${WORKDIR}/rocThrust-rocm-${PV}" + +PATCHES=( "${FILESDIR}/${PN}-4.0-operator_new.patch" ) + +src_prepare() { + sed -e "/PREFIX rocthrust/d" \ + -e "/DESTINATION/s:rocthrust/include/thrust:include/thrust:" \ + -e "/rocm_install_symlink_subdir(rocthrust)/d" \ + -e "/<INSTALL_INTERFACE/s:rocthrust/include/:include/:" -i thrust/CMakeLists.txt || die + + sed -e "s:\${CMAKE_INSTALL_INCLUDEDIR}:&/rocthrust:" \ + -e "s:\${ROCM_INSTALL_LIBDIR}:\${CMAKE_INSTALL_LIBDIR}:" -i cmake/ROCMExportTargetsHeaderOnly.cmake || die + + # disable downloading googletest and googlebenchmark + sed -r -e '/Downloading/{:a;N;/\n *\)$/!ba; d}' -i cmake/Dependencies.cmake || die + + # remove GIT dependency + sed -r -e '/find_package\(Git/{:a;N;/\nendif/!ba; d}' -i cmake/Dependencies.cmake || die + + eapply_user + cmake_src_prepare +} + +src_configure() { + addpredict /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DSKIP_RPATH=On + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DBUILD_TEST=$(usex test ON OFF) + -DBUILD_BENCHMARKS=$(usex benchmark ON OFF) + ) + + CXX=hipcc cmake_src_configure +} + +src_test() { + check_amdgpu + MAKEOPTS="-j1" cmake_src_test +} + +src_install() { + cmake_src_install + + use benchmark && dobin "${BUILD_DIR}"/benchmarks/benchmark_thrust_bench +} |