summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiyang Wu <xgreenlandforwyy@gmail.com>2022-07-13 20:18:42 +0800
committerBenda Xu <heroxbd@gentoo.org>2022-09-22 09:07:37 +0800
commitabdf31db4cfb9a43bd7581ab271c03facf933490 (patch)
treebced3c91557fc505ddca665d20a9c533a971109e /sci-libs/rocFFT/files
parentsci-libs/rocBLAS: add 5.1.3, using rocm.eclass (diff)
downloadgentoo-abdf31db4cfb9a43bd7581ab271c03facf933490.tar.gz
gentoo-abdf31db4cfb9a43bd7581ab271c03facf933490.tar.bz2
gentoo-abdf31db4cfb9a43bd7581ab271c03facf933490.zip
sci-libs/rocFFT: add 5.1.3, use rocm.eclass
profiles/base: mask rocFFT-5.1.3 gfx906 amdgpu target, because intolerable error found on Radeon VII. No need to rebuilt rocFFT when hip upgrade because librocfft is dynamically linked to libhipamd, while llvm SLOT does not matter because it is only used to produce GPU kernels, libclang and libLLVM does not linked in. Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'sci-libs/rocFFT/files')
-rw-r--r--sci-libs/rocFFT/files/rocFFT-5.1.3-add-stdexcept-header.patch11
-rw-r--r--sci-libs/rocFFT/files/rocFFT-5.1.3-unbundle-sqlite.patch67
2 files changed, 78 insertions, 0 deletions
diff --git a/sci-libs/rocFFT/files/rocFFT-5.1.3-add-stdexcept-header.patch b/sci-libs/rocFFT/files/rocFFT-5.1.3-add-stdexcept-header.patch
new file mode 100644
index 000000000000..edfd89ea4b70
--- /dev/null
+++ b/sci-libs/rocFFT/files/rocFFT-5.1.3-add-stdexcept-header.patch
@@ -0,0 +1,11 @@
+Contributed-by: perestoronin https://bugs.gentoo.org/693200#c25
+--- a/library/src/include/twiddles.h
++++ b/library/src/include/twiddles.h
+@@ -14,6 +14,7 @@
+ #include <numeric>
+ #include <tuple>
+ #include <vector>
++#include <stdexcept>
+
+ static const size_t LTWD_BASE_DEFAULT = 8;
+ static const size_t LARGE_TWIDDLE_THRESHOLD = 4096;
diff --git a/sci-libs/rocFFT/files/rocFFT-5.1.3-unbundle-sqlite.patch b/sci-libs/rocFFT/files/rocFFT-5.1.3-unbundle-sqlite.patch
new file mode 100644
index 000000000000..b18b55eb8048
--- /dev/null
+++ b/sci-libs/rocFFT/files/rocFFT-5.1.3-unbundle-sqlite.patch
@@ -0,0 +1,67 @@
+Disable rocFFT fetching SQLite3 and link to system libsqlite.so
+Index: rocFFT-rocm-5.1.3/library/src/CMakeLists.txt
+===================================================================
+--- rocFFT-rocm-5.1.3.orig/library/src/CMakeLists.txt
++++ rocFFT-rocm-5.1.3/library/src/CMakeLists.txt
+@@ -134,49 +134,22 @@ set( rocfft_source
+ rtcsubprocess.cpp
+ )
+
+-# SQLite 3.36.0 enabled the backup API by default, which we need
+-# for cache serialization. We also want to use a static SQLite,
+-# and distro static libraries aren't typically built
+-# position-independent.
+-include( FetchContent )
+-
+-set(SQLITE_SRC_URL https://sqlite.org/2021/sqlite-amalgamation-3360000.zip CACHE STRING "Location of SQLite source code")
+-set(SQLITE_SRC_SHA256 999826fe4c871f18919fdb8ed7ec9dd8217180854dd1fe21eea96aed36186729 CACHE STRING "SHA256 hash of SQLite source code")
+-
+-# embed SQLite
+-FetchContent_Declare(sqlite_local
+- URL ${SQLITE_SRC_URL}
+- URL_HASH SHA256=${SQLITE_SRC_SHA256}
+-)
+-FetchContent_MakeAvailable(sqlite_local)
+-add_library( sqlite3 OBJECT ${sqlite_local_SOURCE_DIR}/sqlite3.c )
+-set_target_properties( sqlite3 PROPERTIES
+- C_VISIBILITY_PRESET "hidden"
+- VISIBILITY_INLINES_HIDDEN ON
+- POSITION_INDEPENDENT_CODE ON
+- )
+-
+-# we don't need extensions, and omitting them from SQLite removes the
+-# need for dlopen/dlclose from within rocFFT
+-target_compile_options(
+- sqlite3
+- PRIVATE -DSQLITE_OMIT_LOAD_EXTENSION
+-)
+-
+ set_property(
+ SOURCE rtc.cpp
+ PROPERTY OBJECT_DEPENDS ${kgen_embed_h}
+ )
+
++find_package( SQLite3 REQUIRED )
++
+ prepend_path( ".." rocfft_headers_public relative_rocfft_headers_public )
+
+ add_library( rocfft
+ ${rocfft_source}
+ ${relative_rocfft_headers_public}
+- $<TARGET_OBJECTS:sqlite3>
+ )
+ add_library( roc::rocfft ALIAS rocfft )
+
++target_link_libraries( rocfft PRIVATE ${SQLite3_LIBRARIES} )
+ if( NOT WIN32 )
+ target_link_libraries( rocfft PRIVATE -lstdc++fs )
+ endif()
+@@ -209,7 +182,7 @@ endif()
+ target_include_directories( rocfft
+ PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/library/src/include>
+ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/library/src/device>
+- ${sqlite_local_SOURCE_DIR}
++ ${SQLite3_LIBRARIES}
+ PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/library/include>
+ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
+ $<INSTALL_INTERFACE:include>