Skip to content

[inductor] Windows inductor use intel-openmp. #160258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
Next Next commit
Windows inductor use intel-openmp.
  • Loading branch information
xuhancn authored and pytorchmergebot committed Aug 10, 2025
commit ce408ca3aad53db0674a1b2d25c216739e54e2cd
7 changes: 3 additions & 4 deletions torch/_inductor/cpp_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,11 +1077,10 @@ def _get_openmp_args(
libs.append("libiomp5md")
perload_icx_libomp_win(cpp_compiler)
else:
# /openmp, /openmp:llvm
# llvm on Windows, new openmp: https://devblogs.microsoft.com/cppblog/msvc-openmp-update/
# msvc openmp: https://learn.microsoft.com/zh-cn/cpp/build/reference/openmp-enable-openmp-2-0-support?view=msvc-170
cflags.append("openmp")
cflags.append("openmp:experimental") # MSVC CL
# cflags.append("openmp:experimental") # MSVC Openmp, it has some issue for inductor.
libs.append("libiomp5md") # intel-openmp
ldflags.append("nodefaultlib:vcomp")
else:
if config.is_fbcode():
include_dir_paths.append(build_paths.openmp_include)
Expand Down