Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# if you wish to build release candidate number X, append the version string with ".rcX"
{% set version = "2.7.1" %}
{% set build = 4 %}
{% set build = 5 %}

# Use a higher build number for the CUDA variant, to ensure that it's
# preferred by conda's solver, and it's preferentially
Expand Down Expand Up @@ -69,6 +69,7 @@ source:
- patches/0016-skip-test_norm_matrix_degenerate_shapes-on-numpy-2.3.patch
# backport https://github.com/pytorch/pytorch/pull/127702
- patches/0017-Define-PY_SSIZE_T_CLEAN-before-include-Python.h.patch
- patches/0018-Use-Intel-LLVM-openmp.patch
- patches_submodules/fbgemm/0001-remove-DESTINATION-lib-from-CMake-install-directives.patch # [win]
- patches_submodules/tensorpipe/0001-switch-away-from-find_package-CUDA.patch

Expand Down
31 changes: 31 additions & 0 deletions recipe/patches/0018-Use-Intel-LLVM-openmp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From ffbdd8bb8fa38397ad6d7958a8c4ddd80ff738eb Mon Sep 17 00:00:00 2001
From: Isuru Fernando <[email protected]>
Date: Thu, 31 Jul 2025 12:34:30 -0500
Subject: [PATCH] Use Intel/LLVM openmp

This make MSVC use __kmp_* symbols available in both libiomp.dll
and libiomp5md.dll instead of vcomp* symbols which are only in
vcomp140.dll and libiomp5md.dll, but are missing in libiomp.dll
---
cmake/Modules/FindOpenMP.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake/Modules/FindOpenMP.cmake b/cmake/Modules/FindOpenMP.cmake
index 8a9abff398..336a9a927a 100644
--- a/cmake/Modules/FindOpenMP.cmake
+++ b/cmake/Modules/FindOpenMP.cmake
@@ -122,9 +122,9 @@ function(_OPENMP_FLAG_CANDIDATES LANG)
set(OMP_FLAG_MIPSpro "-mp")
if(__header_dir MATCHES ".*Microsoft Visual Studio.*")
# MSVC header. No need to pass it as additional include.
- set(OMP_FLAG_MSVC "-openmp:experimental" "-openmp")
+ set(OMP_FLAG_MSVC "-openmp:llvm" "-openmp:experimental" "-openmp")
else()
- set(OMP_FLAG_MSVC "-openmp:experimental -I${__header_dir}" "-openmp -I${__header_dir}")
+ set(OMP_FLAG_MSVC "-openmp:llvm" "-openmp:experimental -I${__header_dir}" "-openmp -I${__header_dir}")
endif()
set(OMP_FLAG_PathScale "-openmp")
set(OMP_FLAG_NAG "-openmp")
--
2.45.2

Loading