Skip to content

[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

Merged
merged 1 commit into from
Jul 12, 2019
Merged

Conversation

premanandrao
Copy link
Contributor

Signed-off-by: Premanand M Rao premanand.m.rao@intel.com

return S.DeviceKnownEmittedFns.count(FD) > 0;
}

Sema::DeviceDiagBuilder Sema::SYCLDiagIfDeviceCode(SourceLocation Loc,
Copy link
Contributor

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?

@bader bader added the upstream This change is related to upstreaming SYCL support to llorg. label Jun 17, 2019
@premanandrao premanandrao force-pushed the remote_defer_diag branch 2 times, most recently from 241f1c6 to 30d5d1a Compare July 10, 2019 11:36
Signed-off-by: Premanand M Rao <premanand.m.rao@intel.com>
@bader bader merged commit 047bfea into intel:sycl Jul 12, 2019
@@ -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 &&
Copy link
Contributor

@Fznamznon Fznamznon Dec 16, 2019

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.

Copy link
Contributor

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.

aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Feb 23, 2023
* [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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream This change is related to upstreaming SYCL support to llorg.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants