Repository navigation
[SYCL][Driver]Fix ignoring of parallel compilation driver flag when producing SYCLBIN executables - #23570
Conversation
| Expected<StringRef> OutputOrErr = compileDeviceAndBundle( | ||
| SplitModules[I].ModuleFilePath, LinkerArgs, Triple, | ||
| BackendOptions, AOTDeviceArgs); |
There was a problem hiding this comment.
Looking further down in usage with compileDeviceAndBundle there are calls that modify the LinkerArgs DerivedArgList via Args.MakeArgString. We need to make this thread safe. The SPIR-V side looks simpler, but the side that can call clang isn't something that can be resolved easily as far as I can see.
There was a problem hiding this comment.
Yeah, I decided to narrow the scope of this PR and only do the parallelization when the target is SPIR-V. In this aforementioned case, The Args.MakeArgStrings was only being used in a couple of places to prepare the translator arguments so I replaced its uses with string literals and static constexpr arrays which are thread-safe. Have a look at the latest changes please!
mdtoguchi
left a comment
There was a problem hiding this comment.
Thanks for the updates - LGTM
|
@intel/llvm-gatekeepers Consider merging this please! |
When the flag
-fsycl-max-parallel-link-jobsis specified during AOT compilation for a target together with the new offload driver flag, a warning is emitted letting the user know that the flag is unused by the toolchain. This means that the flag is not being passed to the linker wrapper. While not functionally critical, it does impact compilation times. This PR remedies this bug.