Repository navigation
Only count compiled specializations in the launch specialization test - #770
Merged
Merged
Conversation
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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
launch specializationtestset has failed on Julia nightly on every build ofmainsince #752 (54 == 39attest/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_ownershipgets inlined into the launch, and what remains is a call towith_managed_locks(::Any, …), which isn't specialized either. But on Julia 1.15, calls to a@nospecializemethod 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
@nospecializeis removed fromwith_ownership, the count rises from 40 to 52 on nightly.