Skip to content

[Driver][SYCL] Adjust /MD settings for SYCL device compilations #2497

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

Merged

Conversation

mdtoguchi
Copy link
Contributor

When setting /MD (by default) we do not want to pass the _MT and _DLL
predefines to the device compilations, only the host for clang-cl

v-klochkov
v-klochkov previously approved these changes Sep 19, 2020
@mdtoguchi
Copy link
Contributor Author

I was a little over zealous in determining device compilations - cleaned that up. Also make sure that the error message of usage is only emitted once.

v-klochkov
v-klochkov previously approved these changes Sep 20, 2020
AGindinson
AGindinson previously approved these changes Sep 21, 2020
Copy link
Contributor

@AGindinson AGindinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I have to note that the mask/lambda solution feels really neat to me :)

v-klochkov
v-klochkov previously approved these changes Sep 21, 2020
@v-klochkov
Copy link
Contributor

Oops, I did not notice sycl-MD-default.cpp test failed.
@mdtoguchi - would you please fix it?

@mdtoguchi mdtoguchi dismissed stale reviews from v-klochkov and AGindinson via 11aa94f September 21, 2020 20:22
@mdtoguchi mdtoguchi force-pushed the private/mdtoguchi/restrict-DLL-MT-device branch from 1450afd to 11aa94f Compare September 21, 2020 20:22
@v-klochkov v-klochkov merged commit 0092d4d into intel:sycl Sep 21, 2020
v-klochkov added a commit to v-klochkov/llvm that referenced this pull request Mar 26, 2021
…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 <[email protected]>
v-klochkov added a commit that referenced this pull request Mar 31, 2021
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants