diff options
author | Benda Xu <heroxbd@gentoo.org> | 2021-01-20 23:57:33 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2021-01-21 00:11:25 +0800 |
commit | 82fbfe4f5baa29d1bde681574d7c54e3cc6709ca (patch) | |
tree | 4f7e5b08cbf04772798c86f1d15ee65ec4329b32 /sci-libs/miopen/miopen-4.0.0-r1.ebuild | |
parent | dev-util/rocm-clang-ocl: Clang OpenCL compilation wrapper. (diff) | |
download | sci-82fbfe4f5baa29d1bde681574d7c54e3cc6709ca.tar.gz sci-82fbfe4f5baa29d1bde681574d7c54e3cc6709ca.tar.bz2 sci-82fbfe4f5baa29d1bde681574d7c54e3cc6709ca.zip |
sci-libs/miopen: high performance machine learning primitives.
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/miopen/miopen-4.0.0-r1.ebuild')
-rw-r--r-- | sci-libs/miopen/miopen-4.0.0-r1.ebuild | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/sci-libs/miopen/miopen-4.0.0-r1.ebuild b/sci-libs/miopen/miopen-4.0.0-r1.ebuild new file mode 100644 index 000000000..1bde9f88f --- /dev/null +++ b/sci-libs/miopen/miopen-4.0.0-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +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" + +RDEPEND=" + >=dev-util/hip-${PV} + >=dev-libs/half-1.12.0 + dev-libs/ocl-icd + =dev-util/rocm-clang-ocl-${PV}* + sci-libs/rocBLAS + =dev-libs/boost-1.72*" + +DEPEND="${RDEPEND} + dev-util/cmake" + +S="${WORKDIR}/MIOpen-rocm-${PV}" + +src_prepare() { + sed -e "s:PATHS /opt/rocm/llvm:PATHS ${EPREFIX}/usr/lib/llvm/roc/ NO_DEFAULT_PATH:" \ + -e '/set( MIOPEN_INSTALL_DIR/s:miopen:${CMAKE_INSTALL_PREFIX}:' \ + -e '/set(MIOPEN_SYSTEM_DB_PATH/s:${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 "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:${EPREFIX}/usr/lib/amdgcn/bitcode:" -i cmake/hip-config.cmake || die + + cmake_src_prepare +} + +src_configure() { + export CXX="hipcc" + + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DCMAKE_BUILD_TYPE=Release + -DMIOPEN_BACKEND=$(usex opencl OpenCL HIP) + -DBoost_USE_STATIC_LIBS=OFF + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + chrpath --delete "${ED}/usr/bin/MIOpenDriver" + chrpath --delete "${ED}/usr/lib64/libMIOpen.so.1.0" +} |