Fix Windows ARM64EC build issues and correct SIMD ARM NEON path for ARM64/EC#2344
Conversation
|
This looks good to me, thanks. The ASWF policy is to require a signed Contributor License Agreement for all contributions. Can you click the red "SIGNED AGREEMENT MISSING" button above and complete the form? Also, we require commits with a "Developer Certificate of Origin", i.e. signed commits. Can you amend your commit with I would also like to add a CI job that validates the Windows ARM64EC build, but I can add that later myself. |
Intended to validate the configuration addressed in AcademySoftwareFoundation#2344 Signed-off-by: Cary Phillips <cary@ilm.com>
|
I have a CI extension prepared. Are you able to resolve the CLA and DCO? |
Thank you very much for reviewing my code and for the update. My CLA process is currently in progress with my employer. Once it is completed, I will proceed with resolving the CLA and DCO. |
|
Thank you! |
Intended to validate the configuration addressed in AcademySoftwareFoundation#2344 Signed-off-by: Cary Phillips <cary@ilm.com>
Signed-off-by: nregulla <nregulla@qti.qualcomm.com>
398fc96 to
644ea59
Compare
|
CLA and DCO have been completed from my side. Kindly have a look. |
ca2e513
into
AcademySoftwareFoundation:main
Issue description
This PR improves Windows ARM64 and ARM64EC support in OpenEXR by fixing SIMD feature detection, resolving ARM64EC build failures, and ensuring the correct NEON code paths are selected while x86 SIMD paths (SSE/AVX) are disabled.
These changes ensure that ARM64EC builds succeed with MSVC and no longer accidentally include x86 SIMD headers or translation units.
Note:
The corresponding OpenJPH Windows ARM64EC fixes have already been upstreamed and merged:
aous72/OpenJPH#265
Build failure evidence (before fix)
OpenEXR-ARM64EC build issue
7>ImfSystemSpecific.cpp
7>C:\Working_DIR\GAME_TECH_GITHUB\FORK_OPENEXR\temp\openexr\src\lib\OpenEXR\ImfOutputFile.cpp(555,46): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data
7>C:\Working_DIR\GAME_TECH_GITHUB\FORK_OPENEXR\temp\openexr\src\lib\OpenEXR\ImfOutputFile.cpp(805,57): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
7>C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.44.35207\include\emmintrin.h(24,1): error C1189: #error: this header should only be included through <intrin.h>
7>(compiling source file '../../../../src/lib/OpenEXR/ImfSystemSpecific.cpp')
7>C:\Working_DIR\GAME_TECH_GITHUB\FORK_OPENEXR\temp\openexr\src\lib\OpenEXR\ImfTiledOutputFile.cpp(1025,57): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
7>Done building project "OpenEXR.vcxproj" -- FAILED.
========== Rebuild All: 6 succeeded, 1 failed, 0 skipped ==========
========== Rebuild completed at 12:20 PM and took 20.612 seconds ==========
OpenJPH-ARM64EC build issue.
1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Debug ARM64EC ------
1>1>Checking Build System
2>------ Rebuild All started: Project: openjph, Configuration: Debug ARM64EC ------
2>Compiling...
2>Generating Code...
2>ojph_mem_c.c
2>cl : command line warning D9002: ignoring unknown option '/arch:AVX'
2>ojph_codestream_avx.cpp
2>ojph_colour_avx.cpp
2>ojph_transform_avx.cpp
2>Generating Code...
2>C:\FORK\TEMP\OpenJPH\src\core\transform\ojph_transform_avx.cpp(1,1): error C7302: AVX types (__m256) are not currently supported in ARM64EC code
2>C:\FORK\TEMP\OpenJPH\src\core\codestream\ojph_codestream_avx.cpp(1,1): error C7302: AVX types (__m256) are not currently supported in ARM64EC code
2>Done building project "openjph.vcxproj" -- FAILED.
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
========== Rebuild completed at 11:54 AM and took 09.063 seconds ==========
Type of change
SIMD detection fixes
Disable SSE2 / SSE4.1 paths when _M_ARM64EC is defined
Introduce NEON function selection from IMF_HAVE_NEON_AARCH64 to the "IMF_HAVE_NEON_ARM64" to common capability macro covering:
- [ ]Linux and macOS AArch64
- [ ]Windows ARM64
- [ ]Windows ARM64EC
MSVC ARM64 correctness improvements
Use <arm64_neon.h> when compiling with MSVC
Avoid static SIMD vector initializers not supported by MSVC
Impact
Build & Test