diff options
| author | 2021-01-20 23:57:33 +0800 | |
|---|---|---|
| committer | 2021-01-21 00:11:25 +0800 | |
| commit | 82fbfe4f5baa29d1bde681574d7c54e3cc6709ca (patch) | |
| tree | 4f7e5b08cbf04772798c86f1d15ee65ec4329b32 | |
| 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>
| -rw-r--r-- | sci-libs/miopen/Manifest | 1 | ||||
| -rw-r--r-- | sci-libs/miopen/metadata.xml | 11 | ||||
| -rw-r--r-- | sci-libs/miopen/miopen-4.0.0-r1.ebuild | 60 |
3 files changed, 72 insertions, 0 deletions
diff --git a/sci-libs/miopen/Manifest b/sci-libs/miopen/Manifest new file mode 100644 index 000000000..d36ff9285 --- /dev/null +++ b/sci-libs/miopen/Manifest @@ -0,0 +1 @@ +DIST MIOpen-4.0.0.tar.gz 35574627 BLAKE2B 6741d653ab251ead275d3b015086e77a32f4b3e9aa2e1af3bb54cc519ab1cf456eac39670a6cbd6fab1db25330e3cb1e74f66cc4aeb5de7a9151a1284d630dc1 SHA512 32f3e7f04260921e0658f50817079f6394fbc469c31afe72b40925c0429b47056dd07a931ec4ee5c41fc9c5388a1b25ecafb7ea74879ed77b2506784471acce3 diff --git a/sci-libs/miopen/metadata.xml b/sci-libs/miopen/metadata.xml new file mode 100644 index 000000000..336bdb639 --- /dev/null +++ b/sci-libs/miopen/metadata.xml @@ -0,0 +1,11 @@ +<?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> + </maintainer> + <maintainer type="person"> + <email>gentoo@holzke.net</email> + <name>Wilfried Holzke</name> + </maintainer> +</pkgmetadata> 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" +} |
