Skip to content

[SYCL] Collect sycl_declared_aspects metadata #7359

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

Closed
wants to merge 5 commits into from

Conversation

KornevNikita
Copy link
Contributor

In scope of optional kernel features implementation we should also collect sycl_declared_aspects metadata to create right "aspects" property
spec: https://github.com/intel/llvm/blob/sycl/sycl/doc/design/OptionalDeviceFeatures.md#create-the-sycldevice-requirements-property-set

In scope of optional kernel features implementation we should also
collect sycl_declared_aspects metadata to right "aspects" property
spec: https://github.com/intel/llvm/blob/sycl/sycl/doc/design/OptionalDeviceFeatures.md#create-the-sycldevice-requirements-property-set
@KornevNikita KornevNikita requested a review from a team as a code owner November 10, 2022 20:07
@KornevNikita KornevNikita requested a review from a team November 14, 2022 10:42
@KornevNikita
Copy link
Contributor Author

@intel/sycl-language-enabling-triage take a look please

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +17 to +22

$kernel1 = comdat any

$kernel2 = comdat any

$kernel3 = comdat any
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$kernel1 = comdat any
$kernel2 = comdat any
$kernel3 = comdat any

constexpr std::pair<const char *, const char *> ReqdMDs[] = {
{"sycl_used_aspects", "aspects"}, {"sycl_fixed_targets", "fixed_target"}};
for (const Function &F : M) {
FindAspectsByMDName(F, "sycl_used_aspects");
Copy link
Contributor

Choose a reason for hiding this comment

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

sycl_used_aspects are propagated up to kernels and therefore, we could optimize this loop by limiting amount of functions we are looking for. Since sycl_declared_aspects is not yet being propagated, I suggest that for now we leave a comment about this potential optimization

@KornevNikita
Copy link
Contributor Author

Closing this PR because this work should be done in SYCLPropagateAspectsUsagePass.

@KornevNikita
Copy link
Contributor Author

Another decision: #7419

@KornevNikita KornevNikita deleted the has-device branch December 9, 2022 14: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.

3 participants