Repository navigation
task: capture SYCL sources in the Coverity scan - #2401
Open
jharlow-intel wants to merge 1 commit into
Open
jharlow-intel wants to merge 1 commit into
jharlow-intel wants to merge 1 commit into
Conversation
…Coverity The generic clangcc/clangcxx templates parse the SYCL headers without SYCL mode, so most SYCL sources fail to emit: the weekly scan reports 46% of units, and only 9 of the 30 project sources are captured at all. Register icx/icpx with Coverity's Intel oneAPI compiler type instead, as mkl_umath does. That type emits each SYCL source as a host pass and a spir64 device pass, and the Scan build tool cannot parse the device pass, so the overall percentage stays at 66% even with every source captured. Fail the job unless every project source has a completed emit, so a partial capture does not use up a scan, and skip the upload on feature-branch dispatches so they validate capture without replacing master's results. Drop the _skbuild removal, a no-op on a fresh checkout.
jharlow-intel
requested review from
antonwolfy,
ndgrigorian and
vlad-perevezentsev
as code owners
October 26, 2026 14:37
Collaborator
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2401/index.html |
ndgrigorian
reviewed
Oct 27, 2026
Comment on lines
+87
to
+94
| # Register icx/icpx with Coverity's native Intel oneAPI compiler type. | ||
| # The generic clangcc/clangcxx templates parse <sycl/sycl.hpp> without | ||
| # SYCL mode and fail on device-only builtins (__ocl_sampler_t, | ||
| # __ocl_image2d_ro_t, ...), which left 21 of 30 sources uncaptured. | ||
| # The native type emits each SYCL source twice, as a host pass and a | ||
| # spir64 device pass; see the capture check below for the latter. | ||
| # intel_oneapi_icx is current; intel_icx:linux is the older spelling | ||
| # the Scan build tool still ships (what mkl_umath's scan resolves to). |
Collaborator
There was a problem hiding this comment.
Can we shorten this comment?
ndgrigorian
reviewed
Oct 27, 2026
Comment on lines
+108
to
+110
| # With --template, --compiler takes a bare executable name; capture | ||
| # matches on the name of the spawned executable, so this also covers | ||
| # the absolute icx/icpx paths CMake resolves. |
Collaborator
There was a problem hiding this comment.
Same here, very verbose
ndgrigorian
reviewed
Oct 27, 2026
Comment on lines
+130
to
+139
| # A partial capture still uploads happily and uses up a scan, so | ||
| # require every project source to be emitted. This is checked per | ||
| # source rather than via the "Emitted N (P%)" total because that | ||
| # total also counts the spir64 device passes, which the Scan build | ||
| # tool's emitter cannot parse (it trips over and then crashes in the | ||
| # SPIR-V builtin headers), capping P at 66% here. The host pass of | ||
| # each source is what gets analyzed. CMake's own try-compile probes | ||
| # under CMakeFiles/ are not project code and often fail. | ||
| # `|| true` because a no-match grep would otherwise trip pipefail and | ||
| # end the step before the errors below are printed. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The weekly Coverity scan reports
Emitted 18 C/C++ compilation units (46%), and counted per source it captures only 9 of dpctl's 30. The genericclangcc/clangcxxtemplates parse the SYCL headers without SYCL mode, so units fail on device-only builtins like__ocl_sampler_t. Found while reviewing IntelPython/dpnp#3070, which copied this setup.icx/icpxwith Coverity's native Intel oneAPI compiler type (intel_icx:linuxin the current Scan build tool), as mkl_umath does. That captures all 30 sources.Emitted (P%)total at 66%, so the job now fails unless every project source has a completed emit, instead of only on zero units.rm -rf _skbuild, a no-op on a fresh checkout.Validation, dispatched on this branch: run 40340192472 reports 30 of 30 sources and skips the upload. The same check fails on the current master log (9 of 30).