Skip to content

Commit c7783fb

Browse files
lkdvosclaude
andcommitted
Keep JET analysis clean after rebase onto #521
`add_transform_kernel!` gained a `buffersize(tsrc, fblocks)` call in #521, but its `tdst`/`tsrc` are untyped, so the analysis widens `tsrc` to `Union{AbstractTensorMap, HomSpace}` and the `HomSpace` arm has no `buffersize` method. The only caller already passes tensor maps, and the two sibling methods take `DenseVector`, so annotate the signature to match. Also switch the `GenericTreeTransformer` matcher to `AnyFrameMethod`: #521 moved the `@debug` into a `taskforeach` closure, so the innermost frame is now a gensym'd closure name and `LastFrameMethod` no longer matches. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 7c7bbff commit c7783fb

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎src/tensors/indexmanipulations.jl‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,8 @@ function use_threaded_transform(t::AbstractTensorMap, transformer)
586586
end
587587

588588
function add_transform_kernel!(
589-
tdst, tsrc, p, transformer, α, β, backend, allocator, ntasks::Int
589+
tdst::AbstractTensorMap, tsrc::AbstractTensorMap, p, transformer,
590+
α, β, backend, allocator, ntasks::Int
590591
)
591592
I = sectortype(tdst)
592593
if FusionStyle(I) === UniqueFusion()

‎test/other/jet.jl‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ const IGNORED = (
1313
# `local variable kwargs may be undefined` inside `GenericTreeTransformer`, coming entirely
1414
# from Base's `@debug` expansion (`local msg, kwargs` bound in a short-circuit guard) rather
1515
# than from any TensorKit code: https://github.com/aviatesk/JET.jl/issues/860
16-
JET.LastFrameMethod(:GenericTreeTransformer),
16+
# `AnyFrameMethod` rather than `LastFrameMethod`: the `@debug` sits inside a `taskforeach`
17+
# closure, so the innermost frame is a gensym'd closure name rather than the constructor.
18+
JET.AnyFrameMethod(:GenericTreeTransformer),
1719
)
1820

1921
# also gated in runtests.jl; JET < 0.12 does not define `JET_AVAILABLE`

0 commit comments

Comments
 (0)