-
Notifications
You must be signed in to change notification settings - Fork 745
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
[CI] Use oneAPI for Windows postcommit builds #16355
Conversation
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
@bader , do you know the history why we used |
Google says they are exactly the same except |
run: | | ||
cmake --build build --target check-sycl | ||
if [[ ${{inputs.compiler}} == 'icx' ]]; then | ||
export LIT_FILTER_OUT="host_tanpi_double_accuracy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was host_tanpi_double_accuracy
failing with icx
? Do we have any related bug report?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this and some LIT tests are failing when the compiler is built with icx. I don't know why, I made #16362 to look at it later, I've had enough with windows for a few days
|
||
with: | ||
compiler: icx | ||
build_configure_extra_args: --cmake-opt=-DCMAKE_C_FLAGS="/clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" --cmake-opt=-DCMAKE_CXX_FLAGS="/clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" --cmake-opt="-DCMAKE_EXE_LINKER_FLAGS=/manifest:no" --cmake-opt="-DCMAKE_MODULE_LINKER_FLAGS=/manifest:no" --cmake-opt="-DCMAKE_SHARED_LINKER_FLAGS=/manifest:no" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should go to CMake instead, but it's been a tremendous amount of work already, so I won't insist :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree but yeah please allow me some time regain my sanity, will do in follow up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made #16363 for follow up
type: choice | ||
options: | ||
- cl | ||
- icx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it work without build_configure_extra_args
for manual dispatch? Or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need this to pass the compiler flags we set in sycl-post-commit.yml
, and then we use it an an envvar named ARGS
in this file that is passed to configure.py
, we need the compiler flags to get the thing to build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
talked offline, fixed in latest commit, thx
run: | | ||
if [[ ${{inputs.compiler}} == 'icx' ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly to CMake options, that's better be handled elsewhere (LIT feature + REQUIRES
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i think its reasonable to add a LIT feature but hopefully I can do this in a follow-up commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made #16363 for follow up
# When building using icx on Windows, the VERSION file | ||
# produced by cmake is used in source code | ||
# when including '<version>' because Windows is | ||
# case-insensitive and icx adds the build directory | ||
# to the system header search path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow... Just speechless...
Do you know if "VERSION" is some standard naming? If not, maybe we can rename it instead of this workaround.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the variable as a CMake variable is standard but writing it to disk seems to be somewhat standard but not done by every project. im pretty sure here it's coming from this code.
static constexpr int MemoryMapCounterBase = 1000; | ||
static int MemoryMapCounter = MemoryMapCounterBase; | ||
#ifndef _WIN32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For other reviewers - looks like we have some tests excluded on _WIN32
making these static functions unused. I suppose icx emits a warning about that and then it gets turned into a error due to -Werror
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah tbh i dont know why these dont error with cl
, but they seem unused always on windows so this change should be safe for any compiler
I don't remember all the details. From what I recall, we tried |
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the heavy uplift done here. Future improvements/cleanup can be done in other PRs (possibly by other folks :)).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UR LGTM
I see that you added support only for MSVC compatible drivers: |
@bader Yeah probably but I'd prefer to do it in another PR after upstream merges this one, I'll retitle it to be clear it's MSVC only |
Getting this working was an unbelievable amount of work. I hit so many weird issues caused by dumb Windows things (case insensitivity, cmd vs bash, bugs in cmake/ninja/sccache themselves) but finally I got something that consistently passes.
You can see the funniest dumb Windows issue in the comment in the CMake file change.
The basic idea is to extend the Windows build workflow to allow using
icx
, add an action to setup the oneAPI environment, call it from the build action and the test action (since we need some of the shared libs on path even for testing), and fix some oneAPI-only build issues.We need to do some Powershell magic after calling the oneAPI setup bat script because the environment variables get lost since it's run in a subprocess.
We also switch to
ccache
instead ofsccache
, becausesccache
doesn't supporticx
(actually neither doesccache
, but I added it upstream here and we are using a local build ofccache
, it was easier to add support toccache
). Manually tested it to confirmed cache reads and write are working as expected.At some point we should probably investigate why some tests fail or some compiler flags are required with
icx
only and notcl
, but let's do that as separate work because I am done with Windows for now.I already set up all Windows runners used here to work with this change.
Next I'll add oneAPI builds on Linux, which I really hope is easier.