-
Notifications
You must be signed in to change notification settings - Fork 779
[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
Conversation
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
@intel/sycl-language-enabling-triage take a look please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
||
$kernel1 = comdat any | ||
|
||
$kernel2 = comdat any | ||
|
||
$kernel3 = comdat any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$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"); |
There was a problem hiding this comment.
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
Closing this PR because this work should be done in SYCLPropagateAspectsUsagePass. |
Another decision: #7419 |
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