-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] defer kernel diagnostics #181
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
return S.DeviceKnownEmittedFns.count(FD) > 0; | ||
} | ||
|
||
Sema::DeviceDiagBuilder Sema::SYCLDiagIfDeviceCode(SourceLocation Loc, |
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.
Hi Premanand, I need something like this function to avoid emitting an error for a function that has varargs and which is not part of DEVICE code.
In my case I have "include <stdio.h>" in the beginning of the source file and no uses of any functions like printf(f, ...) in DEVICE code, but clang still reports an error on Windows for such code.
Q1: Would your fix help with this error: "variadic function cannot use spir_function calling convention" emitted from SemaType.cpp:7014 ?
If NO, can this patch be extended to handle that case?
Q2: This MergeRequest was created almost 2 weeks ago. Is there some ETA for this fix approval/merge?
241f1c6
to
30d5d1a
Compare
Signed-off-by: Premanand M Rao <premanand.m.rao@intel.com>
30d5d1a
to
b2aec3b
Compare
@@ -1494,7 +1494,8 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) { | |||
Result = Context.DoubleTy; | |||
break; | |||
case DeclSpec::TST_float128: | |||
if (!S.Context.getTargetInfo().hasFloat128Type() && | |||
if (!S.Context.getTargetInfo().hasFloat128Type() && | |||
!S.getLangOpts().SYCLIsDevice && |
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.
Because of this change we silent usage of __float128
in device code.
Interesting observation: __float128
type variable in device code turns into fp128
type variable in LLVM IR and after conversion to SPIRV and back, I see half
(!) type variable.
@bader , @AlexeySachkov FYI.
But, of course, It helps do not emit error: __float128 is not supported on this target
from host code when we compile for device.
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.
Because of this change we silent usage of
__float128
in device code.
It sounds like a bug. We should not allow __float128
in device code, so I guess the right fix is use differed diagnostic instead of skipping it.
* [SYCL] Moved tests introduced in intel#3255 * [SYCL] Fix issues found in CI - fix target tripple used by default to spir64-unknown-unknown-sycldevice; - remove obsolet LIT parameters (target_triple, host_triple); - enable tests for CPU and ACC devices.
Signed-off-by: Premanand M Rao premanand.m.rao@intel.com