-
Notifications
You must be signed in to change notification settings - Fork 790
[SYCL][Clang] Fix compilation with --offload-compress and missing zstd #17914
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
Conversation
6318f1d
to
bdd1e1b
Compare
Sorry, what's the motivation behind this change? Also, AFAIK, we already build compiler with zstd for both opensource and OneAPI releases, so, not sure about the problem you're trying to solve. |
I've encountered this issue after recompiling Blender with my own build of DPC++ with Nvidia and AMD support on Windows (something that's not offered by open-source nor proprietary releases on Windows). The default build settings of DPC++ enable ZSTD with just From an user point of view, it was surprising to get an error at this stage, a warning would have made more sense, as offload compression not being available is not going to prevent correct compilation and execution. The produced binaries will just be bigger than expected, for which a warning would be enough. A simple switch of compiler should not require to change hardcoded compilation flags. I don't know the use cases for clang-offload-bundler so I can't tell if this upstream behavior is correct, but in the higher level If you'd rather not fix it this way, another solution is to switch the default setting for ZSTD to FORCE_ON to make zstd a hard requirement. |
When using a compiler built without zstd support, it's preferable for --offload-compress option to lead to a warning instead of an error.
bdd1e1b
to
4723739
Compare
That sounds like a Blender-side issue to me. If Blender is setting
We can not change to FORCE_ON because internally, not all of our development/testing machines has zstd installed. Setting FORCE_ON would break DPCPP build when zstd is not present. |
Blender is assuming recent compiler versions offer the option and the associated documentation Line 203 in 8ced24f
When using that compiler flag with older compiler versions not supporting the feature, we only get a warning:
Compiling a blank program with
Only development machines should need zstd, and that's the goal if building only versions that provide device images compression. Testing machines shouldn't have more installed than OS+GPU drivers. |
That's because
IMO, the current behavior is correct: there should be an error when specifying |
I would agree, we should keep the current behavior and emit the error. Updating documentation to reflect the zstd requirement will definitely help any confusion moving forward. It should be the responsibility of who is building and providing the compiler to make sure required dependencies are met. |
Superseded by #17957 |
@uditagarwal97 and @mdtoguchi when updating the documentation I think it would be important to also provide a CMake macro as example (in the documentation) which can just be re-used by the users/developers when they want to add In #17957 I posted my experience with the current error message and from a user perspective it could happen quite easily that the user thinks the compiler or this feature is broken. |
I've improved the error message in #17990 |
… message (#17990) Based on the user's feedback in #17957 and #17914 --------- Co-authored-by: Steffen Larsen <[email protected]>
When using a compiler built without zstd support, it's preferable for --offload-compress option to lead to a warning instead of an error.