-
Notifications
You must be signed in to change notification settings - Fork 752
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][UX] Diagnostic for undefined device functions #1026
[SYCL][UX] Diagnostic for undefined device functions #1026
Conversation
Diagnostic for undefined kernel functions -> Diagnostic for undefined device functions |
As long as we can circumvent the check with SYCL_EXTERNAL for functions we want to deal with in the FPGA device compiler, I think we are good from the FPGA side. |
@d86thoffner, as far as I understand both approaches from the description of this PR are OK for you, aren't they? |
Yes, as I tried to say, looks to me like this is not triggered for functions marked SYCL_EXTERNAL. |
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.
Clang changes look fine delta @Fznamznon format comments.
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
9df6f9d
to
cdfee11
Compare
@@ -17940,6 +17940,12 @@ Decl *Sema::getObjCDeclContext() const { | |||
} | |||
|
|||
Sema::FunctionEmissionStatus Sema::getEmissionStatus(FunctionDecl *FD) { | |||
// Due to SYCL functions are template we check if they have appropriate |
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.
Doesn't seem to be a full sentence. Word missing?
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.
Can't see what is missing in "Due to SYCL functions are template we check if they have appropriate attribute prior to checking if it is a template"
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com> Co-Authored-By: Alexey Bader <alexey.bader@intel.com>
…e_api_test * origin/sycl: [SYCL][NFC] Fix static code analysis concerns (intel#1283) [SYCL] Fix the test/basic_tests/buffer/subbuffer.cpp (intel#1277) [SYCL][CUDA] Implement the program kernel names query (intel#1248) [SYCL] Honor the LLVM_LIBDIR_SUFFIX variable at installation time (intel#1261) [SYCL][UX] Diagnostic for undefined device functions (intel#1026) [SYCL] Reverse reqd_work_group_size attribute (intel#1234) [SYCL] Rename project to oneAPI DPC++ Compiler (intel#1249) [SYCL][XPTI] Instrumentation of SYCL runtime with XPTI (intel#1129)
…st_commit * otcshare/sycl: (469 commits) [SYCL] Implement thread-local storage restriction (intel#1281) [Driver][SYCL][FPGA] Adjust the output location for the project report (intel#1278) [SYCL][NFC] Fix static code analysis concerns (intel#1283) [SYCL] Fix the test/basic_tests/buffer/subbuffer.cpp (intel#1277) [SYCL][CUDA] Implement the program kernel names query (intel#1248) [SYCL] Honor the LLVM_LIBDIR_SUFFIX variable at installation time (intel#1261) [SYCL][UX] Diagnostic for undefined device functions (intel#1026) [SYCL] Reverse reqd_work_group_size attribute (intel#1234) [SYCL] Rename project to oneAPI DPC++ Compiler (intel#1249) [SYCL][XPTI] Instrumentation of SYCL runtime with XPTI (intel#1129) [SYCL] Add buffer dimensions restriction (intel#1147) [SYCL][NFC] Update copyright header in handler files (intel#1271) [SYCL][NFC] Format the code with clang-format [SYCL][Test] Fix SYCL library location path for LIT tests (intel#1228) [SYCL][NFC] Fix doxygen warnings (intel#1270) [SYCL][CUDA] Add the CUDA backend to the deploy-sycl-toolchain target (intel#1268) [SYCL][NFC] Fix a misleading comment regarding the SYCL flow (intel#1266) Change capability for SpecId decoration README.md: Mention retrieving llvm archive signatures travis: Restore macOS builds ...
…_accessor_refactor * origin/sycl: (454 commits) [SYCL][NFC] Fix static code analysis concerns (intel#1283) [SYCL] Fix the test/basic_tests/buffer/subbuffer.cpp (intel#1277) [SYCL][CUDA] Implement the program kernel names query (intel#1248) [SYCL] Honor the LLVM_LIBDIR_SUFFIX variable at installation time (intel#1261) [SYCL][UX] Diagnostic for undefined device functions (intel#1026) [SYCL] Reverse reqd_work_group_size attribute (intel#1234) [SYCL] Rename project to oneAPI DPC++ Compiler (intel#1249) [SYCL][XPTI] Instrumentation of SYCL runtime with XPTI (intel#1129) [SYCL] Add buffer dimensions restriction (intel#1147) [SYCL][NFC] Update copyright header in handler files (intel#1271) [SYCL][NFC] Format the code with clang-format [SYCL][Test] Fix SYCL library location path for LIT tests (intel#1228) [SYCL][NFC] Fix doxygen warnings (intel#1270) [SYCL][CUDA] Add the CUDA backend to the deploy-sycl-toolchain target (intel#1268) Change capability for SpecId decoration README.md: Mention retrieving llvm archive signatures travis: Restore macOS builds Fix DebugInfo creation after LLVM change 7a42bab Add more missing mixes Add missing fixes ...
Brand new diagnostic introduced: "call an undefined function w/o SYCL_EXTERNAL attribute"
The diagnostic is displayed for functions definitions of which are not available when its declaration is not marked with SYCL_EXTERNAL attribute if and only if the method is found in callgraph (i.e. it will be called during runtime).
For this purpose there is a hack: attribute
__SYCL__HAS_DEFINITION__
is used to suppress the diagnostic for__spirv_*
and__spirv_ocl_*
functions.Standard library functions implementation is either of:
The patch does not provide a facility for the second approach. Anyway, the approach should be smth similar to already used in devicelib.