* [gentoo-commits] repo/gentoo:master commit in: sci-libs/miopen/files/, sci-libs/miopen/
@ 2022-11-23 18:12 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2022-11-23 18:12 UTC (permalink / raw
To: gentoo-commits
commit: 1a671b95cbeeecdda3791046734351f2c7fdd34f
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 23 18:12:18 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Nov 23 18:12:45 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a671b95
sci-libs/miopen: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sci-libs/miopen/Manifest | 1 -
sci-libs/miopen/files/miopen-5.0.2-gfx1031.patch | 241 ----------------------
sci-libs/miopen/files/miopen-5.0.2-no-strip.patch | 18 --
sci-libs/miopen/miopen-5.0.2.ebuild | 81 --------
4 files changed, 341 deletions(-)
diff --git a/sci-libs/miopen/Manifest b/sci-libs/miopen/Manifest
index 39e5f94389f6..ababb7dc3105 100644
--- a/sci-libs/miopen/Manifest
+++ b/sci-libs/miopen/Manifest
@@ -1,2 +1 @@
-DIST MIOpen-5.0.2.tar.gz 76294827 BLAKE2B 7b2a1f0e675793aee4a0fa2a270caac8332cda36c8f04cee483cc2882ed987b6e676e9c24a1acf4976a16a10f922b1a6263470b419aa88a29cfcb6d6d4b4cc29 SHA512 a581b45220797904db3e4dd3840f2ef96085f00baf8187c5ab574325a66da4f599dee6496457bb1cc32825b57a13fb0ef35a2ef1bd2a5f449c7e7b9fa64b27d1
DIST MIOpen-5.1.3.tar.gz 88118329 BLAKE2B d24722ffc5f5dab6d6a1de2ce34193ad2f25c9a2562e38c52e010a29870f01d9ea1c56970ba0601a088c8286e97958ee95d0da27fc8082126dd2ebe5ccb36b70 SHA512 a14e28cfcb12e5061e0e7b999ef3e67fa0a0e897e31bc50e7288b8a23eb1791312e33d3b697021c2b654ccc065ae1b046c1cfd77ba8e04b0f3e87e9cc0626dcd
diff --git a/sci-libs/miopen/files/miopen-5.0.2-gfx1031.patch b/sci-libs/miopen/files/miopen-5.0.2-gfx1031.patch
deleted file mode 100644
index 15ac67bd3cef..000000000000
--- a/sci-libs/miopen/files/miopen-5.0.2-gfx1031.patch
+++ /dev/null
@@ -1,241 +0,0 @@
-Index: MIOpen-rocm-5.0.2/src/include/miopen/solver/implicitgemm_util.hpp
-===================================================================
---- MIOpen-rocm-5.0.2.orig/src/include/miopen/solver/implicitgemm_util.hpp
-+++ MIOpen-rocm-5.0.2/src/include/miopen/solver/implicitgemm_util.hpp
-@@ -478,7 +478,7 @@ static inline bool is_use_amd_buffer_loa
- {
- #if WORKAROUND_MIOPEN_ISSUE_557
- const auto device_name = ctx.GetStream().GetDeviceName();
-- return !StartsWith(device_name, "gfx1030");
-+ return !StartsWith(device_name, "gfx1030") && !StartsWith(device_name, "gfx1031");
- #else
- return true;
- #endif
-@@ -487,7 +487,7 @@ static inline bool is_use_amd_buffer_loa
- static inline bool is_use_v_fmac_f32(const ConvolutionContext& ctx)
- {
- const auto device_name = ctx.GetStream().GetDeviceName();
-- return StartsWith(device_name, "gfx1030");
-+ return StartsWith(device_name, "gfx1030") || StartsWith(device_name, "gfx1031");
- }
-
- static inline bool support_amd_buffer_atomic_fadd(const std::string& device_name)
-@@ -608,7 +608,8 @@ static inline bool IsComposableKernelSup
- StartsWith(c.GetStream().GetDeviceName(), "gfx906") ||
- StartsWith(c.GetStream().GetDeviceName(), "gfx908") ||
- StartsWith(c.GetStream().GetDeviceName(), "gfx90a") ||
-- StartsWith(c.GetStream().GetDeviceName(), "gfx1030");
-+ StartsWith(c.GetStream().GetDeviceName(), "gfx1030")||
-+ StartsWith(c.GetStream().GetDeviceName(), "gfx1031");
- }
-
- // greatest common divisor, aka highest common factor
-Index: MIOpen-rocm-5.0.2/src/kernels/batchnorm_functions.h
-===================================================================
---- MIOpen-rocm-5.0.2.orig/src/kernels/batchnorm_functions.h
-+++ MIOpen-rocm-5.0.2/src/kernels/batchnorm_functions.h
-@@ -159,6 +159,10 @@
- #define MIO_BN_GFX1030 0
- #endif
-
-+#ifndef MIO_BN_GFX1031
-+#define MIO_BN_GFX1031 0
-+#endif
-+
- #define UNUSED __attribute__((__unused__))
-
- #if(MIO_BN_VARIANT != 4)
-Index: MIOpen-rocm-5.0.2/src/kernels/MIOpenBatchNormActivBwdPerAct.cl
-===================================================================
---- MIOpen-rocm-5.0.2.orig/src/kernels/MIOpenBatchNormActivBwdPerAct.cl
-+++ MIOpen-rocm-5.0.2/src/kernels/MIOpenBatchNormActivBwdPerAct.cl
-@@ -34,7 +34,7 @@
- #endif
-
- #define MIOPEN_USE_AMDGCN 0
--#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1
-+#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1
- #undef MIOPEN_USE_AMDGCN
- #define MIOPEN_USE_AMDGCN 1
- #endif
-Index: MIOpen-rocm-5.0.2/src/kernels/MIOpenBatchNormActivBwdSpatial.cl
-===================================================================
---- MIOpen-rocm-5.0.2.orig/src/kernels/MIOpenBatchNormActivBwdSpatial.cl
-+++ MIOpen-rocm-5.0.2/src/kernels/MIOpenBatchNormActivBwdSpatial.cl
-@@ -32,7 +32,7 @@
- #endif
-
- #define MIOPEN_USE_AMDGCN 0
--#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1
-+#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1
- #undef MIOPEN_USE_AMDGCN
- #define MIOPEN_USE_AMDGCN 1
- #endif
-Index: MIOpen-rocm-5.0.2/src/kernels/MIOpenBatchNormActivFwdTrainSpatial.cl
-===================================================================
---- MIOpen-rocm-5.0.2.orig/src/kernels/MIOpenBatchNormActivFwdTrainSpatial.cl
-+++ MIOpen-rocm-5.0.2/src/kernels/MIOpenBatchNormActivFwdTrainSpatial.cl
-@@ -33,7 +33,7 @@
- #endif
-
- #define MIOPEN_USE_AMDGCN 0
--#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1
-+#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1
- #undef MIOPEN_USE_AMDGCN
- #define MIOPEN_USE_AMDGCN 1
- #endif
-Index: MIOpen-rocm-5.0.2/src/kernels/MIOpenBatchNormBwdSpatial.cl
-===================================================================
---- MIOpen-rocm-5.0.2.orig/src/kernels/MIOpenBatchNormBwdSpatial.cl
-+++ MIOpen-rocm-5.0.2/src/kernels/MIOpenBatchNormBwdSpatial.cl
-@@ -33,7 +33,7 @@
- #endif
-
- #define MIOPEN_USE_AMDGCN 0
--#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1
-+#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1
- #undef MIOPEN_USE_AMDGCN
- #define MIOPEN_USE_AMDGCN 1
- #endif
-Index: MIOpen-rocm-5.0.2/src/kernels/MIOpenBatchNormFwdTrainSpatial.cl
-===================================================================
---- MIOpen-rocm-5.0.2.orig/src/kernels/MIOpenBatchNormFwdTrainSpatial.cl
-+++ MIOpen-rocm-5.0.2/src/kernels/MIOpenBatchNormFwdTrainSpatial.cl
-@@ -33,7 +33,7 @@
- #endif
-
- #define MIOPEN_USE_AMDGCN 0
--#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1
-+#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1
- #undef MIOPEN_USE_AMDGCN
- #define MIOPEN_USE_AMDGCN 1
- #endif
-Index: MIOpen-rocm-5.0.2/src/md_graph.cpp
-===================================================================
---- MIOpen-rocm-5.0.2.orig/src/md_graph.cpp
-+++ MIOpen-rocm-5.0.2/src/md_graph.cpp
-@@ -738,8 +738,8 @@ void FusionMDGraph::InitConv(FusionMDGra
-
- add_v21_wino("gfx9", {"gfx900", "gfx906", "gfx908", "gfx90a"}, 1);
- add_v21_wino("gfx9", {"gfx900", "gfx906", "gfx908", "gfx90a"}, 2);
-- add_v21_wino("gfx10", {"gfx1011", "gfx1012", "gfx1030"}, 1);
-- add_v21_wino("gfx10", {"gfx1011", "gfx1012", "gfx1030"}, 2);
-+ add_v21_wino("gfx10", {"gfx1011", "gfx1012", "gfx1030", "gfx1031"}, 1);
-+ add_v21_wino("gfx10", {"gfx1011", "gfx1012", "gfx1030", "gfx1031"}, 2);
- }
- }
-
-Index: MIOpen-rocm-5.0.2/src/ocl/fusionopbiasbnactivocl.cpp
-===================================================================
---- MIOpen-rocm-5.0.2.orig/src/ocl/fusionopbiasbnactivocl.cpp
-+++ MIOpen-rocm-5.0.2/src/ocl/fusionopbiasbnactivocl.cpp
-@@ -392,7 +392,8 @@ miopenStatus_t BatchNormBwdTrainFusionOp
- " -DMIO_BN_USESAVED=" + std::to_string(static_cast<int>(true)) +
- " -DMIO_BN_VARIANT=" + std::to_string(variant) +
- " -DMIO_BN_CBA_WRITE_INTERMEDIATE=" + std::to_string(0) +
-- " -DMIO_BN_GFX1030=" + ((handle.GetDeviceName() == "gfx1030") ? "1" : "0");
-+ " -DMIO_BN_GFX1030=" + ((handle.GetDeviceName() == "gfx1030") ? "1" : "0") +
-+ " -DMIO_BN_GFX1031=" + ((handle.GetDeviceName() == "gfx1031") ? "1" : "0");
-
- compile_config += add;
- MIOPEN_LOG_I2(add);
-@@ -607,7 +608,8 @@ miopenStatus_t BatchNormFwdTrainFusionOp
- " -DMIO_SAVE_MEAN_VARIANCE=" + (saveBatchStats ? "1" : "0") +
- " -DMIO_RUNNING_RESULT=" + ((savePopStats) ? "1" : "0") +
- " -DMIO_BN_VARIANT=" + std::to_string(variant) +
-- " -DMIO_BN_GFX1030=" + ((handle.GetDeviceName() == "gfx1030") ? "1" : "0");
-+ " -DMIO_BN_GFX1030=" + ((handle.GetDeviceName() == "gfx1030") ? "1" : "0") +
-+ " -DMIO_BN_GFX1031=" + ((handle.GetDeviceName() == "gfx1031") ? "1" : "0");
-
- compile_config += add;
- MIOPEN_LOG_I2(add);
-Index: MIOpen-rocm-5.0.2/src/target_properties.cpp
-===================================================================
---- MIOpen-rocm-5.0.2.orig/src/target_properties.cpp
-+++ MIOpen-rocm-5.0.2/src/target_properties.cpp
-@@ -54,6 +54,7 @@ static std::string GetDeviceNameFromMap(
- {"Vega10", "gfx900"},
- {"gfx901", "gfx900"},
- {"10.3.0 Sienna_Cichlid 18", "gfx1030"},
-+ {"10.3.1 Navi_flounder 18", "gfx1031"},
- };
-
- const char* const p_asciz = miopen::GetStringEnv(MIOPEN_DEBUG_ENFORCE_DEVICE{});
-Index: MIOpen-rocm-5.0.2/test/CMakeLists.txt
-===================================================================
---- MIOpen-rocm-5.0.2.orig/test/CMakeLists.txt
-+++ MIOpen-rocm-5.0.2/test/CMakeLists.txt
-@@ -37,6 +37,7 @@ option( MIOPEN_TEST_GFX908 "Test on MI10
- option( MIOPEN_TEST_GFX90A "Test on gfx90a" OFF )
- option( MIOPEN_TEST_VEGA "Test on Vega10/20 (gfx900, gfx906)" OFF )
- option( MIOPEN_TEST_GFX1030 "Test on Navi21 (gfx1030)" OFF )
-+option( MIOPEN_TEST_GFX1031 "Test on Navi21 (gfx1031)" OFF )
- option( MIOPEN_TEST_GPU_XNACK_ENABLED "Test as if XNACK mode is enabled" OFF )
- option( MIOPEN_TEST_CONV Off)
- option( MIOPEN_TEST_DEEPBENCH Off)
-@@ -74,7 +75,7 @@ endif()
- # Also we do not detect GPU when target GPU for testing is specified explicitly.
- set(MIOPEN_TEST_GPU_DETECTION_FAILED FALSE)
- set(MIOPEN_NO_GPU FALSE)
--if(NOT (MIOPEN_TEST_VEGA OR MIOPEN_TEST_GFX908 OR MIOPEN_TEST_GFX90A OR MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_HIP_NOGPU))
-+if(NOT (MIOPEN_TEST_VEGA OR MIOPEN_TEST_GFX908 OR MIOPEN_TEST_GFX90A OR MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_GFX1031 OR MIOPEN_TEST_HIP_NOGPU))
- find_program(ROCMINFO
- NAMES rocminfo
- PATHS
-@@ -96,6 +97,8 @@ if(NOT (MIOPEN_TEST_VEGA OR MIOPEN_TEST_
- elseif (NOT ROCMINFO_EXIT_STATUS EQUAL 0)
- message(WARNING "ROCMINFO FAILED, GPU TYPE UNKNOWN. Manually set respective MIOPEN_TEST_GFX* CMake variable to specify target GPU for testing.")
- set(MIOPEN_TEST_GPU_DETECTION_FAILED TRUE)
-+ elseif(ROCMINFO_OUTPUT MATCHES "gfx1031")
-+ set(MIOPEN_TEST_GFX1031 ON)
- elseif(ROCMINFO_OUTPUT MATCHES "gfx1030")
- set(MIOPEN_TEST_GFX1030 ON)
- elseif(ROCMINFO_OUTPUT MATCHES "gfx900|gfx906")
-@@ -122,6 +125,7 @@ message(STATUS "MIOPEN_TEST_VEGA ${MIOPE
- message(STATUS "MIOPEN_TEST_GFX908 ${MIOPEN_TEST_GFX908}")
- message(STATUS "MIOPEN_TEST_GFX90A ${MIOPEN_TEST_GFX90A}")
- message(STATUS "MIOPEN_TEST_GFX1030 ${MIOPEN_TEST_GFX1030}")
-+message(STATUS "MIOPEN_TEST_GFX1031 ${MIOPEN_TEST_GFX1031}")
- message(STATUS "MIOPEN_TEST_GPU_XNACK_ENABLED ${MIOPEN_TEST_GPU_XNACK_ENABLED}")
- message(STATUS "MIOPEN_TEST_GPU_DETECTION_FAILED ${MIOPEN_TEST_GPU_DETECTION_FAILED}")
-
-@@ -164,10 +168,10 @@ endmacro()
- set_var_to_condition(WORKAROUND_ISSUE_1187_DEFAULT MIOPEN_TEST_GFX90A AND MIOPEN_TEST_FLOAT)
- option( WORKAROUND_ISSUE_1187 "" ${WORKAROUND_ISSUE_1187_DEFAULT})
-
--set_var_to_condition(WORKAROUND_ISSUE_1148_DEFAULT MIOPEN_TEST_GFX1030 AND MIOPEN_TEST_FLOAT)
-+set_var_to_condition(WORKAROUND_ISSUE_1148_DEFAULT MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_GFX1031 AND MIOPEN_TEST_FLOAT)
- option( WORKAROUND_ISSUE_1148 "" ${WORKAROUND_ISSUE_1148_DEFAULT})
-
--set_var_to_condition(WORKAROUND_ISSUE_1334_DEFAULT MIOPEN_TEST_GFX1030 AND MIOPEN_TEST_FLOAT)
-+set_var_to_condition(WORKAROUND_ISSUE_1334_DEFAULT MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_GFX1031 AND MIOPEN_TEST_FLOAT)
- option( WORKAROUND_ISSUE_1334 "" ${WORKAROUND_ISSUE_1334_DEFAULT})
-
- set_var_to_condition(WORKAROUND_ISSUE_1317_DEFAULT MIOPEN_TEST_OPENCL)
-@@ -216,7 +220,7 @@ if (MIOPEN_NO_GPU)
- test_pooling3d test_perfdb)
- endif()
-
--if(MIOPEN_TEST_GFX1030)
-+if(MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_GFX1031)
- if(WORKAROUND_ISSUE_1053 AND MIOPEN_TEST_ALL)
- list(APPEND SKIP_TESTS test_lrn_test)
- endif()
-@@ -443,7 +447,7 @@ endfunction()
- # If nothing is specified, the default value is taken.
- # Default: FLOAT_ENABLED HALF_DISABLED BF16_DISABLED INT8_DISABLED
- #
--# GPU types: VEGA, GFX908, GFX90A, GFX1030
-+# GPU types: VEGA, GFX908, GFX90A, GFX1030, GFX1031
- # VEGA tests are intended to be run on gfx900 or gfx906.
- # The option can be enabled or disabled by using '_ENABLED' and '_DISABLED' suffix.
- # If nothing is specified, the default value is taken.
-@@ -574,7 +578,7 @@ function(add_custom_test NAME)
- set_tests_properties(${NAME} PROPERTIES RUN_SERIAL On)
- endif()
-
-- if( (is_vega_check OR is_gfx908_check OR is_gfx1030_check OR is_gfx90a_check)
-+ if( (is_vega_check OR is_gfx908_check OR is_gfx1030_check OR is_gfx1031_check OR is_gfx90a_check)
- AND is_full_check
- AND is_xnack_on_check
- AND (is_miotensile_check AND is_mlir_check)
diff --git a/sci-libs/miopen/files/miopen-5.0.2-no-strip.patch b/sci-libs/miopen/files/miopen-5.0.2-no-strip.patch
deleted file mode 100644
index a7be67e99578..000000000000
--- a/sci-libs/miopen/files/miopen-5.0.2-no-strip.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Don't strip for release. Let portage handle stripping.
-Index: MIOpen-rocm-5.0.2/CMakeLists.txt
-===================================================================
---- MIOpen-rocm-5.0.2.orig/CMakeLists.txt
-+++ MIOpen-rocm-5.0.2/CMakeLists.txt
-@@ -78,12 +78,6 @@ option( BUILD_DEV "Build for development
- option(MIOPEN_ENABLE_FIN "Enable the fin driver for MIOpen" OFF)
-
-
--# Strip symbols for release
--if(NOT WIN32 AND NOT APPLE)
-- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
-- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
--endif()
--
- rocm_setup_version(VERSION 2.15.0)
-
- list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake )
diff --git a/sci-libs/miopen/miopen-5.0.2.ebuild b/sci-libs/miopen/miopen-5.0.2.ebuild
deleted file mode 100644
index 10be8feadaf5..000000000000
--- a/sci-libs/miopen/miopen-5.0.2.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake flag-o-matic
-
-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/$(ver_cut 1-2)"
-
-IUSE="debug test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- dev-util/hip
- >=dev-db/sqlite-3.17
- dev-libs/ocl-icd
- dev-util/rocm-clang-ocl:${SLOT}
- sci-libs/rocBLAS:${SLOT}
- dev-libs/boost
-"
-
-DEPEND="${RDEPEND}"
-
-BDEPEND="dev-libs/half:0/1"
-
-S="${WORKDIR}/MIOpen-rocm-${PV}"
-
-PATCHES=(
- "${FILESDIR}/${PN}-4.2.0-disable-no-inline-boost.patch"
- "${FILESDIR}/${PN}-4.2.0-gcc11-numeric_limits.patch"
- "${FILESDIR}/${PN}-5.0.2-strip-xnack-in-flags.patch"
- "${FILESDIR}/${PN}-4.3.0-fix-interface-include-in-HIP_COMPILER_FLAGS.patch"
- "${FILESDIR}/${PN}-4.3.0-enable-test.patch"
- "${FILESDIR}/${PN}-5.0.2-no-strip.patch"
- "${FILESDIR}/${PN}-5.0.2-gfx1031.patch"
-)
-
-src_prepare() {
- sed -e "s:/opt/rocm/llvm:""${EPREFIX}""/usr/lib/llvm/roc/ NO_DEFAULT_PATH:" \
- -e "s:/opt/rocm/hip:""${EPREFIX}""/usr/lib/hip/ NO_DEFAULT_PATH:" \
- -e '/set( MIOPEN_INSTALL_DIR/s:miopen:${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 "/add_test/s:--build \${CMAKE_CURRENT_BINARY_DIR}:--build ${BUILD_DIR}:" -i test/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() {
- if ! use debug; then
- append-cflags "-DNDEBUG"
- append-cxxflags "-DNDEBUG"
- CMAKE_BUILD_TYPE="Release"
- else
- CMAKE_BUILD_TYPE="Debug"
- fi
-
- export CXX="${EPREFIX}/usr/lib/llvm/roc/bin/clang++"
-
- local mycmakeargs=(
- -DCMAKE_SKIP_RPATH=ON
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
- -DMIOPEN_BACKEND=HIP
- -DBoost_USE_STATIC_LIBS=OFF
- -DBUILD_TESTS=$(usex test ON OFF)
- -DMIOPEN_TEST_ALL=$(usex test ON OFF)
- ${AMDGPU_TARGETS+-DAMDGPU_TARGETS="${AMDGPU_TARGETS}"}
- )
-
- cmake_src_configure
-}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/miopen/files/, sci-libs/miopen/
@ 2025-01-05 21:49 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2025-01-05 21:49 UTC (permalink / raw
To: gentoo-commits
commit: 6b567cdfe99d7b57f33d5bf0f55fe185337d326a
Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Mon Dec 9 09:42:35 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 5 21:46:42 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b567cdf
sci-libs/miopen: add 6.3.0
Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
sci-libs/miopen/Manifest | 1 +
.../miopen/files/miopen-6.1.1-fix-libcxx.patch | 246 +++++++++++++++++++++
.../miopen-6.3.0-conditional-ck-components.patch | 46 ++++
.../miopen/files/miopen-6.3.0-isnan-include.patch | 19 ++
sci-libs/miopen/metadata.xml | 6 +
sci-libs/miopen/miopen-6.1.1.ebuild | 2 +-
.../{miopen-6.1.1.ebuild => miopen-6.3.0.ebuild} | 42 +++-
7 files changed, 354 insertions(+), 8 deletions(-)
diff --git a/sci-libs/miopen/Manifest b/sci-libs/miopen/Manifest
index 2b9827766bf0..5fc8fe370379 100644
--- a/sci-libs/miopen/Manifest
+++ b/sci-libs/miopen/Manifest
@@ -1,4 +1,5 @@
DIST MIOpen-5.1.3.tar.gz 88118329 BLAKE2B d24722ffc5f5dab6d6a1de2ce34193ad2f25c9a2562e38c52e010a29870f01d9ea1c56970ba0601a088c8286e97958ee95d0da27fc8082126dd2ebe5ccb36b70 SHA512 a14e28cfcb12e5061e0e7b999ef3e67fa0a0e897e31bc50e7288b8a23eb1791312e33d3b697021c2b654ccc065ae1b046c1cfd77ba8e04b0f3e87e9cc0626dcd
DIST MIOpen-5.7.1.tar.gz 100751593 BLAKE2B c5f847fe4374ab22737c281a65401125012328412d584fc09244b431ea6265d6d5028429115ee15fa8b04cbe0edd020e4e7ac8deb22561183ed76cb8c3d4d9d4 SHA512 3354b3b154f29a6337403abc5a71ec47c0b2558320c5a1b0cbfbbdb370c4fada2db12d4a19a312b5e30ca2e2302ee50ece3390603e84d132b2212a168e9523fa
DIST MIOpen-6.1.1.tar.gz 101935496 BLAKE2B 5aadaa5eefa1b22dedfe87deb36f8acdbe57962cac8b7b6b20bc76f136ef29f0441e48112010280c2e674a1ae9fd202ca3e07be47cf4a4bc797234d6dc618be5 SHA512 b8860583919bf2f3e0da7ace30fdb0595ab45b85a367be3737e0b15a22a5565b8d6660c652ee070f21c36ac7d17ef3ba8e2eda7ed89bd6a0c65a4df799626d1a
+DIST MIOpen-6.3.0.tar.gz 104152308 BLAKE2B 46c238314393599a1bd4d3c49b0c95386b36cbee1831bf442ab127082b4c740116e81cf643c773627125b59c3974a2344753939b4287aa4adbbc51e4c4833988 SHA512 14ca2967ed6545ad68c362128be93b8e6a9d4aa69e16e989b187463d15351eca2fc437d07e88c41f693138131a7449add607333c698e24efaf0207077e15ae55
DIST gtest-1.11.0_p20210611.tar.gz 887296 BLAKE2B 8f29b7028a6dd8190a113cd93398705b23b61d88bee38beaf9dcc0dfc8a463aed7fcd3719f6f1b131d4363aa57231629aaeffa108f6558efb58416cfface6d6e SHA512 cf9e7f3fd3e31ce6677eac355fb8bfe19c5b56a8ec3af8b9417d0904cdf5da92f99f7411a08131cc9fa4fc7d38e6a71fcfac993648e47b269a74a27de7607f7a
diff --git a/sci-libs/miopen/files/miopen-6.1.1-fix-libcxx.patch b/sci-libs/miopen/files/miopen-6.1.1-fix-libcxx.patch
new file mode 100644
index 000000000000..0ce842d1470a
--- /dev/null
+++ b/sci-libs/miopen/files/miopen-6.1.1-fix-libcxx.patch
@@ -0,0 +1,246 @@
+--- a/cmake/EnableCompilerWarnings.cmake
++++ b/cmake/EnableCompilerWarnings.cmake
+@@ -70,6 +70,7 @@ set(__clang_cxx_compile_options
+ -Wno-unused-command-line-argument
+ -Wno-weak-vtables
+ -Wno-covered-switch-default
++ -Wno-switch-default
+ -Wno-unused-result
+ -Wno-unsafe-buffer-usage
+ -Wno-deprecated-declarations
+--- a/src/include/miopen/bfloat16.hpp
++++ b/src/include/miopen/bfloat16.hpp
+@@ -28,6 +28,7 @@
+ #include <boost/operators.hpp>
+ #include <iostream>
+ #include <miopen/config.h>
++#include <miopen/libcxx_compat.hpp>
+
+ class bfloat16 : boost::totally_ordered<bfloat16, boost::arithmetic<bfloat16>>
+ {
+@@ -152,7 +153,7 @@ private:
+ std::uint16_t data_;
+ };
+
+-namespace std {
++NAMESPACE_STD_BEGIN
+ template <>
+ class numeric_limits<bfloat16>
+ {
+@@ -173,5 +174,5 @@ public:
+ return bfloat16::generate(0x0001); // 0x0.02p-126
+ }
+ };
+-} // namespace std
++NAMESPACE_STD_END
+ #endif
+--- /dev/null
++++ b/src/include/miopen/libcxx_compat.hpp
+@@ -0,0 +1,44 @@
++/*******************************************************************************
++ *
++ * MIT License
++ *
++ * Copyright (c) 2024 Advanced Micro Devices, Inc.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in all
++ * copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ * SOFTWARE.
++ *
++ *******************************************************************************/
++#ifndef LIBCXX_COMPAT_HPP_
++#define LIBCXX_COMPAT_HPP_
++
++// Definitions for libc++ compatibility
++#ifdef __has_include
++#if __has_include (<__config>)
++#include <__config>
++#endif
++#endif
++
++#ifdef _LIBCPP_VERSION
++#define NAMESPACE_STD_BEGIN _LIBCPP_BEGIN_NAMESPACE_STD
++#define NAMESPACE_STD_END _LIBCPP_END_NAMESPACE_STD
++#else
++#define NAMESPACE_STD_BEGIN namespace std {
++#define NAMESPACE_STD_END }
++#endif
++
++#endif
+--- a/src/kernels/hip_float8.hpp
++++ b/src/kernels/hip_float8.hpp
+@@ -26,6 +26,7 @@
+ #pragma once
+
+ #include "miopen_cstdint.hpp"
++#include "libcxx_compat.hpp"
+
+ #ifndef MIOPEN_ENABLE_F8_DEVICE_CODE
+ #define MIOPEN_ENABLE_F8_DEVICE_CODE 0
+@@ -590,7 +591,7 @@ public:
+ // from the precompiled header.
+ #else
+ // NOLINTBEGIN(cert-dcl58-cpp)
+-namespace std {
++NAMESPACE_STD_BEGIN
+ inline bool isfinite(miopen_f8::hip_f8<miopen_f8::hip_f8_type::fp8> x) // NOLINT
+ {
+ return !(x.is_inf() || x.is_nan());
+@@ -611,12 +612,12 @@ inline bool isnan(miopen_f8::hip_f8<miopen_f8::hip_f8_type::bf8> x) // NOLINT
+ return x.is_nan();
+ }
+
+-} // namespace std
++NAMESPACE_STD_END
+ // NOLINTEND(cert-dcl58-cpp)
+ #endif
+
+ // NOLINTBEGIN(cert-dcl58-cpp)
+-namespace std {
++NAMESPACE_STD_BEGIN
+
+ template <typename T>
+ class numeric_limits;
+@@ -633,7 +634,7 @@ class numeric_limits<miopen_f8::hip_f8<miopen_f8::hip_f8_type::bf8>>
+ {
+ };
+
+-} // namespace std
++NAMESPACE_STD_END
+ // NOLINTEND(cert-dcl58-cpp)
+
+ template <miopen_f8::hip_f8_type T>
+--- /dev/null
++++ b/src/kernels/libcxx_compat.hpp
+@@ -0,0 +1,41 @@
++/*******************************************************************************
++ *
++ * MIT License
++ *
++ * Copyright (c) 2024 Advanced Micro Devices, Inc.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in all
++ * copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ * SOFTWARE.
++ *
++ *******************************************************************************/
++#pragma once
++
++// Definitions for libc++ compatibility
++#ifdef __has_include
++#if __has_include (<__config>)
++#include <__config>
++#endif
++#endif
++
++#ifdef _LIBCPP_VERSION
++#define NAMESPACE_STD_BEGIN _LIBCPP_BEGIN_NAMESPACE_STD
++#define NAMESPACE_STD_END _LIBCPP_END_NAMESPACE_STD
++#else
++#define NAMESPACE_STD_BEGIN namespace std {
++#define NAMESPACE_STD_END }
++#endif
+--- a/src/kernels/miopen_limits.hpp
++++ b/src/kernels/miopen_limits.hpp
+@@ -33,8 +33,9 @@
+
+ #define MIOPEN_ENABLE_F8_DEVICE_CODE 1
+ #include "hip_float8.hpp"
++#include "libcxx_compat.hpp"
+
+-namespace std {
++NAMESPACE_STD_BEGIN
+
+ template <typename T>
+ class numeric_limits;
+@@ -91,7 +92,7 @@ public:
+ };
+ #endif
+
+-} // namespace std
++NAMESPACE_STD_END
+
+ #else
+
+--- a/src/kernels/miopen_type_traits.hpp
++++ b/src/kernels/miopen_type_traits.hpp
+@@ -26,8 +26,9 @@
+ #pragma once
+
+ #ifdef MIOPEN_DONT_USE_HIP_RUNTIME_HEADERS
++#include "libcxx_compat.hpp"
+
+-namespace std {
++NAMESPACE_STD_BEGIN
+
+ template <class T>
+ struct remove_reference
+@@ -140,7 +141,7 @@ struct conditional<false, X, Y>
+ template <bool predicate, typename X, typename Y>
+ using conditional_t = typename conditional<predicate, X, Y>::type;
+
+-} // namespace std
++NAMESPACE_STD_END
+ #else
+
+ #include <type_traits> // std::remove_reference, std::remove_cv, is_pointer
+--- a/src/kernels/miopen_utility.hpp
++++ b/src/kernels/miopen_utility.hpp
+@@ -28,8 +28,9 @@
+ #ifdef MIOPEN_DONT_USE_HIP_RUNTIME_HEADERS
+
+ #include "miopen_type_traits.hpp" // std::remove_reference
++#include "libcxx_compat.hpp"
+
+-namespace std {
++NAMESPACE_STD_BEGIN
+
+ template <typename T>
+ constexpr T&& forward(typename remove_reference<T>::type& t_) noexcept
+@@ -43,7 +44,7 @@ constexpr T&& forward(typename remove_reference<T>::type&& t_) noexcept
+ return static_cast<T&&>(t_);
+ }
+
+-} // namespace std
++NAMESPACE_STD_END
+
+ #else
+
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -481,6 +481,7 @@ if( MIOPEN_BACKEND MATCHES "OpenCL" OR MIOPEN_BACKEND STREQUAL "HIPOC" OR MIOPEN
+ kernels/gpr_alloc.inc
+ kernels/hip_atomic.hpp
+ kernels/hip_f8_impl.hpp
++ kernels/libcxx_compat.hpp
+ kernels/hip_float8.hpp
+ kernels/inst_wrappers.inc
+ kernels/miopen_cstdint.hpp
diff --git a/sci-libs/miopen/files/miopen-6.3.0-conditional-ck-components.patch b/sci-libs/miopen/files/miopen-6.3.0-conditional-ck-components.patch
new file mode 100644
index 000000000000..b4332d5a1ca6
--- /dev/null
+++ b/sci-libs/miopen/files/miopen-6.3.0-conditional-ck-components.patch
@@ -0,0 +1,46 @@
+composable_kernel does not build some functions/targets depending on GPU.
+Upstream bug: https://github.com/ROCm/composable_kernel/issues/1646
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -847,10 +847,6 @@ target_include_directories(MIOpen PUBLIC
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/include>
+ )
+
+-if(MIOPEN_USE_COMPOSABLEKERNEL)
+-set(MIOPEN_CK_LINK_FLAGS composable_kernel::device_other_operations composable_kernel::device_gemm_operations composable_kernel::device_conv_operations composable_kernel::device_reduction_operations composable_kernel::device_mha_operations hip::host)
+-endif()
+-
+ if(WIN32)
+ # Refer to https://en.cppreference.com/w/cpp/language/types for details.
+ target_compile_options(MIOpen PRIVATE $<BUILD_INTERFACE:$<$<CXX_COMPILER_ID:Clang>:-U__LP64__>>)
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -327,7 +327,27 @@ add_compile_definitions($<$<COMPILE_LANGUAGE:CXX>:HIP_COMPILER_FLAGS=${HIP_COMPI
+ # HIP
+ if( MIOPEN_BACKEND STREQUAL "HIP" OR MIOPEN_BACKEND STREQUAL "HIPOC" OR MIOPEN_BACKEND STREQUAL "HIPNOGPU")
+ if(MIOPEN_USE_COMPOSABLEKERNEL)
+- find_package(composable_kernel 1.0.0 COMPONENTS device_other_operations device_gemm_operations device_conv_operations device_reduction_operations device_mha_operations)
++ set(MIOPEN_CK_LINK_FLAGS hip::host)
++ set(COMPONENTS_LIST device_other_operations device_gemm_operations device_conv_operations device_reduction_operations device_mha_operations)
++ foreach(component IN LISTS COMPONENTS_LIST)
++ find_package(composable_kernel 1.0.0 COMPONENTS ${component} QUIET)
++ if(TARGET composable_kernel::${component})
++ list(APPEND MIOPEN_CK_LINK_FLAGS "composable_kernel::${component}")
++ else()
++ message(WARNING "CK component '${component}' not found.")
++ endif()
++ endforeach()
++ if(AMDGPU_TARGETS MATCHES "gfx94" OR AMDGPU_TARGETS MATCHES "gfx90a")
++ add_definitions(-DMIOPEN_USE_CK_MHA_OPS=1)
++ else()
++ add_definitions(-DMIOPEN_USE_CK_MHA_OPS=0)
++ endif()
++ if(AMDGPU_TARGETS MATCHES "gfx9")
++ add_definitions(-DMIOPEN_USE_CK_XDL_OPS=1)
++ else()
++ add_definitions(-DMIOPEN_USE_CK_XDL_OPS=0)
++ endif()
++
+ endif()
+ if( MIOPEN_BACKEND STREQUAL "HIPNOGPU")
+ set(MIOPEN_MODE_NOGPU 1)
diff --git a/sci-libs/miopen/files/miopen-6.3.0-isnan-include.patch b/sci-libs/miopen/files/miopen-6.3.0-isnan-include.patch
new file mode 100644
index 000000000000..c7672e96a117
--- /dev/null
+++ b/sci-libs/miopen/files/miopen-6.3.0-isnan-include.patch
@@ -0,0 +1,19 @@
+--- a/driver/reducecalculation_driver.hpp
++++ b/driver/reducecalculation_driver.hpp
+@@ -34,6 +34,7 @@
+ #include <algorithm>
+ #include <cfloat>
+ #include <cstdlib>
++#include <cmath>
+ #include <memory>
+ #include <miopen/miopen.h>
+ #include <miopen/tensor.hpp>
+@@ -77,7 +78,7 @@ int32_t mloReduceCalculationForwardRunHost(miopenTensorDescriptor_t inputDesc,
+ for(size_t i = 0; i < reduce_size; ++i)
+ {
+ Tcheck val = static_cast<Tcheck>(input[input_idx]);
+- if(nanPropagation && isnan(val))
++ if(nanPropagation && std::isnan(val))
+ {
+ val = 0.0f;
+ }
diff --git a/sci-libs/miopen/metadata.xml b/sci-libs/miopen/metadata.xml
index e08e7753394d..07d78ddb5aa1 100644
--- a/sci-libs/miopen/metadata.xml
+++ b/sci-libs/miopen/metadata.xml
@@ -19,4 +19,10 @@
<upstream>
<remote-id type="github">ROCm/MIOpen</remote-id>
</upstream>
+ <use>
+ <flag name="composable-kernel">Use composable-kernel for GEMM-like and reduction-like operators.</flag>
+ <flag name="hipblaslt">Use hipBLASLt for some non-batched and strided batched problems.</flag>
+ <flag name="rocblas">Build with rocBLAS support</flag>
+ <flag name="roctracer">Build with roctracer support</flag>
+ </use>
</pkgmetadata>
diff --git a/sci-libs/miopen/miopen-6.1.1.ebuild b/sci-libs/miopen/miopen-6.1.1.ebuild
index f272f435ece8..6cf70cea3434 100644
--- a/sci-libs/miopen/miopen-6.1.1.ebuild
+++ b/sci-libs/miopen/miopen-6.1.1.ebuild
@@ -21,7 +21,7 @@ IUSE="debug test"
RESTRICT="!test? ( test )"
RDEPEND="
- dev-util/hip
+ dev-util/hip:${SLOT}
>=dev-db/sqlite-3.17
sci-libs/rocBLAS:${SLOT}[${ROCM_USEDEP}]
sci-libs/composable-kernel:${SLOT}[${ROCM_USEDEP}]
diff --git a/sci-libs/miopen/miopen-6.1.1.ebuild b/sci-libs/miopen/miopen-6.3.0.ebuild
similarity index 59%
copy from sci-libs/miopen/miopen-6.1.1.ebuild
copy to sci-libs/miopen/miopen-6.3.0.ebuild
index f272f435ece8..45b1214c37cd 100644
--- a/sci-libs/miopen/miopen-6.1.1.ebuild
+++ b/sci-libs/miopen/miopen-6.3.0.ebuild
@@ -4,7 +4,7 @@
EAPI=8
ROCM_VERSION=${PV}
-LLVM_COMPAT=( 18 )
+LLVM_COMPAT=( 19 )
inherit cmake flag-o-matic llvm-r1 rocm
@@ -17,18 +17,26 @@ LICENSE="MIT"
SLOT="0/$(ver_cut 1-2)"
KEYWORDS="~amd64"
-IUSE="debug test"
-RESTRICT="!test? ( test )"
+IUSE="composable-kernel debug hipblaslt rocblas roctracer test"
+
+# tests can freeze machine depending on gpu/kernel
+RESTRICT="test"
RDEPEND="
- dev-util/hip
+ dev-util/hip:${SLOT}
>=dev-db/sqlite-3.17
- sci-libs/rocBLAS:${SLOT}[${ROCM_USEDEP}]
- sci-libs/composable-kernel:${SLOT}[${ROCM_USEDEP}]
- dev-util/roctracer:${SLOT}[${ROCM_USEDEP}]
+ sci-libs/rocRAND:${SLOT}[${ROCM_USEDEP}]
>=dev-libs/boost-1.72
dev-cpp/nlohmann_json
dev-cpp/frugally-deep
+
+ composable-kernel? ( sci-libs/composable-kernel:${SLOT}[${ROCM_USEDEP}] )
+ hipblaslt? (
+ sci-libs/hipBLAS:${SLOT}[${ROCM_USEDEP}]
+ sci-libs/hipBLASLt:${SLOT}
+ )
+ rocblas? ( sci-libs/rocBLAS:${SLOT}[${ROCM_USEDEP}] )
+ roctracer? ( dev-util/roctracer:${SLOT}[${ROCM_USEDEP}] )
"
DEPEND="${RDEPEND}"
@@ -41,11 +49,27 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-6.1.1-build-all-tests.patch
+ "${FILESDIR}"/${PN}-6.1.1-fix-libcxx.patch
+ "${FILESDIR}"/${PN}-6.3.0-conditional-ck-components.patch
+ "${FILESDIR}"/${PN}-6.3.0-isnan-include.patch
)
src_prepare() {
cmake_src_prepare
+ # complementary replacements for conditional-ck-components patch
+ find src -name '*mha*.cpp' -type f | while IFS= read -r file; do
+ sed -i "s/MIOPEN_USE_COMPOSABLEKERNEL/MIOPEN_USE_CK_MHA_OPS/g" "$file" || die
+ done
+
+ sed -i "s/MIOPEN_USE_COMPOSABLEKERNEL/MIOPEN_USE_CK_XDL_OPS/g" \
+ src/mlo_dir_conv.cpp \
+ src/solver/conv_ck_igemm_fwd_bias_res_add_activ_fused.cpp \
+ src/solver/conv_ck_igemm_fwd_bias_activ_fused.cpp || die
+ find src -name '*xdl*.cpp' -type f | while IFS= read -r file; do
+ sed -i "s/MIOPEN_USE_COMPOSABLEKERNEL/MIOPEN_USE_CK_XDL_OPS/g" "$file" || die
+ done
+
sed -e '/MIOPEN_TIDY_ERRORS ALL/d' \
-e 's/FLAGS_RELEASE} -s/FLAGS_RELEASE}/g' \
-i CMakeLists.txt || die
@@ -75,6 +99,10 @@ src_configure() {
-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)
-DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF
-DROCM_SYMLINK_LIBS=OFF
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/miopen/files/, sci-libs/miopen/
@ 2025-02-13 8:38 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2025-02-13 8:38 UTC (permalink / raw
To: gentoo-commits
commit: 1bf7917de4d3cc29af93db1e3b4966ebcb8929ad
Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Thu Jan 30 14:15:28 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 13 08:35:19 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bf7917d
sci-libs/miopen: drop 5.1.3-r1
Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
sci-libs/miopen/Manifest | 1 -
.../files/miopen-5.0.2-strip-xnack-in-flags.patch | 20 --
....3-avoid-metadata-error-for-vanilla-clang.patch | 183 ----------
.../files/miopen-5.1.3-deprecate-clang-ocl.patch | 55 ---
sci-libs/miopen/files/miopen-5.1.3-gfx1031.patch | 375 ---------------------
sci-libs/miopen/miopen-5.1.3-r1.ebuild | 110 ------
6 files changed, 744 deletions(-)
diff --git a/sci-libs/miopen/Manifest b/sci-libs/miopen/Manifest
index 9dea432f1133..98fe8093b07f 100644
--- a/sci-libs/miopen/Manifest
+++ b/sci-libs/miopen/Manifest
@@ -1,4 +1,3 @@
-DIST MIOpen-5.1.3.tar.gz 88118329 BLAKE2B d24722ffc5f5dab6d6a1de2ce34193ad2f25c9a2562e38c52e010a29870f01d9ea1c56970ba0601a088c8286e97958ee95d0da27fc8082126dd2ebe5ccb36b70 SHA512 a14e28cfcb12e5061e0e7b999ef3e67fa0a0e897e31bc50e7288b8a23eb1791312e33d3b697021c2b654ccc065ae1b046c1cfd77ba8e04b0f3e87e9cc0626dcd
DIST MIOpen-5.7.1.tar.gz 100751593 BLAKE2B c5f847fe4374ab22737c281a65401125012328412d584fc09244b431ea6265d6d5028429115ee15fa8b04cbe0edd020e4e7ac8deb22561183ed76cb8c3d4d9d4 SHA512 3354b3b154f29a6337403abc5a71ec47c0b2558320c5a1b0cbfbbdb370c4fada2db12d4a19a312b5e30ca2e2302ee50ece3390603e84d132b2212a168e9523fa
DIST MIOpen-6.1.1.tar.gz 101935496 BLAKE2B 5aadaa5eefa1b22dedfe87deb36f8acdbe57962cac8b7b6b20bc76f136ef29f0441e48112010280c2e674a1ae9fd202ca3e07be47cf4a4bc797234d6dc618be5 SHA512 b8860583919bf2f3e0da7ace30fdb0595ab45b85a367be3737e0b15a22a5565b8d6660c652ee070f21c36ac7d17ef3ba8e2eda7ed89bd6a0c65a4df799626d1a
DIST MIOpen-6.3.0.tar.gz 104152308 BLAKE2B 46c238314393599a1bd4d3c49b0c95386b36cbee1831bf442ab127082b4c740116e81cf643c773627125b59c3974a2344753939b4287aa4adbbc51e4c4833988 SHA512 14ca2967ed6545ad68c362128be93b8e6a9d4aa69e16e989b187463d15351eca2fc437d07e88c41f693138131a7449add607333c698e24efaf0207077e15ae55
diff --git a/sci-libs/miopen/files/miopen-5.0.2-strip-xnack-in-flags.patch b/sci-libs/miopen/files/miopen-5.0.2-strip-xnack-in-flags.patch
deleted file mode 100644
index 14d2c5b9daa5..000000000000
--- a/sci-libs/miopen/files/miopen-5.0.2-strip-xnack-in-flags.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-if options like :xnack- exists in ${AMDGPU_TARGETS}, CMakeLists cannot handle HIP_COMPILER_FLAGS well
-
-the original regex replace should include :+- so xnack- is stripped as well. Otherwise clang complation at MIOpen runtime will fail.
-
-Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
-Index: MIOpen-rocm-5.0.2/CMakeLists.txt
-===================================================================
---- MIOpen-rocm-5.0.2.orig/CMakeLists.txt
-+++ MIOpen-rocm-5.0.2/CMakeLists.txt
-@@ -198,8 +198,8 @@ find_package(hip REQUIRED PATHS /opt/roc
- message(STATUS "Build with HIP ${hip_VERSION}")
- target_flags(HIP_COMPILER_FLAGS hip::device)
- # Remove cuda arch flags
--string(REGEX REPLACE --cuda-gpu-arch=[a-z0-9]+ "" HIP_COMPILER_FLAGS "${HIP_COMPILER_FLAGS}")
--string(REGEX REPLACE --offload-arch=[a-z0-9]+ "" HIP_COMPILER_FLAGS "${HIP_COMPILER_FLAGS}")
-+string(REGEX REPLACE --cuda-gpu-arch=[a-z0-9:+-]+ "" HIP_COMPILER_FLAGS "${HIP_COMPILER_FLAGS}")
-+string(REGEX REPLACE --offload-arch=[a-z0-9:+-]+ "" HIP_COMPILER_FLAGS "${HIP_COMPILER_FLAGS}")
- string(REPLACE "$<LINK_LANGUAGE:CXX>" "1" HIP_COMPILER_FLAGS "${HIP_COMPILER_FLAGS}")
- string(REPLACE "SHELL:" "" HIP_COMPILER_FLAGS "${HIP_COMPILER_FLAGS}")
-
diff --git a/sci-libs/miopen/files/miopen-5.1.3-avoid-metadata-error-for-vanilla-clang.patch b/sci-libs/miopen/files/miopen-5.1.3-avoid-metadata-error-for-vanilla-clang.patch
deleted file mode 100644
index 3dca20f1fb12..000000000000
--- a/sci-libs/miopen/files/miopen-5.1.3-avoid-metadata-error-for-vanilla-clang.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-Together with find-sed command in 5.1.3 ebuild, this fixes
-https://github.com/ROCmSoftwarePlatform/MIOpen/issues/1731
-index 71b2cabf1..60e7fab6e 100644
---- a/src/kernels/Conv_Winograd_v13_3_12_epilogue.inc
-+++ b/src/kernels/Conv_Winograd_v13_3_12_epilogue.inc
-@@ -76,7 +76,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/Conv_Winograd_v16_5_0_epilogue.inc b/src/kernels/Conv_Winograd_v16_5_0_epilogue.inc
-index 36d47c862..f8f677ec6 100644
---- a/src/kernels/Conv_Winograd_v16_5_0_epilogue.inc
-+++ b/src/kernels/Conv_Winograd_v16_5_0_epilogue.inc
-@@ -76,7 +76,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/Conv_Winograd_v21_1_3_metadata.inc b/src/kernels/Conv_Winograd_v21_1_3_metadata.inc
-index deff81e84..ed47abea7 100644
---- a/src/kernels/Conv_Winograd_v21_1_3_metadata.inc
-+++ b/src/kernels/Conv_Winograd_v21_1_3_metadata.inc
-@@ -51,7 +51,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/conv1x1u.s b/src/kernels/conv1x1u.s
-index 5dc213546..c890d45a4 100644
---- a/src/kernels/conv1x1u.s
-+++ b/src/kernels/conv1x1u.s
-@@ -1076,7 +1076,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/conv1x1u_bias_activ.s b/src/kernels/conv1x1u_bias_activ.s
-index 1675e819a..6bbdd9936 100644
---- a/src/kernels/conv1x1u_bias_activ.s
-+++ b/src/kernels/conv1x1u_bias_activ.s
-@@ -1230,7 +1230,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/conv1x1u_stride2.s b/src/kernels/conv1x1u_stride2.s
-index c5ea1e90c..6241edcf7 100644
---- a/src/kernels/conv1x1u_stride2.s
-+++ b/src/kernels/conv1x1u_stride2.s
-@@ -1162,7 +1162,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/conv1x1wrw.s b/src/kernels/conv1x1wrw.s
-index b13b6ffa4..eb63f17c6 100644
---- a/src/kernels/conv1x1wrw.s
-+++ b/src/kernels/conv1x1wrw.s
-@@ -1243,7 +1243,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/conv3x3wrw.s b/src/kernels/conv3x3wrw.s
-index a3f73aeae..b6fb1632c 100755
---- a/src/kernels/conv3x3wrw.s
-+++ b/src/kernels/conv3x3wrw.s
-@@ -1033,7 +1033,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/conv_3x3_wheel_alpha_v3_0b_epilogue.inc b/src/kernels/conv_3x3_wheel_alpha_v3_0b_epilogue.inc
-index 358772e63..b27ad5284 100644
---- a/src/kernels/conv_3x3_wheel_alpha_v3_0b_epilogue.inc
-+++ b/src/kernels/conv_3x3_wheel_alpha_v3_0b_epilogue.inc
-@@ -76,7 +76,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/conv_3x3_wheel_alpha_v7_0_3b_epilogue.inc b/src/kernels/conv_3x3_wheel_alpha_v7_0_3b_epilogue.inc
-index d3296969a..f873ce153 100644
---- a/src/kernels/conv_3x3_wheel_alpha_v7_0_3b_epilogue.inc
-+++ b/src/kernels/conv_3x3_wheel_alpha_v7_0_3b_epilogue.inc
-@@ -76,7 +76,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/conv_3x3_wheel_alpha_v9_0_15_epilogue.inc b/src/kernels/conv_3x3_wheel_alpha_v9_0_15_epilogue.inc
-index a253cc0f9..1582d002c 100644
---- a/src/kernels/conv_3x3_wheel_alpha_v9_0_15_epilogue.inc
-+++ b/src/kernels/conv_3x3_wheel_alpha_v9_0_15_epilogue.inc
-@@ -76,7 +76,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/conv_3x3_wheel_alpha_v9_2_7_epilogue.inc b/src/kernels/conv_3x3_wheel_alpha_v9_2_7_epilogue.inc
-index e40ac1f60..78495e024 100644
---- a/src/kernels/conv_3x3_wheel_alpha_v9_2_7_epilogue.inc
-+++ b/src/kernels/conv_3x3_wheel_alpha_v9_2_7_epilogue.inc
-@@ -76,7 +76,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/xform_bidirect_winograd_code.inc b/src/kernels/xform_bidirect_winograd_code.inc
-index 724845f49..d03314ef5 100644
---- a/src/kernels/xform_bidirect_winograd_code.inc
-+++ b/src/kernels/xform_bidirect_winograd_code.inc
-@@ -1566,7 +1566,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
-diff --git a/src/kernels/xform_metadata.inc b/src/kernels/xform_metadata.inc
-index 960a9a2d8..83b736bee 100644
---- a/src/kernels/xform_metadata.inc
-+++ b/src/kernels/xform_metadata.inc
-@@ -74,7 +74,7 @@ amdhsa.kernels:
- .max_flat_workgroup_size: \wg_x
- .wavefront_size: 64
- .args:
-- - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: N }
-+ - { .size: 4, .offset: 0, .value_kind: by_value, .value_type: i32, .name: X }
- - { .size: 4, .offset: 4, .value_kind: by_value, .value_type: i32, .name: C }
- - { .size: 4, .offset: 8, .value_kind: by_value, .value_type: i32, .name: H }
- - { .size: 4, .offset: 12, .value_kind: by_value, .value_type: i32, .name: W }
diff --git a/sci-libs/miopen/files/miopen-5.1.3-deprecate-clang-ocl.patch b/sci-libs/miopen/files/miopen-5.1.3-deprecate-clang-ocl.patch
deleted file mode 100644
index 93c66fd3ef05..000000000000
--- a/sci-libs/miopen/files/miopen-5.1.3-deprecate-clang-ocl.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-This is a cherry picked PR on 5.1.3, which replace clang-ocl with clang
-From 98f001dfe61208af04ecf7690023efd772ee7d43 Mon Sep 17 00:00:00 2001
-From: Jehandad Khan <jahandad@gmail.com>
-Date: Tue, 19 Jul 2022 17:24:05 -0500
-Subject: [PATCH] Remove clang-ocl and replace with clang
-
----
- CMakeLists.txt | 7 +------
- README.md | 1 -
- src/hipoc/hipoc_program.cpp | 7 ++++++-
- 3 files changed, 7 insertions(+), 8 deletions(-)
-
-Index: MIOpen-rocm-5.1.3/CMakeLists.txt
-===================================================================
---- MIOpen-rocm-5.1.3.orig/CMakeLists.txt
-+++ MIOpen-rocm-5.1.3/CMakeLists.txt
-@@ -241,7 +241,7 @@ if( MIOPEN_BACKEND STREQUAL "HIP" OR MIO
- # miopentensile default off
- set(MIOPEN_USE_MIOPENTENSILE OFF CACHE BOOL "")
-
-- find_program(HIP_OC_COMPILER clang-ocl
-+ find_program(HIP_OC_COMPILER clang
- PATH_SUFFIXES bin
- PATHS
- /opt/rocm
-Index: MIOpen-rocm-5.1.3/README.md
-===================================================================
---- MIOpen-rocm-5.1.3.orig/README.md
-+++ MIOpen-rocm-5.1.3/README.md
-@@ -14,7 +14,6 @@ MIOpen supports two programming models -
- * OpenCL - OpenCL libraries and header files
- * HIP -
- * HIP and HCC libraries and header files
-- * [clang-ocl](https://github.com/RadeonOpenCompute/clang-ocl) -- **required**
- * [MIOpenGEMM](https://github.com/ROCmSoftwarePlatform/MIOpenGEMM) to enable various functionalities including transposed and dilated convolutions. This is optional on the HIP backend. Users can enable this library using the cmake configuration flag `-DMIOPEN_USE_MIOPENGEMM=On`.
- * ROCm cmake modules can be installed from [here](https://github.com/RadeonOpenCompute/rocm-cmake)
- * [Half](http://half.sourceforge.net/) - IEEE 754-based half-precision floating point library
-Index: MIOpen-rocm-5.1.3/src/hipoc/hipoc_program.cpp
-===================================================================
---- MIOpen-rocm-5.1.3.orig/src/hipoc/hipoc_program.cpp
-+++ MIOpen-rocm-5.1.3/src/hipoc/hipoc_program.cpp
-@@ -255,7 +255,12 @@ void HIPOCProgramImpl::BuildCodeObjectIn
- if(miopen::IsEnabled(MIOPEN_DEBUG_OPENCL_WAVE64_NOWGP{}))
- params += " -mwavefrontsize64 -mcumode";
- WriteFile(src, dir->path / filename);
-- dir->Execute(HIP_OC_COMPILER, params + " " + filename + " -o " + hsaco_file.string());
-+ params += " -target amdgcn-amd-amdhsa -x cl -D__AMD__=1 -O3";
-+ params += " -cl-kernel-arg-info -cl-denorms-are-zero";
-+ params += " -cl-std=CL1.2 -mllvm -amdgpu-early-inline-all";
-+ params += " -mllvm -amdgpu-internalize-symbols ";
-+ params += " " + filename + " -o " + hsaco_file.string();
-+ dir->Execute(HIP_OC_COMPILER, params);
- }
- if(!boost::filesystem::exists(hsaco_file))
- MIOPEN_THROW("Cant find file: " + hsaco_file.string());
diff --git a/sci-libs/miopen/files/miopen-5.1.3-gfx1031.patch b/sci-libs/miopen/files/miopen-5.1.3-gfx1031.patch
deleted file mode 100644
index de22d66d887a..000000000000
--- a/sci-libs/miopen/files/miopen-5.1.3-gfx1031.patch
+++ /dev/null
@@ -1,375 +0,0 @@
-Enable gfx1031 support
-======================
---- MIOpen-rocm-5.1.3/fin/src/include/conv_fin.hpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/fin/src/include/conv_fin.hpp 2022-09-01 18:36:18.630980283 +0800
-@@ -111,6 +111,10 @@ class ConvFin : public Fin
- {
- assert(num_cu == 72 || num_cu == 36);
- }
-+ else if(arch == "gfx1031")
-+ {
-+ assert(num_cu == 40 || num_cu == 20);
-+ }
- else if(arch == "gfx90a")
- {
- assert(num_cu == 110);
-Only in MIOpen-rocm-5.1.3: patches
---- MIOpen-rocm-5.1.3/src/composable_kernel/composable_kernel/include/utility/config.hpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/composable_kernel/composable_kernel/include/utility/config.hpp 2022-09-01 18:36:18.634980274 +0800
-@@ -13,7 +13,7 @@
- // GPU target
- // should enable one and only one GPU target
- #if !(defined(CK_AMD_GPU_GFX803) || defined(CK_AMD_GPU_GFX900) || defined(CK_AMD_GPU_GFX906) || \
-- defined(CK_AMD_GPU_GFX908) || defined(CK_AMD_GPU_GFX90A) || defined(CK_AMD_GPU_GFX1030))
-+ defined(CK_AMD_GPU_GFX908) || defined(CK_AMD_GPU_GFX90A) || defined(CK_AMD_GPU_GFX1030) || defined(CK_AMD_GPU_GFX1031))
- #error Need to define (only) one GPU target
- #endif
-
-@@ -29,7 +29,7 @@
- #if defined(CK_AMD_GPU_GFX803) || defined(CK_AMD_GPU_GFX900) || defined(CK_AMD_GPU_GFX906) || \
- defined(CK_AMD_GPU_GFX908) || defined(CK_AMD_GPU_GFX90A)
- #define CK_BUFFER_RESOURCE_3RD_DWORD 0x00020000
--#elif defined(CK_AMD_GPU_GFX1030)
-+#elif (defined(CK_AMD_GPU_GFX1030) || defined(CK_AMD_GPU_GFX1031))
- #define CK_BUFFER_RESOURCE_3RD_DWORD 0x31014000
- #endif
-
-@@ -37,7 +37,7 @@
- #if defined(CK_AMD_GPU_GFX803) || defined(CK_AMD_GPU_GFX900)
- #define CK_USE_AMD_V_MAC_F32
- #elif defined(CK_AMD_GPU_GFX906) || defined(CK_AMD_GPU_GFX908) || defined(CK_AMD_GPU_GFX90a) || \
-- defined(CK_AMD_GPU_GFX1030)
-+ (defined(CK_AMD_GPU_GFX1030) || defined(CK_AMD_GPU_GFX1031))
- #define CK_USE_AMD_V_FMAC_F32
- #define CK_USE_AMD_V_DOT2_F32_F16
- #define CK_USE_AMD_V_DOT4_I32_I8
---- MIOpen-rocm-5.1.3/src/include/miopen/solver/ck_utility_common.hpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/include/miopen/solver/ck_utility_common.hpp 2022-09-01 18:36:18.638980266 +0800
-@@ -54,6 +54,7 @@ static inline bool is_ck_supported_hardw
- StartsWith(handle.GetDeviceName(), "gfx908") ||
- StartsWith(handle.GetDeviceName(), "gfx90a") ||
- StartsWith(handle.GetDeviceName(), "gfx1030");
-+ StartsWith(handle.GetDeviceName(), "gfx1031");
- }
-
- static inline bool is_support_amd_buffer_atomic_fadd(const std::string& device_name)
-@@ -83,6 +84,8 @@ static inline auto get_ck_common_compile
- compiler_flag << " -DCK_AMD_GPU_GFX90A";
- else if(StartsWith(device_name, "gfx1030"))
- compiler_flag << " -DCK_AMD_GPU_GFX1030";
-+ else if(StartsWith(device_name, "gfx1031"))
-+ compiler_flag << " -DCK_AMD_GPU_GFX1031";
-
- // buffer atomic-fadd
- compiler_flag << " -DCK_USE_AMD_BUFFER_ATOMIC_FADD="
---- MIOpen-rocm-5.1.3/src/include/miopen/solver/implicitgemm_util.hpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/include/miopen/solver/implicitgemm_util.hpp 2022-09-01 18:36:18.638980266 +0800
-@@ -469,7 +469,7 @@ static inline bool is_use_amd_buffer_loa
- {
- #if WORKAROUND_MIOPEN_ISSUE_557
- const auto device_name = ctx.GetStream().GetDeviceName();
-- return !StartsWith(device_name, "gfx1030");
-+ return !StartsWith(device_name, "gfx1030") && !StartsWith(device_name, "gfx1031");
- #else
- return true;
- #endif
-@@ -478,7 +478,7 @@ static inline bool is_use_amd_buffer_loa
- static inline bool is_use_v_fmac_f32(const ConvolutionContext& ctx)
- {
- const auto device_name = ctx.GetStream().GetDeviceName();
-- return StartsWith(device_name, "gfx1030");
-+ return StartsWith(device_name, "gfx1030") || StartsWith(device_name, "gfx1031");
- }
-
- static inline bool support_amd_buffer_atomic_fadd(const std::string& device_name)
-@@ -599,7 +599,8 @@ static inline bool IsComposableKernelSup
- StartsWith(c.GetStream().GetDeviceName(), "gfx906") ||
- StartsWith(c.GetStream().GetDeviceName(), "gfx908") ||
- StartsWith(c.GetStream().GetDeviceName(), "gfx90a") ||
-- StartsWith(c.GetStream().GetDeviceName(), "gfx1030");
-+ StartsWith(c.GetStream().GetDeviceName(), "gfx1030")||
-+ StartsWith(c.GetStream().GetDeviceName(), "gfx1031");
- }
-
- // greatest common divisor, aka highest common factor
---- MIOpen-rocm-5.1.3/src/kernels/batchnorm_functions.h 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/kernels/batchnorm_functions.h 2022-09-01 18:36:18.858979772 +0800
-@@ -159,6 +159,10 @@
- #define MIO_BN_GFX1030 0
- #endif
-
-+#ifndef MIO_BN_GFX1031
-+#define MIO_BN_GFX1031 0
-+#endif
-+
- #define UNUSED __attribute__((__unused__))
-
- #if(MIO_BN_VARIANT != 4)
---- MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormActivBwdPerAct.cl 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/kernels/MIOpenBatchNormActivBwdPerAct.cl 2022-09-01 18:36:18.858979772 +0800
-@@ -34,7 +34,7 @@
- #endif
-
- #define MIOPEN_USE_AMDGCN 0
--#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1
-+#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1
- #undef MIOPEN_USE_AMDGCN
- #define MIOPEN_USE_AMDGCN 1
- #endif
---- MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormActivBwdSpatial.cl 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/kernels/MIOpenBatchNormActivBwdSpatial.cl 2022-09-01 18:36:18.858979772 +0800
-@@ -32,7 +32,7 @@
- #endif
-
- #define MIOPEN_USE_AMDGCN 0
--#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1
-+#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1
- #undef MIOPEN_USE_AMDGCN
- #define MIOPEN_USE_AMDGCN 1
- #endif
---- MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormActivFwdTrainSpatial.cl 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/kernels/MIOpenBatchNormActivFwdTrainSpatial.cl 2022-09-01 18:36:18.858979772 +0800
-@@ -33,7 +33,7 @@
- #endif
-
- #define MIOPEN_USE_AMDGCN 0
--#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1
-+#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1
- #undef MIOPEN_USE_AMDGCN
- #define MIOPEN_USE_AMDGCN 1
- #endif
---- MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormBwdSpatial.cl 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/kernels/MIOpenBatchNormBwdSpatial.cl 2022-09-01 18:36:18.858979772 +0800
-@@ -33,7 +33,7 @@
- #endif
-
- #define MIOPEN_USE_AMDGCN 0
--#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1
-+#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1
- #undef MIOPEN_USE_AMDGCN
- #define MIOPEN_USE_AMDGCN 1
- #endif
---- MIOpen-rocm-5.1.3/src/kernels/MIOpenBatchNormFwdTrainSpatial.cl 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/kernels/MIOpenBatchNormFwdTrainSpatial.cl 2022-09-01 18:36:18.858979772 +0800
-@@ -33,7 +33,7 @@
- #endif
-
- #define MIOPEN_USE_AMDGCN 0
--#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1
-+#if defined(__AMDGCN__) && MIO_BN_GFX1030 != 1 && MIO_BN_GFX1031 != 1
- #undef MIOPEN_USE_AMDGCN
- #define MIOPEN_USE_AMDGCN 1
- #endif
---- MIOpen-rocm-5.1.3/src/md_graph.cpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/md_graph.cpp 2022-09-01 18:36:18.630980283 +0800
-@@ -738,8 +738,8 @@ void FusionMDGraph::InitConv(FusionMDGra
-
- add_v21_wino("gfx9", {"gfx900", "gfx906", "gfx908", "gfx90a"}, 1);
- add_v21_wino("gfx9", {"gfx900", "gfx906", "gfx908", "gfx90a"}, 2);
-- add_v21_wino("gfx10", {"gfx1011", "gfx1012", "gfx1030"}, 1);
-- add_v21_wino("gfx10", {"gfx1011", "gfx1012", "gfx1030"}, 2);
-+ add_v21_wino("gfx10", {"gfx1011", "gfx1012", "gfx1030", "gfx1031"}, 1);
-+ add_v21_wino("gfx10", {"gfx1011", "gfx1012", "gfx1030", "gfx1031"}, 2);
- }
- }
-
---- MIOpen-rocm-5.1.3/src/ocl/fusionopbiasbnactivocl.cpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/ocl/fusionopbiasbnactivocl.cpp 2022-09-01 18:36:18.634980274 +0800
-@@ -392,7 +392,8 @@ miopenStatus_t BatchNormBwdTrainFusionOp
- " -DMIO_BN_USESAVED=" + std::to_string(static_cast<int>(true)) +
- " -DMIO_BN_VARIANT=" + std::to_string(variant) +
- " -DMIO_BN_CBA_WRITE_INTERMEDIATE=" + std::to_string(0) +
-- " -DMIO_BN_GFX1030=" + ((handle.GetDeviceName() == "gfx1030") ? "1" : "0");
-+ " -DMIO_BN_GFX1030=" + ((handle.GetDeviceName() == "gfx1030") ? "1" : "0") +
-+ " -DMIO_BN_GFX1031=" + ((handle.GetDeviceName() == "gfx1031") ? "1" : "0");
-
- compile_config += add;
- MIOPEN_LOG_I2(add);
-@@ -607,7 +608,8 @@ miopenStatus_t BatchNormFwdTrainFusionOp
- " -DMIO_SAVE_MEAN_VARIANCE=" + (saveBatchStats ? "1" : "0") +
- " -DMIO_RUNNING_RESULT=" + ((savePopStats) ? "1" : "0") +
- " -DMIO_BN_VARIANT=" + std::to_string(variant) +
-- " -DMIO_BN_GFX1030=" + ((handle.GetDeviceName() == "gfx1030") ? "1" : "0");
-+ " -DMIO_BN_GFX1030=" + ((handle.GetDeviceName() == "gfx1030") ? "1" : "0") +
-+ " -DMIO_BN_GFX1031=" + ((handle.GetDeviceName() == "gfx1031") ? "1" : "0");
-
- compile_config += add;
- MIOPEN_LOG_I2(add);
---- MIOpen-rocm-5.1.3/src/solver/batchnorm/backward_per_activation.cpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/solver/batchnorm/backward_per_activation.cpp 2022-09-01 18:36:18.638980266 +0800
-@@ -113,6 +113,7 @@ BnBwdTrainingPerActivation::GetSolution(
- {"MIO_BN_GRP1", ylocalsize},
- {"MIO_BN_GRP2", zlocalsize},
- {"MIO_BN_GFX1030", ((handle.GetDeviceName() == "gfx1030") ? "1" : "0")},
-+ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")},
- };
-
- kernel.comp_options = build_params.GenerateFor(kbp::OpenCL{});
---- MIOpen-rocm-5.1.3/src/solver/batchnorm/backward_spatial_multiple.cpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/solver/batchnorm/backward_spatial_multiple.cpp 2022-09-01 18:36:18.638980266 +0800
-@@ -210,6 +210,7 @@ ConvSolution BnBwdTrainingSpatialMultipl
- {"MIO_BN_GRP1", ylocalsize},
- {"MIO_BN_GRP2", zlocalsize},
- {"MIO_BN_GFX1030", ((handle.GetDeviceName() == "gfx1030") ? "1" : "0")},
-+ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")},
- {"MIO_LAYOUT_NHWC", static_cast<int>(problem.IsLayoutNHWC())},
- };
-
---- MIOpen-rocm-5.1.3/src/solver/batchnorm/backward_spatial_single.cpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/solver/batchnorm/backward_spatial_single.cpp 2022-09-01 18:36:18.638980266 +0800
-@@ -247,6 +247,7 @@ BnBwdTrainingSpatialSingle::GetSolution(
-
- build_params << KernelBuildParameters{
- {"MIO_BN_GFX1030", (handle.GetDeviceName() == "gfx1030") ? "1" : "0"},
-+ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")},
- };
-
- kernel.comp_options = build_params.GenerateFor(kbp::OpenCL{});
---- MIOpen-rocm-5.1.3/src/solver/batchnorm/forward_inference.cpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/solver/batchnorm/forward_inference.cpp 2022-09-01 18:36:18.638980266 +0800
-@@ -103,6 +103,7 @@ ConvSolution BnFwdInference::GetSolution
- {"MIO_BN_GRP1", ylocalsize},
- {"MIO_BN_GRP2", zlocalsize},
- {"MIO_BN_GFX1030", ((handle.GetDeviceName() == "gfx1030") ? "1" : "0")},
-+ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")},
- };
-
- kernel.comp_options = build_params.GenerateFor(kbp::OpenCL{});
---- MIOpen-rocm-5.1.3/src/solver/batchnorm/forward_per_activation.cpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/solver/batchnorm/forward_per_activation.cpp 2022-09-01 18:36:18.638980266 +0800
-@@ -105,6 +105,7 @@ BnFwdTrainingPerActivation::GetSolution(
- {"MIO_BN_GRP1", ylocalsize},
- {"MIO_BN_GRP2", zlocalsize},
- {"MIO_BN_GFX1030", ((handle.GetDeviceName() == "gfx1030") ? "1" : "0")},
-+ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")},
- };
-
- auto kernel = KernelInfo{};
---- MIOpen-rocm-5.1.3/src/solver/batchnorm/forward_spatial_multiple.cpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/solver/batchnorm/forward_spatial_multiple.cpp 2022-09-01 18:36:18.638980266 +0800
-@@ -177,6 +177,7 @@ ConvSolution BnFwdTrainingSpatialMultipl
- {"MIO_BN_GRP1", ylocalsize},
- {"MIO_BN_GRP2", zlocalsize},
- {"MIO_BN_GFX1030", ((handle.GetDeviceName() == "gfx1030") ? "1" : "0")},
-+ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")},
- {"MIO_LAYOUT_NHWC", static_cast<int>(problem.IsLayoutNHWC())},
- };
-
---- MIOpen-rocm-5.1.3/src/solver/batchnorm/forward_spatial_single.cpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/solver/batchnorm/forward_spatial_single.cpp 2022-09-01 18:36:18.638980266 +0800
-@@ -211,6 +211,7 @@ BnFwdTrainingSpatialSingle::GetSolution(
- {"MIO_BN_GRP1", ylocalsize},
- {"MIO_BN_GRP2", zlocalsize},
- {"MIO_BN_GFX1030", ((handle.GetDeviceName() == "gfx1030") ? "1" : "0")},
-+ {"MIO_BN_GFX1031", ((handle.GetDeviceName() == "gfx1031") ? "1" : "0")},
- {"MIO_LAYOUT_NHWC", static_cast<int>(problem.IsLayoutNHWC())},
- };
-
---- MIOpen-rocm-5.1.3/src/target_properties.cpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/src/target_properties.cpp 2022-09-01 18:36:18.630980283 +0800
-@@ -54,6 +54,7 @@ static std::string GetDeviceNameFromMap(
- {"Vega10", "gfx900"},
- {"gfx901", "gfx900"},
- {"10.3.0 Sienna_Cichlid 18", "gfx1030"},
-+ {"10.3.1 Navi_flounder 18", "gfx1031"},
- };
-
- const char* const p_asciz = miopen::GetStringEnv(MIOPEN_DEBUG_ENFORCE_DEVICE{});
---- MIOpen-rocm-5.1.3/test/CMakeLists.txt 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/test/CMakeLists.txt 2022-09-01 18:36:19.022979405 +0800
-@@ -38,6 +38,7 @@ option( MIOPEN_TEST_GFX90A "Test on gfx9
- option( MIOPEN_TEST_GFX900 "Test on Vega10 (gfx900)" OFF )
- option( MIOPEN_TEST_GFX906 "Test on Vega20 (gfx906)" OFF )
- option( MIOPEN_TEST_GFX1030 "Test on Navi21 (gfx1030)" OFF )
-+option( MIOPEN_TEST_GFX1031 "Test on Navi21 (gfx1031)" OFF )
- option( MIOPEN_TEST_GPU_XNACK_ENABLED "Test as if XNACK mode is enabled" OFF )
- option( MIOPEN_TEST_CONV Off)
- option( MIOPEN_TEST_DEEPBENCH Off)
-@@ -74,7 +75,7 @@ endif()
- # Also we do not detect GPU when target GPU for testing is specified explicitly.
- set(MIOPEN_TEST_GPU_DETECTION_FAILED FALSE)
- set(MIOPEN_NO_GPU FALSE)
--if(NOT (MIOPEN_TEST_GFX900 OR MIOPEN_TEST_GFX906 OR MIOPEN_TEST_GFX908 OR MIOPEN_TEST_GFX90A OR MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_HIP_NOGPU))
-+if(NOT (MIOPEN_TEST_GFX900 OR MIOPEN_TEST_GFX906 OR MIOPEN_TEST_GFX908 OR MIOPEN_TEST_GFX90A OR MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_GFX1031 OR MIOPEN_TEST_HIP_NOGPU))
- find_program(ROCMINFO
- NAMES rocminfo
- PATHS
-@@ -96,6 +97,8 @@ if(NOT (MIOPEN_TEST_GFX900 OR MIOPEN_TES
- elseif (NOT ROCMINFO_EXIT_STATUS EQUAL 0)
- message(WARNING "ROCMINFO FAILED, GPU TYPE UNKNOWN. Manually set respective MIOPEN_TEST_GFX* CMake variable to specify target GPU for testing.")
- set(MIOPEN_TEST_GPU_DETECTION_FAILED TRUE)
-+ elseif(ROCMINFO_OUTPUT MATCHES "gfx1031")
-+ set(MIOPEN_TEST_GFX1031 ON)
- elseif(ROCMINFO_OUTPUT MATCHES "gfx1030")
- set(MIOPEN_TEST_GFX1030 ON)
- elseif(ROCMINFO_OUTPUT MATCHES "gfx900")
-@@ -125,6 +128,7 @@ message(STATUS "MIOPEN_TEST_GFX906 ${MIO
- message(STATUS "MIOPEN_TEST_GFX908 ${MIOPEN_TEST_GFX908}")
- message(STATUS "MIOPEN_TEST_GFX90A ${MIOPEN_TEST_GFX90A}")
- message(STATUS "MIOPEN_TEST_GFX1030 ${MIOPEN_TEST_GFX1030}")
-+message(STATUS "MIOPEN_TEST_GFX1031 ${MIOPEN_TEST_GFX1031}")
- message(STATUS "MIOPEN_TEST_GPU_XNACK_ENABLED ${MIOPEN_TEST_GPU_XNACK_ENABLED}")
- message(STATUS "MIOPEN_TEST_GPU_DETECTION_FAILED ${MIOPEN_TEST_GPU_DETECTION_FAILED}")
-
-@@ -167,10 +171,10 @@ endmacro()
- set_var_to_condition(WORKAROUND_ISSUE_1187_DEFAULT MIOPEN_TEST_GFX90A AND MIOPEN_TEST_FLOAT)
- option( WORKAROUND_ISSUE_1187 "" ${WORKAROUND_ISSUE_1187_DEFAULT})
-
--set_var_to_condition(WORKAROUND_ISSUE_1148_DEFAULT MIOPEN_TEST_GFX1030 AND MIOPEN_TEST_FLOAT)
-+set_var_to_condition(WORKAROUND_ISSUE_1148_DEFAULT MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_GFX1031 AND MIOPEN_TEST_FLOAT)
- option( WORKAROUND_ISSUE_1148 "" ${WORKAROUND_ISSUE_1148_DEFAULT})
-
--set_var_to_condition(WORKAROUND_ISSUE_1334_DEFAULT MIOPEN_TEST_GFX1030 AND MIOPEN_TEST_FLOAT)
-+set_var_to_condition(WORKAROUND_ISSUE_1334_DEFAULT MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_GFX1031 AND MIOPEN_TEST_FLOAT)
- option( WORKAROUND_ISSUE_1334 "" ${WORKAROUND_ISSUE_1334_DEFAULT})
-
- if(NOT MIOPEN_TEST_MIOTENSILE)
-@@ -216,7 +220,7 @@ if (MIOPEN_NO_GPU)
- test_pooling3d test_perfdb)
- endif()
-
--if(MIOPEN_TEST_GFX1030)
-+if(MIOPEN_TEST_GFX1030 OR MIOPEN_TEST_GFX1031)
- if(WORKAROUND_ISSUE_1053 AND MIOPEN_TEST_ALL)
- list(APPEND SKIP_TESTS test_lrn_test)
- endif()
-@@ -439,7 +443,7 @@ endfunction()
- # If nothing is specified, the default value is taken.
- # Default: FLOAT_ENABLED HALF_DISABLED BF16_DISABLED INT8_DISABLED
- #
--# GPU types: GFX900, GFX906, GFX908, GFX90A, GFX1030
-+# GPU types: GFX900, GFX906, GFX908, GFX90A, GFX1030, GFX1031
- # The option can be enabled or disabled by using '_ENABLED' and '_DISABLED' suffix.
- # If nothing is specified, the default value is taken.
- # Default: GFX900_ENABLED, GFX906_ENABLED, GFX908_ENABLED, GFX90A_ENABLED, GFX1030_DISABLED
-@@ -571,7 +575,7 @@ function(add_custom_test NAME)
- set_tests_properties(${NAME} PROPERTIES RUN_SERIAL On)
- endif()
-
-- if( (is_gfx900_check OR is_gfx906_check OR is_gfx908_check OR is_gfx1030_check OR is_gfx90a_check)
-+ if( (is_gfx900_check OR is_gfx906_check OR is_gfx908_check OR is_gfx1030_check OR is_gfx1031_check OR is_gfx90a_check)
- AND is_full_check
- AND is_xnack_on_check
- AND (is_miotensile_check AND is_mlir_check)
---- MIOpen-rocm-5.1.3/test/handle_test.cpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/test/handle_test.cpp 2022-09-01 18:36:19.018979413 +0800
-@@ -234,7 +234,7 @@ void test_warnings(kernel_type_t kern_ty
- void test_arch_name()
- {
- auto&& h = get_handle();
-- auto known_arch = {"gfx908", "gfx90a", "gfx906", "gfx900", "gfx803", "gfx1030"};
-+ auto known_arch = {"gfx908", "gfx90a", "gfx906", "gfx900", "gfx803", "gfx1030", "gfx1031"};
- auto this_arch = h.GetDeviceName();
- EXPECT(std::any_of(
- known_arch.begin(), known_arch.end(), [&](std::string arch) { return arch == this_arch; }));
---- MIOpen-rocm-5.1.3/test/mdgraph.cpp 2022-05-08 14:08:05.000000000 +0800
-+++ gfx1031/test/mdgraph.cpp 2022-09-01 18:36:19.022979405 +0800
-@@ -222,7 +222,7 @@ struct mdgraph_driver : test_driver
- auto target = h.GetTargetProperties();
-
- auto wino_supported_arch = {
-- "gfx1030", "gfx1012", "gfx1011", "gfx90a", "gfx908", "gfx906", "gfx900", "gfx803"};
-+ "gfx1030", "gfx1031","gfx1012", "gfx1011", "gfx90a", "gfx908", "gfx906", "gfx900", "gfx803"};
-
- auto is_wino_support = !xnack_enabled &&
- !miopen::IsDisabled(MIOPEN_DEBUG_GCN_ASM_KERNELS{}) &&
diff --git a/sci-libs/miopen/miopen-5.1.3-r1.ebuild b/sci-libs/miopen/miopen-5.1.3-r1.ebuild
deleted file mode 100644
index 7d02435948f7..000000000000
--- a/sci-libs/miopen/miopen-5.1.3-r1.ebuild
+++ /dev/null
@@ -1,110 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-ROCM_VERSION=${PV}
-
-inherit cmake flag-o-matic llvm rocm
-
-LLVM_MAX_SLOT=15
-
-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/$(ver_cut 1-2)"
-
-IUSE="debug test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-util/hip-5.1.3
- >=dev-db/sqlite-3.17
- sci-libs/rocBLAS:${SLOT}[${ROCM_USEDEP}]
- >=dev-libs/boost-1.72
-"
-
-DEPEND="${RDEPEND}"
-
-BDEPEND="dev-libs/half:0/1
- dev-build/rocm-cmake
-"
-
-S="${WORKDIR}/MIOpen-rocm-${PV}"
-
-PATCHES=(
- "${FILESDIR}/${PN}-4.2.0-disable-no-inline-boost.patch"
- "${FILESDIR}/${PN}-4.2.0-gcc11-numeric_limits.patch"
- "${FILESDIR}/${PN}-5.0.2-strip-xnack-in-flags.patch"
- "${FILESDIR}/${PN}-4.3.0-fix-interface-include-in-HIP_COMPILER_FLAGS.patch"
- "${FILESDIR}/${PN}-4.3.0-enable-test.patch"
- "${FILESDIR}/${PN}-5.1.3-gfx1031.patch"
- "${FILESDIR}/${PN}-5.1.3-deprecate-clang-ocl.patch"
- "${FILESDIR}/${PN}-5.1.3-no-strip.patch"
- "${FILESDIR}/${PN}-5.1.3-include-array.patch"
- "${FILESDIR}/${PN}-5.1.3-avoid-metadata-error-for-vanilla-clang.patch"
-)
-
-src_prepare() {
- cmake_src_prepare
-
- sed -e "s:/opt/rocm/llvm:$(get_llvm_prefix ${LLVM_MAX_SLOT}) NO_DEFAULT_PATH:" \
- -e "s:/opt/rocm/hip:$(hipconfig -p) NO_DEFAULT_PATH:" \
- -e '/set( MIOPEN_INSTALL_DIR/s:miopen:${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 "/add_test/s:--build \${CMAKE_CURRENT_BINARY_DIR}:--build ${BUILD_DIR}:" -i test/CMakeLists.txt || die
-
- sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:${EPREFIX}/usr/lib/amdgcn/bitcode:" -i cmake/hip-config.cmake || die
-
- # This plus avoid-metadata-error-for-vanilla-clang.patch fix bug mentioned
- # in https://github.com/ROCmSoftwarePlatform/MIOpen/issues/1731
- find src/kernels -name "*.s" -exec \
- sed -e "s/.name: n /.name: x /g" -e "s/.name: y /.name: z /g" \
- -e "s/.name: y,/.name: z,/g" -i {} \; || die
-}
-
-src_configure() {
- if ! use debug; then
- append-cflags "-DNDEBUG"
- append-cxxflags "-DNDEBUG"
- CMAKE_BUILD_TYPE="Release"
- else
- CMAKE_BUILD_TYPE="Debug"
- fi
-
- local mycmakeargs=(
- -DCMAKE_SKIP_RPATH=ON
- -DAMDGPU_TARGETS="$(get_amdgpu_flags)"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
- -DMIOPEN_BACKEND=HIP
- -DBoost_USE_STATIC_LIBS=OFF
- -DMIOPEN_USE_MLIR=OFF
- -DBUILD_TESTS=$(usex test ON OFF)
- -DMIOPEN_TEST_ALL=$(usex test ON OFF)
- -DHALF_INCLUDE_DIR="${EPREFIX}/usr/include/half"
- )
-
- if use test; then
- for gpu_target in ${AMDGPU_TARGETS}; do
- mycmakeargs+=( -DMIOPEN_TEST_${gpu_target^^}=ON )
- done
- fi
-
- addpredict /dev/kfd
- addpredict /dev/dri/
- append-cxxflags "--rocm-path=$(hipconfig -R)"
- append-cxxflags "--hip-device-lib-path=${EPREFIX}/usr/lib/amdgcn/bitcode"
- CXX="$(get_llvm_prefix ${LLVM_MAX_SLOT})/bin/clang++" cmake_src_configure
-}
-
-src_test() {
- check_amdgpu
- export LD_LIBRARY_PATH="${BUILD_DIR}"/lib
- MAKEOPTS="-j1" cmake_src_test
-}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-13 8:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 8:38 [gentoo-commits] repo/gentoo:master commit in: sci-libs/miopen/files/, sci-libs/miopen/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2025-01-05 21:49 Sam James
2022-11-23 18:12 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox