commit: 5c0349779356a26f8afd77e3b1cd0fd27cad1943 Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com> AuthorDate: Fri Oct 17 09:32:56 2025 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Fri Oct 17 14:31:26 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c034977
sci-libs/miopen: drop unused patches Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/44218 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> .../miopen-4.2.0-disable-no-inline-boost.patch | 14 ---- .../files/miopen-4.2.0-gcc11-numeric_limits.patch | 14 ---- .../miopen/files/miopen-4.3.0-enable-test.patch | 31 --------- ...x-interface-include-in-HIP_COMPILER_FLAGS.patch | 17 ----- .../miopen/files/miopen-5.1.3-include-array.patch | 12 ---- sci-libs/miopen/files/miopen-5.1.3-no-strip.patch | 17 ----- .../files/miopen-5.7.1-fix-miopendriver-gemm.patch | 74 ---------------------- 7 files changed, 179 deletions(-) diff --git a/sci-libs/miopen/files/miopen-4.2.0-disable-no-inline-boost.patch b/sci-libs/miopen/files/miopen-4.2.0-disable-no-inline-boost.patch deleted file mode 100644 index 769217acd9d1..000000000000 --- a/sci-libs/miopen/files/miopen-4.2.0-disable-no-inline-boost.patch +++ /dev/null @@ -1,14 +0,0 @@ -This let MIOpen compatible with >boost-1.72, for example 1.76 - -Suggested by: Michael Boone <[email protected]> - ---- a/CMakeLists.txt 2021-07-23 01:26:15.377754243 -0700 -+++ b/CMakeLists.txt 2021-07-23 01:29:23.925685190 -0700 -@@ -216,6 +216,7 @@ - message(STATUS "Hip compiler flags: ${HIP_COMPILER_FLAGS}") - - add_definitions("-DHIP_COMPILER_FLAGS=${HIP_COMPILER_FLAGS}") -+add_definitions("-DBOOST_CONTAINER_DISABLE_NOINLINE") - - - # HIP diff --git a/sci-libs/miopen/files/miopen-4.2.0-gcc11-numeric_limits.patch b/sci-libs/miopen/files/miopen-4.2.0-gcc11-numeric_limits.patch deleted file mode 100644 index 73997ce5d4db..000000000000 --- a/sci-libs/miopen/files/miopen-4.2.0-gcc11-numeric_limits.patch +++ /dev/null @@ -1,14 +0,0 @@ -See: https://stackoverflow.com/questions/4798936/numeric-limits-was-not-declared-in-this-scope-no-matching-function-for-call-t - -https://www.gnu.org/software/gcc/gcc-11/porting_to.html#header-dep-changes - ---- MIOpen-rocm-4.2.0/src/include/miopen/float_equal.hpp -+++ MIOpen-rocm-4.2.0/src/include/miopen/float_equal.hpp -@@ -29,6 +29,7 @@ - #include <algorithm> - #include <cmath> - #include <numeric> -+#include <limits> - #ifdef _MSC_VER - #include <iso646.h> - #endif diff --git a/sci-libs/miopen/files/miopen-4.3.0-enable-test.patch b/sci-libs/miopen/files/miopen-4.3.0-enable-test.patch deleted file mode 100644 index 68d2f143bf4e..000000000000 --- a/sci-libs/miopen/files/miopen-4.3.0-enable-test.patch +++ /dev/null @@ -1,31 +0,0 @@ -This create option BUILD_TESTS for miopen, like other rocm math libs, and - -testing executables are always built if test enabled. The original behaviour, is - -always add test/CMakeLists.txt without adding test exes as targets, and compile them - -during test. ---- orig/CMakeLists.txt -+++ MIOpen-rocm-4.3.0/CMakeLists.txt -@@ -590,6 +590,9 @@ add_subdirectory(src) - if(MIOPEN_BUILD_DRIVER) - add_subdirectory(driver) - endif() --add_subdirectory(test) -+option(BUILD_TESTS "Build binaries for tests" OFF) -+if(BUILD_TESTS) -+ add_subdirectory(test) -+endif() - add_subdirectory(speedtests) - add_subdirectory(utils) ---- orig/test/CMakeLists.txt -+++ MIOpen-rocm-4.3.0/test/CMakeLists.txt -@@ -142,7 +142,7 @@ function(add_test_command NAME EXE) - endfunction() - - function(add_test_executable TEST_NAME) -- add_executable (${TEST_NAME} EXCLUDE_FROM_ALL ${ARGN}) -+ add_executable (${TEST_NAME} ${ARGN}) - clang_tidy_check(${TEST_NAME}) - target_link_libraries(${TEST_NAME} ${CMAKE_THREAD_LIBS_INIT}) - # Cmake does not add flags correctly for gcc diff --git a/sci-libs/miopen/files/miopen-4.3.0-fix-interface-include-in-HIP_COMPILER_FLAGS.patch b/sci-libs/miopen/files/miopen-4.3.0-fix-interface-include-in-HIP_COMPILER_FLAGS.patch deleted file mode 100644 index 5c2762a32548..000000000000 --- a/sci-libs/miopen/files/miopen-4.3.0-fix-interface-include-in-HIP_COMPILER_FLAGS.patch +++ /dev/null @@ -1,17 +0,0 @@ -The interface inlude directories of hip::device should be included using -I, not -isystem; - -otherwise compilation at MIOpen runtime will fail due to cstdlib cannot find <stdlib.h> or similar errors. - -Suggested-by: Yuyi Wang <[email protected]> -Signed-off-by: Yiyang Wu <[email protected]> ---- orig/cmake/TargetFlags.cmake -+++ MIOpen-rocm-4.3.0/cmake/TargetFlags.cmake -@@ -41,7 +41,7 @@ function(target_flags FLAGS TARGET) - set(_flags) - append_flags(_flags ${TARGET} "INTERFACE_COMPILE_OPTIONS" "") - append_flags(_flags ${TARGET} "INTERFACE_COMPILE_DEFINITIONS" "-D") -- append_flags(_flags ${TARGET} "INTERFACE_INCLUDE_DIRECTORIES" "-isystem ") -+ append_flags(_flags ${TARGET} "INTERFACE_INCLUDE_DIRECTORIES" "-I ") - append_flags(_flags ${TARGET} "INTERFACE_LINK_DIRECTORIES" "-L ") - append_flags(_flags ${TARGET} "INTERFACE_LINK_OPTIONS" "") - append_link_flags(_flags ${TARGET} "INTERFACE_LINK_LIBRARIES" "") diff --git a/sci-libs/miopen/files/miopen-5.1.3-include-array.patch b/sci-libs/miopen/files/miopen-5.1.3-include-array.patch deleted file mode 100644 index fc6a36d22548..000000000000 --- a/sci-libs/miopen/files/miopen-5.1.3-include-array.patch +++ /dev/null @@ -1,12 +0,0 @@ -This fixes compile error upon gcc-12 libstdc++ -index 1cfb2a72c..0f4feb406 100644 ---- a/test/sequences.cpp -+++ b/test/sequences.cpp -@@ -25,6 +25,7 @@ - *******************************************************************************/ - #include "test.hpp" - #include <miopen/sequences.hpp> -+#include <array> - - namespace miopen { - namespace seq { diff --git a/sci-libs/miopen/files/miopen-5.1.3-no-strip.patch b/sci-libs/miopen/files/miopen-5.1.3-no-strip.patch deleted file mode 100644 index 0d1d429dbb85..000000000000 --- a/sci-libs/miopen/files/miopen-5.1.3-no-strip.patch +++ /dev/null @@ -1,17 +0,0 @@ -Don't strip for release. Let portage handle stripping. -Index: MIOpen-rocm-5.1.3/CMakeLists.txt -=================================================================== ---- MIOpen-rocm-5.1.3.orig/CMakeLists.txt -+++ MIOpen-rocm-5.1.3/CMakeLists.txt -@@ -78,11 +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.16.0) - diff --git a/sci-libs/miopen/files/miopen-5.7.1-fix-miopendriver-gemm.patch b/sci-libs/miopen/files/miopen-5.7.1-fix-miopendriver-gemm.patch deleted file mode 100644 index 859667f3da30..000000000000 --- a/sci-libs/miopen/files/miopen-5.7.1-fix-miopendriver-gemm.patch +++ /dev/null @@ -1,74 +0,0 @@ -Fix uninitialized variable in MIOpenDriver gemm and restore gemmfp16 for testing -Upstream bug: https://github.com/ROCmSoftwarePlatform/MIOpen/issues/2505 ---- a/driver/driver.hpp -+++ b/driver/driver.hpp -@@ -141,7 +141,7 @@ inline void PadBufferSize(size_t& sz, int datatype_sz) - printf("Usage: ./driver *base_arg* *other_args*\n"); - printf("Supported Base Arguments: conv[fp16|int8|bfp16], CBAInfer[fp16], " - "pool[fp16], lrn[fp16], " -- "activ[fp16], softmax[fp16], bnorm[fp16], rnn[fp16], gemm, ctc, dropout[fp16], " -+ "activ[fp16], softmax[fp16], bnorm[fp16], rnn[fp16], gemm[fp16], ctc, dropout[fp16], " - "tensorop[fp16], reduce[fp16,fp64]\n"); - exit(0); // NOLINT (concurrency-mt-unsafe) - } -@@ -160,7 +160,7 @@ inline std::string ParseBaseArg(int argc, char* argv[]) - arg != "CBAInfer" && arg != "CBAInferfp16" && arg != "pool" && arg != "poolfp16" && - arg != "lrn" && arg != "lrnfp16" && arg != "activ" && arg != "activfp16" && - arg != "softmax" && arg != "softmaxfp16" && arg != "bnorm" && arg != "bnormfp16" && -- arg != "rnn" && arg != "rnnfp16" && arg != "gemm" /*&& arg != "gemmfp16"*/ && arg != "ctc" && -+ arg != "rnn" && arg != "rnnfp16" && arg != "gemm" && arg != "gemmfp16" && arg != "ctc" && - arg != "dropout" && arg != "dropoutfp16" && arg != "tensorop" && arg != "tensoropfp16" && - arg != "reduce" && arg != "reducefp16" && arg != "reducefp64" && arg != "--version") - { ---- a/driver/gemm_driver.hpp -+++ b/driver/gemm_driver.hpp -@@ -207,6 +207,19 @@ int GemmDriver<T>::GetandSetData() - gemm_desc.strideB = gemm_desc.k * gemm_desc.n; - gemm_desc.strideC = gemm_desc.m * gemm_desc.n; - -+ if constexpr (std::is_same_v<T, float>) -+ { -+ gemm_desc.dataType = miopenFloat; -+ } -+ else if constexpr (std::is_same_v<T, float16>) -+ { -+ gemm_desc.dataType = miopenHalf; -+ } -+ else -+ { -+ static_assert(!"unsupported type"); -+ } -+ - return (0); - } - -@@ -230,9 +243,9 @@ int GemmDriver<T>::AllocateBuffersAndCopy() - a = std::vector<T>(a_sz); - b = std::vector<T>(b_sz); - #if GEMM_DRIVER_DEBUG -- c = std::vector<T>(c_sz, 1.); -+ c = std::vector<T>(c_sz, static_cast<T>(1.)); - #else -- c = std::vector<T>(c_sz, 0.); -+ c = std::vector<T>(c_sz, static_cast<T>(0.)); - #endif - chost = c; - ---- a/driver/main.cpp -+++ b/driver/main.cpp -@@ -125,11 +125,10 @@ int main(int argc, char* argv[]) - { - drv = new GemmDriver<float>(); - } --// TODO half is not supported in gemm --// else if(base_arg == "gemmfp16") --// { --// drv = new GemmDriver<float16>(); --// } -+ else if(base_arg == "gemmfp16") -+ { -+ drv = new GemmDriver<float16>(); -+ } - #endif - else if(base_arg == "bnorm") - {
