diff options
author | Sv. Lockal <lockalsash@gmail.com> | 2024-07-20 16:59:43 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-09-09 19:15:13 +0100 |
commit | 09c22f713957e25b9b530b318704421eaf2347a2 (patch) | |
tree | f98742c7adadcbc464154d21558a9261b0a78c12 /sci-libs | |
parent | dev-util/Tensile: strip unsupported flags for potentially switched compiler (diff) | |
download | gentoo-09c22f713957e25b9b530b318704421eaf2347a2.tar.gz gentoo-09c22f713957e25b9b530b318704421eaf2347a2.tar.bz2 gentoo-09c22f713957e25b9b530b318704421eaf2347a2.zip |
sci-libs/composable-kernel: strip unsupported flags for potentially switched compiler
Additionally: fix compilation with libc++
Bug: https://bugs.gentoo.org/936099
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/composable-kernel/composable-kernel-6.1.1.ebuild | 5 | ||||
-rw-r--r-- | sci-libs/composable-kernel/files/composable-kernel-6.1.1-fix-libcxx.patch | 25 |
2 files changed, 29 insertions, 1 deletions
diff --git a/sci-libs/composable-kernel/composable-kernel-6.1.1.ebuild b/sci-libs/composable-kernel/composable-kernel-6.1.1.ebuild index 8c096e29135a..44abf5d59c81 100644 --- a/sci-libs/composable-kernel/composable-kernel-6.1.1.ebuild +++ b/sci-libs/composable-kernel/composable-kernel-6.1.1.ebuild @@ -43,6 +43,7 @@ PATCHES=( "${FILESDIR}"/${PN}-6.1.1-enable-examples.patch "${FILESDIR}"/${PN}-6.1.1-fix-clang-17-no-offload-uniform-block.patch "${FILESDIR}"/${PN}-6.1.1-no-git-no-hash.patch + "${FILESDIR}"/${PN}-6.1.1-fix-libcxx.patch ) src_prepare() { @@ -51,6 +52,8 @@ src_prepare() { } src_configure() { + rocm_use_hipcc + if ! use debug; then append-cflags "-DNDEBUG" append-cxxflags "-DNDEBUG" @@ -73,7 +76,7 @@ src_configure() { ) fi - CXX=hipcc cmake_src_configure + cmake_src_configure } src_test() { diff --git a/sci-libs/composable-kernel/files/composable-kernel-6.1.1-fix-libcxx.patch b/sci-libs/composable-kernel/files/composable-kernel-6.1.1-fix-libcxx.patch new file mode 100644 index 000000000000..c73dafc02420 --- /dev/null +++ b/sci-libs/composable-kernel/files/composable-kernel-6.1.1-fix-libcxx.patch @@ -0,0 +1,25 @@ +libc++ has no std::numeric_limits<__Float16> implementation and treats f8_t as is_integral. + +Bug for is_integral: https://github.com/llvm/llvm-project/issues/102767 +Bug for numeric_limits: https://github.com/ROCm/composable_kernel/issues/1460 +--- a/library/include/ck/library/utility/check_err.hpp ++++ b/library/include/ck/library/utility/check_err.hpp +@@ -146,7 +146,7 @@ check_err(const Range& out, + bool res{true}; + int err_count = 0; + double err = 0; +- double max_err = std::numeric_limits<ranges::range_value_t<Range>>::min(); ++ double max_err = NumericLimits<ranges::range_value_t<Range>>::Min(); + for(std::size_t i = 0; i < ref.size(); ++i) + { + const double o = type_convert<float>(*std::next(std::begin(out), i)); +@@ -178,7 +178,8 @@ check_err(const Range& out, + template <typename Range, typename RefRange> + std::enable_if_t<(std::is_same_v<ranges::range_value_t<Range>, ranges::range_value_t<RefRange>> && + std::is_integral_v<ranges::range_value_t<Range>> && +- !std::is_same_v<ranges::range_value_t<Range>, bhalf_t>) ++ !std::is_same_v<ranges::range_value_t<Range>, bhalf_t> && ++ !std::is_same_v<ranges::range_value_t<Range>, f8_t>) + #ifdef CK_EXPERIMENTAL_BIT_INT_EXTENSION_INT4 + || std::is_same_v<ranges::range_value_t<Range>, int4_t> + #endif |