diff options
author | Benda Xu <heroxbd@gentoo.org> | 2021-01-21 19:27:53 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2021-01-24 15:45:41 +0800 |
commit | 04554a7ee461d00e9103f81290b2d980a121941a (patch) | |
tree | 9158275885e83651ef161ffec550e1f3d7b9c96e /sci-libs/rocPRIM | |
parent | sci-libs/rocFFT: FFT implementation for ROCm. (diff) | |
download | gentoo-04554a7ee461d00e9103f81290b2d980a121941a.tar.gz gentoo-04554a7ee461d00e9103f81290b2d980a121941a.tar.bz2 gentoo-04554a7ee461d00e9103f81290b2d980a121941a.zip |
sci-libs/rocPRIM: HIP parallel primitives for ROCm GPU.
Bug: https://bugs.gentoo.org/650804
Bug: https://github.com/gentoo/gentoo/pull/10724
Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
Suggested-by: Wilfried Holzke <gentoo@holzke.net>
Package-Manager: Portage-3.0.12, Repoman-3.0.1
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'sci-libs/rocPRIM')
-rw-r--r-- | sci-libs/rocPRIM/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/rocPRIM/metadata.xml | 19 | ||||
-rw-r--r-- | sci-libs/rocPRIM/rocPRIM-4.0.0-r1.ebuild | 53 |
3 files changed, 73 insertions, 0 deletions
diff --git a/sci-libs/rocPRIM/Manifest b/sci-libs/rocPRIM/Manifest new file mode 100644 index 000000000000..835473471bc6 --- /dev/null +++ b/sci-libs/rocPRIM/Manifest @@ -0,0 +1 @@ +DIST rocPRIM-4.0.0.tar.gz 285576 BLAKE2B 44f3542068dee48c0f2bb475f4d3fd74592fe27f4ca00a7b754014deaaa7187c4363d4b2e7fe13ff771b48d2885b848b9632ef71ce85e80e0946e4e5f13495d8 SHA512 c37fce4f16788d82379459af69b9f47f2bccb3b0e655e7314a23936cc99a474afb0092f240bd950341f1b02ce93d03abce0df7ce62ffcb5d577171ce870dd1d2 diff --git a/sci-libs/rocPRIM/metadata.xml b/sci-libs/rocPRIM/metadata.xml new file mode 100644 index 000000000000..3e0b6aad9ae7 --- /dev/null +++ b/sci-libs/rocPRIM/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <maintainer type="person"> + <email>candrews@gentoo.org</email> + <name>Craig Andrews</name> + </maintainer> + <maintainer type="person"> + <email>gentoo@holzke.net</email> + <name>Wilfried Holzke</name> + </maintainer> + <upstream> + <remote-id type="github">ROCmSoftwarePlatform/rocPRIM</remote-id> + </upstream> +</pkgmetadata> diff --git a/sci-libs/rocPRIM/rocPRIM-4.0.0-r1.ebuild b/sci-libs/rocPRIM/rocPRIM-4.0.0-r1.ebuild new file mode 100644 index 000000000000..880998e8b08c --- /dev/null +++ b/sci-libs/rocPRIM/rocPRIM-4.0.0-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +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" +IUSE="" + +RDEPEND=">=dev-util/hip-${PV} + >=dev-util/rocm-cmake-${PV}" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/rocPRIM-rocm-${PV}" + +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 + + eapply_user + cmake_src_prepare +} + +src_configure() { + # Grant access to the device + addwrite /dev/kfd + addpredict /dev/dri/ + + # Compiler to use + export CXX=hipcc + + local mycmakeargs=( + -DAMDGPU_TARGETS="gfx803;gfx900;gfx906;gfx908" + -DBUILD_TEST=OFF + -DBUILD_BENCHMARK=OFF + ) + + cmake_src_configure +} |