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

Align name mangling in clang 13 host pass with upstream clang and restrict uses of createDeviceMangleContext() #720

Merged
merged 1 commit into from
Mar 16, 2022

Conversation

illuhad
Copy link
Collaborator

@illuhad illuhad commented Mar 10, 2022

In the hipSYCL 0.9.2+ name mangling logic for clang 13+, it turns out that we have used createDeviceMangleContext() too liberally in the host pass. It should only be used when the ABIs are incompatible, and the regular mangler otherwise.

The previous code could result in mangling mismatches between host and device in integrated multipass scenarios, which can lead to kernel launch failures.

This PR resolves those issues by replicating the logic that clang itself uses (e.g. in CGCUDANV.cpp) more closely.

Hopefully fixes #718

@illuhad
Copy link
Collaborator Author

illuhad commented Mar 10, 2022

@hipSYCL-ci-bot test2

@illuhad illuhad merged commit 1046a78 into develop Mar 16, 2022
@illuhad illuhad deleted the hotifx/clang-13-host-name-mangling branch March 16, 2022 17:45
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.

Using lambda in normal functions before sycl kernel (which also uses lambda) causes "Cannot find Symbol"
1 participant