-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Add extension and implement fp control kernel property #11591
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] Add extension and implement fp control kernel property #11591
Conversation
9bbbe0b
to
b9ea81c
Compare
f96167d
to
58d52ae
Compare
58d52ae
to
238db10
Compare
sycl/doc/extensions/experimental/sycl_ext_intel_fp_control.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/experimental/sycl_ext_intel_fp_control.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/experimental/sycl_ext_intel_fp_control.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/experimental/sycl_ext_intel_fp_control.asciidoc
Outdated
Show resolved
Hide resolved
These modes turn out to be needed only for legacy directx 9.
sycl/doc/extensions/experimental/sycl_ext_intel_fp_control.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/experimental/sycl_ext_intel_fp_control.asciidoc
Outdated
Show resolved
Hide resolved
@@ -1176,8 +1176,13 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, | |||
A->getFilteredAttributeNameValuePairs(CGM.getContext()); | |||
|
|||
llvm::AttrBuilder FnAttrBuilder(Fn->getContext()); | |||
for (const auto &NameValuePair : NameValuePairs) | |||
for (const auto &NameValuePair : NameValuePairs) { | |||
if (NameValuePair.first == "sycl-floating-point-control" && |
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.
We shouldn't emit diagnostics in CodeGen. I'm actually not sure if/when community finds CodeGen diagnostic acceptable. Maybe @AaronBallman will have insights.
Having said that, we don't introspect properties currently in Sema (and we should aim to keep it that way to ensure compile time properties don't just become another version of attributes). So I don't think this diagnostic can be implemented in the FE.
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.
Ok, reverted frontend changes.
Changed this to static assert in SYCL headers - error is emitted if introduced compile time property is applied on non-ESIMD kernel. One downside of this is that error will not be generated if to compile with -fsycl-device-only, i.e. error is generated if to compile with -fsycl (this is because Kernel::isESIMD() is specialized in integration header and this specialization is available only for host compilation). I wasn't able to overcome that and didn't find another way which will not look ugly.
@gmlueck Would such static assert be an acceptable approach?
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.
Yes, that's OK.
Update checks because masks changed + other fixes
@AlexeySachkov Could you please take a look? |
No description provided.