Compiler: abstract calls: type assert to help stability#57582
Merged
aviatesk merged 3 commits intoMar 12, 2025
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Member
|
Huh, this is strange. It's just a |
Member
|
|
Member
|
So I'd suggest diff --git a/Compiler/src/abstractinterpretation.jl b/Compiler/src/abstractinterpretation.jl
index 8035216f1e..2a904e5688 100644
--- a/Compiler/src/abstractinterpretation.jl
+++ b/Compiler/src/abstractinterpretation.jl
@@ -2621,7 +2621,8 @@ end
function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f),
arginfo::ArgInfo, si::StmtInfo, sv::AbsIntState,
max_methods::Int = get_max_methods(interp, f, sv))
- (; fargs, argtypes) = arginfo
+ argtypes::Vector{Any} = arginfo.argtypes
+ fargs = arginfo.fargs
la = length(argtypes)
𝕃ᵢ = typeinf_lattice(interp)
if isa(f, Builtin)for now. |
It seems `la` is getting inferred as `Integer` instead of as `Int` for some reason. This reduces the number of invalidations from 2061 to 2046 on running this code: ```julia struct I <: Integer end Base.Int64(::I) = 7 ```
e041bb0 to
6139d7c
Compare
nsajko
commented
Mar 12, 2025
aviatesk
approved these changes
Mar 12, 2025
Member
|
(I took the liberty of adding the backport label since it helps with invalidations: #60807) |
KristofferC
pushed a commit
that referenced
this pull request
Mar 3, 2026
(cherry picked from commit ce747fe)
mtfishman
added a commit
to ITensor/BlockSparseArrays.jl
that referenced
this pull request
Apr 16, 2026
Julia v1.12.6 fixed type inference for abstract array dispatch (JuliaLang/julia#57582), which makes JLArray-backed BlockSparseMatrix operations (eig, svd, qr, iszero on views) work correctly. Use `broken = gpu_broken` with a VERSION check so tests remain broken on older Julia versions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 16, 2026
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.
It seems
lais getting inferred asIntegerinstead of asIntfor some reason.This reduces the number of invalidations on running this code from 456 to 219: