From 04554a7ee461d00e9103f81290b2d980a121941a Mon Sep 17 00:00:00 2001 From: Benda Xu Date: Thu, 21 Jan 2021 19:27:53 +0800 Subject: 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 Suggested-by: Wilfried Holzke Package-Manager: Portage-3.0.12, Repoman-3.0.1 Signed-off-by: Benda Xu --- sci-libs/rocPRIM/Manifest | 1 + sci-libs/rocPRIM/metadata.xml | 19 ++++++++++++ sci-libs/rocPRIM/rocPRIM-4.0.0-r1.ebuild | 53 ++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 sci-libs/rocPRIM/Manifest create mode 100644 sci-libs/rocPRIM/metadata.xml create mode 100644 sci-libs/rocPRIM/rocPRIM-4.0.0-r1.ebuild (limited to 'sci-libs/rocPRIM') 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 @@ + + + + + sci@gentoo.org + Gentoo Science Project + + + candrews@gentoo.org + Craig Andrews + + + gentoo@holzke.net + Wilfried Holzke + + + ROCmSoftwarePlatform/rocPRIM + + 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 +} -- cgit v1.2.3-65-gdbad