mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
sci-libs/miopen: add 7.1.0
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
DIST MIOpen-6.3.3.tar.gz 104157223 BLAKE2B 10b793594ed47397dd695ada4da1ba93935c78512c27291449df20fc7760aad2b224eaa50d3526453e7b4451828769937c66069a11f6f6fb6a636a16c6f90957 SHA512 9749d04d9a6b92ba19b3534966feb4ed21eaca3fd4a20aaec050bcf725091a8706044136f836ed20e08e7ec3b4074e1f99a08b51b4cbe449aedb7f86eb5cc87f
|
||||
DIST MIOpen-6.4.3.tar.gz 108253603 BLAKE2B efeb974ab0d304a97171a2fb3497d754fdebd5d071f1e3a4fb6cf1fea2f4206686cf60905910979929b9b79e7bf99e2aaa73c433ad97c9bd480591f3fdf5485a SHA512 d3426595fb5395de225cd5c17819c2ac53e09db33f8aaf48022ab77047345c62dbaec0b3c704d24e937eb66f42011d69ac8a2dc8d8720608d635b19048dcda27
|
||||
DIST MIOpen-7.0.2.tar.gz 110490323 BLAKE2B 552eb69878f0b517b1251887a1c37c0e9224df38c2f2ad779d3882510c3c2fec745867e32d78207ec90e814d4c87c637709b8184690b178d37bea660774c0a5f SHA512 f4ef92b0836f419066c2829517df3552d551ad1acfc8a81b9a80b8c291bf334a3fb0067ab593710281cacc010bf812d2b482b252453d21284a7fcb3a58755fe0
|
||||
DIST MIOpen-7.1.0.tar.gz 110587160 BLAKE2B 6ee5eda4d3527e493d768d8aa7f320c77b120895a49f6a4700b06c3ef6983f45d43a96ed41fb8c6ace8fba81cc4a998437e6fdf354e6ddea645e34c14c3370c4 SHA512 bf52a7b88e5dabe818575ec5c503e534ee07defbc5bce479c935c4bf3605d07e4021253ccde8648fa1f5d10c24f56182b9b0307676658db6c7c3c933ddfe622e
|
||||
|
||||
138
sci-libs/miopen/miopen-7.1.0.ebuild
Normal file
138
sci-libs/miopen/miopen-7.1.0.ebuild
Normal file
@@ -0,0 +1,138 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
ROCM_VERSION=${PV}
|
||||
LLVM_COMPAT=( 20 )
|
||||
|
||||
inherit cmake flag-o-matic llvm-r1 rocm
|
||||
|
||||
DESCRIPTION="AMD's Machine Intelligence Library"
|
||||
HOMEPAGE="https://github.com/ROCm/rocm-libraries/tree/develop/projects/miopen"
|
||||
SRC_URI="https://github.com/ROCm/MIOpen/archive/rocm-${PV}.tar.gz -> MIOpen-${PV}.tar.gz"
|
||||
S="${WORKDIR}/MIOpen-rocm-${PV}"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
IUSE="composable-kernel debug hipblaslt rocblas roctracer test"
|
||||
|
||||
REQUIRED_USE="
|
||||
${ROCM_REQUIRED_USE}
|
||||
composable-kernel? (
|
||||
|| ( amdgpu_targets_gfx908 amdgpu_targets_gfx90a amdgpu_targets_gfx942 amdgpu_targets_gfx950 )
|
||||
)
|
||||
"
|
||||
|
||||
# tests can freeze machine depending on gpu/kernel
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
dev-util/hip:${SLOT}
|
||||
dev-db/sqlite:3
|
||||
app-arch/bzip2
|
||||
sci-libs/rocRAND:${SLOT}
|
||||
dev-libs/boost:=
|
||||
dev-libs/rocm-comgr:${SLOT}
|
||||
|
||||
composable-kernel? ( sci-libs/composable-kernel:${SLOT} )
|
||||
hipblaslt? ( sci-libs/hipBLASLt:${SLOT} )
|
||||
rocblas? ( sci-libs/rocBLAS:${SLOT} )
|
||||
roctracer? ( dev-util/roctracer:${SLOT} )
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
dev-cpp/nlohmann_json
|
||||
>=dev-libs/half-1.12.0-r1
|
||||
test? ( dev-cpp/gtest )
|
||||
|
||||
amdgpu_targets_gfx908? ( =dev-cpp/frugally-deep-0.15* )
|
||||
amdgpu_targets_gfx940? ( =dev-cpp/frugally-deep-0.15* )
|
||||
amdgpu_targets_gfx941? ( =dev-cpp/frugally-deep-0.15* )
|
||||
amdgpu_targets_gfx942? ( =dev-cpp/frugally-deep-0.15* )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
dev-build/rocm-cmake
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-6.1.1-build-all-tests.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
|
||||
sed -e '/MIOPEN_TIDY_ERRORS ALL/d' \
|
||||
-e 's/FLAGS_RELEASE} -s/FLAGS_RELEASE}/g' \
|
||||
-i CMakeLists.txt || die
|
||||
|
||||
sed -e "/add_test/s:--build \${CMAKE_CURRENT_BINARY_DIR}:--build ${BUILD_DIR}:" \
|
||||
-i test/CMakeLists.txt || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
rocm_use_hipcc
|
||||
|
||||
if ! use debug; then
|
||||
append-cflags "-DNDEBUG"
|
||||
append-cxxflags "-DNDEBUG"
|
||||
CMAKE_BUILD_TYPE="Release"
|
||||
else
|
||||
CMAKE_BUILD_TYPE="Debug"
|
||||
fi
|
||||
|
||||
local use_ai_tuning=OFF
|
||||
if use amdgpu_targets_gfx908 || use amdgpu_targets_gfx940 || use amdgpu_targets_gfx941 \
|
||||
|| use amdgpu_targets_gfx942; then
|
||||
use_ai_tuning=ON
|
||||
fi
|
||||
|
||||
# Too many warnings
|
||||
append-cxxflags -Wno-thread-safety-analysis
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_SKIP_RPATH=ON
|
||||
-DGPU_TARGETS="$(get_amdgpu_flags)"
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
-DMIOPEN_BACKEND=HIP
|
||||
-DBoost_USE_STATIC_LIBS=OFF
|
||||
-DMIOPEN_USE_MLIR=OFF
|
||||
-DMIOPEN_USE_ROCTRACER=$(usex roctracer ON OFF)
|
||||
-DMIOPEN_USE_ROCBLAS=$(usex rocblas ON OFF)
|
||||
-DMIOPEN_USE_HIPBLASLT=$(usex hipblaslt ON OFF)
|
||||
-DMIOPEN_USE_COMPOSABLEKERNEL=$(usex composable-kernel ON OFF)
|
||||
-DBUILD_TESTING=$(usex test ON OFF)
|
||||
-DROCM_SYMLINK_LIBS=OFF
|
||||
-DMIOPEN_HIP_COMPILER="${ESYSROOT}/usr/bin/hipcc"
|
||||
-DMIOPEN_AMDGCN_ASSEMBLER="$(get_llvm_prefix)/bin/clang"
|
||||
-DMIOPEN_OFFLOADBUNDLER_BIN="$(get_llvm_prefix)/bin/clang-offload-bundler"
|
||||
-DHIP_OC_COMPILER="$(get_llvm_prefix)/bin/clang"
|
||||
-DMIOPEN_ENABLE_AI_KERNEL_TUNING=${use_ai_tuning}
|
||||
-DMIOPEN_ENABLE_AI_IMMED_MODE_FALLBACK=${use_ai_tuning}
|
||||
)
|
||||
|
||||
if use test; then
|
||||
mycmakeargs+=(
|
||||
-DMIOPEN_TEST_ALL=ON
|
||||
-DMIOPEN_TEST_GDB=OFF
|
||||
)
|
||||
# needed by rocminfo
|
||||
addpredict /dev/random
|
||||
check_amdgpu
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
check_amdgpu
|
||||
LD_LIBRARY_PATH="${BUILD_DIR}"/lib MIOPEN_SYSTEM_DB_PATH="${BUILD_DIR}"/share/miopen/db/ cmake_src_test -j1
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
}
|
||||
Reference in New Issue
Block a user