Skip to content

Stop excluding device code from coverage - #1099

Merged
maleadt merged 1 commit into
mainfrom
tb/device-coverage
Sep 24, 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.
@luraess

luraess commented Sep 23, 2026

Copy link
Copy Markdown
Member

The hip_rocarray/multi_gpu failure in the CSCS 1.12 job (id1 == 1 evaluated 2 == 1) is unrelated to this PR. It's a test-order leak: device/launch ran earlier on the same worker, and the HIPStream finalizer then pinned each later test task on that worker to device 2. It has shown up the same way on main and #1066. Fix in #1104 .

@maleadt
maleadt merged commit a4dc61b into main Sep 24, 2026
3 of 5 checks passed
@maleadt
maleadt deleted the tb/device-coverage branch September 24, 2026 04:35
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.

2 participants