CMake fixes for building ArrayFire oneAPI backend in windows#3610
Closed
edwinsolisf wants to merge 1 commit intoarrayfire:masterfrom
Closed
CMake fixes for building ArrayFire oneAPI backend in windows#3610edwinsolisf wants to merge 1 commit intoarrayfire:masterfrom
edwinsolisf wants to merge 1 commit intoarrayfire:masterfrom
Conversation
umar456
previously approved these changes
Dec 17, 2024
Contributor
|
This should be merged together with #3573 |
3 tasks
melonakos
previously approved these changes
Feb 25, 2025
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.
Implement CMake changes to fix building oneAPI in Windows
Description
Fixes: #3609
Changes:
CMAKE_MSVC_RUNTIME_LIBRARY=""and added manually the correct MSVC Runtime Library compile flag(
-MT/MD/MTd/MDd) for the icx when building oneAPIConsequences:
Using the Intel oneAPI DPC++ Compiler Reference as a baseline, the correct way to build the oneAPI backend in windows is as follows (using MSVC2022 and oneapi 2025 for example):
In command prompt use:
In powershell use
In command prompt use:
In powershell use:
Ninjagenerator with the C and C++ compilers set tocland the SYCL compiler set toicx:cmake --build build --target afoneapi -j 4(From testing it seems that the
icxcompiler tends to use a lot of memory and crash if there are lots of jobs being executed. I recommend-j 4for an 8-core machine specifically for building theafoneapitarget. Furthermore, the linking step forafoneapi.libtakes a significant amount of time).Changes to Users
Checklist