Skip to content

Conversation

@gmlueck
Copy link
Contributor

@gmlueck gmlueck commented Feb 16, 2022

Clarify the design doc to note that the C++ attribute
[[sycl_detail::uses_aspects()]] is only needed for the device
compiler and should be protected via #ifdef.

Clarify the design doc to note that the C++ attribute
`[[sycl_detail::uses_aspects()]]` is only needed for the device
compiler and should be protected via `#ifdef`.
@gmlueck gmlueck requested review from a team and s-kanaev and removed request for a team February 16, 2022 14:33
@gmlueck gmlueck requested a review from a team as a code owner February 16, 2022 14:33
@gmlueck
Copy link
Contributor Author

gmlueck commented Feb 28, 2022

Ping to reviewers

@Pennycook
Copy link
Contributor

Are we sure that we always want to hide it from the host compilation? Are there any cases where we might be able to deliver better errors (or something like that) if both the host and device compiler agree on what the attributes are?

If compatibility with third-party compilers is the goal, couldn't we also hide it from compilers that don't identify themselves as an appropriate version of Clang?

@gmlueck
Copy link
Contributor Author

gmlueck commented Feb 28, 2022

Are we sure that we always want to hide it from the host compilation? Are there any cases where we might be able to deliver better errors (or something like that) if both the host and device compiler agree on what the attributes are?

We can issue error messages from the device compiler. In fact, this seems preferable in cases like this because we get the error message even if the user has a third party host compiler. I can't think of an advantage to exposing this attribute on the host.

@Pennycook
Copy link
Contributor

We can issue error messages from the device compiler. In fact, this seems preferable in cases like this because we get the error message even if the user has a third party host compiler. I can't think of an advantage to exposing this attribute on the host.

Ok. Just wanted to be sure!

@bader bader merged commit 27cc930 into intel:sycl Mar 1, 2022
@gmlueck gmlueck deleted the gmlueck/uses-aspects-device-only branch March 1, 2022 13:48
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