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] Remove wrapper headers #229

Merged
merged 1 commit into from
Jun 19, 2019
Merged

[SYCL] Remove wrapper headers #229

merged 1 commit into from
Jun 19, 2019

Conversation

againull
Copy link
Contributor

Even when compiling for the device, code meant only for host execution
must be semantically analyzable. Existing wrapper headers were initially
created to resolve this problem. But now -aux-triple is used to pass
target triple of opposite side of compilation. Clang knows target triple
for both sides of compilation so that preprocessor macros and target
builtins from both sides are available. That is why there is no need in
existing wrapper headers with stub definitions since they break
compilation for cases when standard headers are included.

Approach with -aux-triple is not complete solution. Host headers might
provide definitions relying on host inline asm, intrinsics, using types
not lowerable in device code. So we will need to provide a solution to
overload some definitions for the device or to define only some macro
for host headers. This will be resolved in other commits.

Signed-off-by: Artur Gainullin [email protected]

Even when compiling for the device, code meant only for host execution
must be semantically analyzable. Existing wrapper headers were initially
created to resolve this problem. But now -aux-triple is used to pass
target triple of opposite side of compilation. Clang knows target triple
for both sides of compilation so that preprocessor macros and target
builtins from both sides are available. That is why there is no need in
existing wrapper headers with stub definitions since they break
compilation for cases when standard headers are included.

Approach with -aux-triple is not complete solution. Host headers might
provide definitions relying on host inline asm, intrinsics, using types
not lowerable in device code. So we will need to provide a solution to
overload some definitions for the device or to define only some macro
for host headers. This will be resolved in other commits.

Signed-off-by: Artur Gainullin <[email protected]>
@againull againull requested a review from bader June 19, 2019 01:11
Copy link
Contributor

@keryell keryell left a comment

Choose a reason for hiding this comment

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

Yes. We need to find a good way to address the fundamental problem later...

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