Skip to content
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] Fix Windows CL SYCL device library detection logic #12947

Merged
merged 2 commits into from
Mar 9, 2024

Conversation

sarnex
Copy link
Contributor

@sarnex sarnex commented Mar 7, 2024

If it's no RDC, the extension will definitely be BC. We need to switch the condition order.

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
Comment on lines +421 to +422
else if (HostTC->getTriple().isWindowsMSVCEnvironment() &&
C.getDriver().IsCLMode())
Copy link
Contributor

Choose a reason for hiding this comment

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

I know that this was already there - but it seems redundant. Would this be sufficient?

Suggested change
else if (HostTC->getTriple().isWindowsMSVCEnvironment() &&
C.getDriver().IsCLMode())
else if (HostTC->getTriple().isWindowsMSVCEnvironment())

Copy link
Contributor Author

@sarnex sarnex Mar 8, 2024

Choose a reason for hiding this comment

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

Do we always use CL mode on windows for all possible compiler executables (icpx, dpcpp, clang, etc)? I thought some of them had different effects (like even with the same oneapi install, calling icpx vs clang++ in the compiler folder would set different flags like fastmath/inining/etc, and I thought CL mode might be one of them). If Windows doesn't always use CL mode or if we aren't sure I would prefer not to change this in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

CL mode is tied to clang-cl, which is used on Windows in general. It also implies MSVC based targets (even when invoked on Linux). But of course, you can target MSVC with clang++ if you wanted, and vice-versa. Usage of clang++ on Windows also implies MSVC. I think this may cause a disconnect here. I'm fine with leaving it here and looking into an update later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, let me know if I should make an internal tracker for followup.

@sarnex sarnex merged commit 8d2d870 into intel:sycl Mar 9, 2024
12 checks passed
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.

2 participants