-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL][Driver] Make /MD default with -fsycl for clang/clang++ drivers #2480
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
[SYCL][Driver] Make /MD default with -fsycl for clang/clang++ drivers #2480
Conversation
… RT on win SYCL library is designed such a way that STL objects must cross the sycl.dll boundary, which is guaranteed to work safe on Windows only if the runtime in the app using sycl.dll and in sycl.dll is the same and is dynamic. It is not possible to implement safe approach for using sycl libraries built/linked with static C++ RT as it would cause having multiple copies of C++ objects (such as scheduler, etc), which are supposed to be singletones. This check reports a compile-time error when user tries to compile the application using sycl.dll with /MT or /MTd switches implying using static C++ runtime libcmt[d].lib. sycl.dll is built with /MD and sycld.dll is built with /MDd. Thus /MD and /MDd are allowed, and /MT /MTd switches are prohibited now.
a817cba
to
6d87519
Compare
That is odd that clang-format required me to do fixes that I did not really touch (only had changed preceding the problem places).
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.
LGTM
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.
Did you run clang format on this file? I see a lot of unrelated changes. I don’t mind committing them now, though.
No )) I did not want fixing clang-format for the rest of the file, but 'clang-format-check' buildbot required me to do that by reporting an error for the lines that I did not even touch. |
@mdtoguchi |
The new static_assert in sycl/stl.hpp causes many fails in LIT tests and requires elaborate fixes in LIT tests + maybe adding back-door macro disabling the static_assert. That is why I am going to keep in only clang driver changes in this PR |
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.
LGTM
Otherwise, the errors reported during device code compilation because device code cannot handle implib call.
…t -fsycl With -fsycl switch the dynamic runtime is used. The patches (intel#2478, intel#2480, intel#2497 implemented that with -fsycl. This patch adds check that dynamic runtime is used when -fsycl is not used. That is done by a static_assert in sycl/stl.hpp. Also, lots of LIT tests had to be changed to comply with the new requirement (apps must use dynamic C++ RT with use SYCL). Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
With -fsycl switch the dynamic runtime is used. The patches (#2478, #2480, #2497 implemented that with -fsycl. Applications using sycl headers and linked with sycl[d].dll must be linked with dynamic C++ runtime on Windows even if compiled without -fsycl. This patch adds a compile time warning emitted when wrong C++ runtime is used. Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
Add logic to emit only one global variable when both SPIRV builtin and OCL builtin variants are present in the source code. Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam@intel.com> Original commit: KhronosGroup/SPIRV-LLVM-Translator@2a247a49eddbc8f
Use UMF CUDA memory provider in UR
Use UMF CUDA memory provider in UR
… RT on win
SYCL library is designed such a way that STL objects must cross the sycl.dll
boundary, which is guaranteed to work safe on Windows only if the runtime
in the app using sycl.dll and in sycl.dll is the same and is dynamic.
It is not possible to implement safe approach for using sycl libraries
built/linked with static C++ RT as it would cause having multiple copies
of C++ objects (such as scheduler, etc), which are supposed to be
singletones.
This check reports a compile-time error when user tries to compile
the application using sycl.dll with /MT or /MTd switches implying
using static C++ runtime libcmt[d].lib.
sycl.dll is built with /MD and sycld.dll is built with /MDd.
Thus /MD and /MDd are allowed, and /MT /MTd switches are prohibited now.