Skip to content

[SYCL][NATIVECPU] Fix linker errors for WorkGroup collective functions #15144

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
merged 14 commits into from
Sep 4, 2024

Conversation

PietroGhg
Copy link
Contributor

This PR fixes some link-time error related to WorkGroup collective functions:

  • adds overloads for the _Float16 data type and the __spirv_GroupBroadcast function, which leads to undefined reference linker errors.
  • Makes it so the call to clang-offload-deps is not emitted by the driver: the call introduced an llvm.used array, which contained function pointers to the kernels which prevented eliminating those functions from the module even when they are not needed anymore (due to inlining). This lead to other undefined reference linker errors for WorkGroup collectives.

} else {
printf("test failed!\n");
}
assert(fails == 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

The assert might get compiled away so it's probably better to return fails to not lose the error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's done, thank you

@PietroGhg
Copy link
Contributor Author

PietroGhg commented Aug 27, 2024

Hi @intel/llvm-reviewers-runtime, after #15142 the ownership of libdevice/nativecpu* has changed, but your approval is still required for this PR, could someone take a look? Thank you

@PietroGhg
Copy link
Contributor Author

@intel/llvm-gatekeepers this looks ready to merge, thank you

@martygrant martygrant merged commit 0686208 into intel:sycl Sep 4, 2024
13 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.

6 participants