mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sci-ml/pytorch: apply mimalloc patch from caffe2
Closes: https://bugs.gentoo.org/980675 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
24
sci-ml/pytorch/files/pytorch-2.13.0-mimalloc.patch
Normal file
24
sci-ml/pytorch/files/pytorch-2.13.0-mimalloc.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
--- a/c10/CMakeLists.txt 2026-02-01 09:22:55.398151644 +0100
|
||||
+++ b/c10/CMakeLists.txt 2026-02-01 09:30:46.720495230 +0100
|
||||
@@ -120,8 +120,9 @@
|
||||
endif()
|
||||
|
||||
if(USE_MIMALLOC)
|
||||
- target_link_libraries(c10 PRIVATE "mimalloc-static")
|
||||
- add_dependencies(c10 mimalloc-static)
|
||||
+ find_package(mimalloc REQUIRED)
|
||||
+ target_link_libraries(c10 PRIVATE "mimalloc")
|
||||
+ add_dependencies(c10 mimalloc)
|
||||
endif()
|
||||
|
||||
if(LINUX)
|
||||
--- a/CMakeLists.txt 2026-02-03 16:47:46.949580063 +0100
|
||||
+++ b/CMakeLists.txt 2026-02-03 16:48:57.348716061 +0100
|
||||
@@ -404,7 +404,6 @@
|
||||
# on Windows and AArch64.
|
||||
option(USE_MIMALLOC_ON_MKL "Use mimalloc on MKL" OFF)
|
||||
if(WIN32 OR (CPU_AARCH64 AND NOT APPLE))
|
||||
- set(USE_MIMALLOC ON)
|
||||
# Disable OPT flags for mimalloc on aarch64 as it breaks ARMv8.0
|
||||
# Not enable USE_MIMALLOC_ON_MKL due to it caused issue:
|
||||
# See https://github.com/pytorch/pytorch/issues/174344
|
||||
@@ -163,6 +163,7 @@ BDEPEND="dev-build/cmake"
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-aotriton-fixes.patch
|
||||
"${FILESDIR}"/${P}-glog.patch
|
||||
"${FILESDIR}"/${P}-mimalloc.patch
|
||||
"${FILESDIR}"/${P}-removekineto-pr178960.patch
|
||||
"${FILESDIR}"/${P}-rocm-assert-fix.patch
|
||||
"${FILESDIR}"/${P}-unbundle_fbgemm.patch
|
||||
|
||||
Reference in New Issue
Block a user