Skip to content

Stop excluding device code from coverage - #641

Merged
maleadt merged 1 commit into
mainfrom
tb/device-coverage
Sep 23, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/device-coverage

Conversation

@maleadt

@maleadt maleadt commented Sep 23, 2026

Copy link
Copy Markdown
Member

GPUCompiler now records line coverage of device code when compiling it (JuliaGPU/GPUCompiler.jl#844, in every 2.x release), so kernels no longer show up as uncovered. This PR drops the COV_EXCL markers around device code and the src/device codecov ignore, so reports show which device code the tests actually compile. Markers around host code that tests can't reach, like the error description tables, stay.

I checked this with Metal.jl on Julia 1.10 and 1.12 under --code-coverage: kernel bodies (reduce_warp, broadcast_linear, the scan kernels, ...) show up as covered, and device code that isn't compiled, like the non-shuffle reduce_group fallback, stays uncovered.

GPUCompiler now records line coverage of device code when compiling it
(JuliaGPU/GPUCompiler.jl#844, in every 2.x release), so kernels no longer
show up as uncovered. Drop the COV_EXCL markers around device code and the
src/device codecov ignore, so reports show which device code the tests
actually compile. Markers around host code that tests can't reach, like the
error description tables, stay.
@maleadt
maleadt merged commit e749da9 into main Sep 23, 2026
4 of 5 checks passed
@maleadt
maleadt deleted the tb/device-coverage branch September 23, 2026 18:42
@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.59%. Comparing base (d2e06ce) to head (1056928).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #641      +/-   ##
==========================================
- Coverage   81.53%   80.59%   -0.95%     
==========================================
  Files          50       54       +4     
  Lines        3607     3854     +247     
==========================================
+ Hits         2941     3106     +165     
- Misses        666      748      +82     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant