Skip to content

Only count compiled specializations in the launch specialization test - #770

Merged
maleadt merged 1 commit into
mainfrom
tb/launch-spec-test
Nov 18, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/launch-spec-test

Conversation

@maleadt

@maleadt maleadt commented Nov 18, 2026

Copy link
Copy Markdown
Member

The launch specialization testset has failed on Julia nightly on every build of main since #752 (54 == 39 at test/execution.jl:125). This went unnoticed because the nightly job is allowed to fail without failing the build.

Nothing is actually compiled per kernel type. with_ownership gets inlined into the launch, and what remains is a call to with_managed_locks(::Any, …), which isn't specialized either. But on Julia 1.15, calls to a @nospecialize method also create a method instance for the concrete argument types, without inferring or compiling it. The test counted every method instance, so these empty ones made it fail. It now counts only method instances that have code.

The specialization count now stays the same on 1.11, 1.13 and nightly. The test still catches what it is meant to: if the @nospecialize is removed from with_ownership, the count rises from 40 to 52 on nightly.

On Julia 1.15, calls to `@nospecialize` methods also create method instances
for the concrete argument types, without inferring or compiling them. The
launch specialization test counted those, so it failed on nightly for every
new kernel type although nothing is compiled for it: with_ownership is inlined
and the remaining call to with_managed_locks is not specialized. Count only
method instances that have code.
@maleadt maleadt added the ci CI infrastructure, flaky tests, the test suite. label Nov 18, 2026
@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.81%. Comparing base (ebbaa28) to head (c96e87f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #770      +/-   ##
==========================================
- Coverage   86.94%   86.81%   -0.14%     
==========================================
  Files          55       55              
  Lines        5195     5135      -60     
==========================================
- Hits         4517     4458      -59     
+ Misses        678      677       -1     

☔ 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.

@maleadt
maleadt merged commit 7ed9854 into main Nov 18, 2026
6 checks passed
@maleadt
maleadt deleted the tb/launch-spec-test branch November 18, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI infrastructure, flaky tests, the test suite.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant