Fix build failure with ICX 2026 on Windows#211
Open
xaleryb wants to merge 1 commit into
Open
Conversation
ICX 2026 in clang-cl mode strictly enforces that C99 _Complex double cannot be passed to UCRT's creal/cimag functions which expect _Dcomplex (an MSVC struct type). This causes hard compilation errors in all three build targets when C_STANDARD 99 is set, because CMake translates that to -Qstd:c99 for ICX, enabling strict C99 complex type semantics. numpy's npy_common.h defines npy_cdouble as 'double _Complex' for IntelLLVM compilers regardless of platform. numpy's npy_math.h then calls creal()/cimag() on npy_cdouble values. Under ICX 2025 this was a warning; under ICX 2026 it is a hard error. Fix: on Windows with IntelLLVM, unset C_STANDARD for all three targets so CMake does not inject -Qstd:c99. ICX in its default clang-cl compatibility mode handles the _Complex/_Dcomplex coercion without error, matching the behavior of ICX 2025 and earlier. Note: the underlying incompatibility is in numpy's npy_math.h which should guard creal/cimag calls for __INTEL_LLVM_COMPILER on Windows, similar to how npy_common.h already guards the npy_cdouble typedef.
f4401aa to
68e9116
Compare
xaleryb
added a commit
to xaleryb/mkl_umath
that referenced
this pull request
May 21, 2026
Validates that the ICX 2026 fix works under the same channel configuration that conda-forge uses. Remove once PR IntelPython#211 is merged.
xaleryb
added a commit
to xaleryb/mkl_umath
that referenced
this pull request
May 21, 2026
Validates that the ICX 2026 fix works under the same channel configuration that conda-forge uses. Remove once PR IntelPython#211 is merged.
d55b754 to
68e9116
Compare
Collaborator
|
@xaleryb It does update how the loop generation works, though, so I'm not sure -- it's possible that this solution is still correct. We can try to build locally, or also, it would be good to drop the fix commit in this PR temporarily and see if CI passes. If it does, it means there may be something specific to conda-forge or a recipe issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ICX 2026 on Windows strictly enforces that C99
_Complex doublecannot be passed to UCRT'screal()/cimag()functions, which expect_Dcomplex(an MSVC struct type). This causes hard compilation errors in all three build targets (mkl_umath_loops,_ufuncs,_patch_numpy).Root cause chain:
CMakeLists.txtsetsC_STANDARD 99→ CMake injects-Qstd:c99for ICX-Qstd:c99, ICX enables strict C99 complex type semanticsnpy_common.hdefinesnpy_cdoubleasdouble _Complexfor__INTEL_LLVM_COMPILER(regardless of platform)npy_math.hcallscreal(z)/cimag(z)wherezisnpy_cdoublecreal()expects_Dcomplex— ICX 2025 emitted a warning, ICX 2026 makes it a hard errorThis is why Intel's own CI did not catch this: Intel's channel provides
dpcpp_win-64 2025.xwhich was lenient. conda-forge usesdpcpp_win-64 2026.0which enforces strict types.Fix
Unset
C_STANDARDfor all three targets when building on Windows with IntelLLVM. Without-Qstd:c99, ICX operates in its default clang-cl compatibility mode and handles the_Complex/_Dcomplexcoercion without error — matching the behavior of ICX 2025 and earlier.Note
The underlying incompatibility is in numpy's
npy_math.h, which should guardcreal/cimagcalls for__INTEL_LLVM_COMPILERon Windows — similar to hownpy_common.halready guards thenpy_cdoubletypedef. This fix works around it at the mkl_umath build level until numpy addresses it upstream.