You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4baf4fe
Browse filesBrowse the repository at this point in the historyBrowse files
No behavioural changes; each hunk silences a report that JET cannot see through.
Inference cannot narrow a `local` binding that is only assigned inside a branch,
so replace the sentinel-by-undefinedness idiom with real sentinel values:
`@cached`'s `hasparams`/`typed` flags become `nothing` checks on `params`/`typeex`,
`planar_trace`'s `local i, j` becomes `i = j = 0`, and `_construct_braidingtensors!`
tracks `V1`/`V2` as `nothing` rather than via `foundV1`/`foundV2`.
`OneOrNoneIterator`'s default `state = true` is a `Bool`, but a recursive call
passes an `Int`, so `if state` is reported as a non-boolean context; `isone`
accepts both and keeps the `Bool` default.
`fusiontensor` used `TupleTools.prod(d)` on a value inferred as
`Union{Tuple, NamedTuple}`; `reshape(F, :, sz[end])` computes the same leading
dimension without the union split.
The remaining reports came from functions that serve both tensors and spaces
under one name. Julia narrows a slot after a call that would otherwise throw a
`MethodError`, so an untyped argument passed to such a function is refined to
`Union{AbstractTensorMap, TensorMapSpace}` rather than to a tensor, and the next
call splits on a branch that has no method.
`_braid!`/`_transpose!` are fixed structurally rather than by annotation: they
now take `space(tdst)`/`space(tsrc)` once and pass the spaces to both
`spacecheck_transform` and `treebraider`/`treetransposer`, whose tensor-accepting
forwarding methods are therefore removed. `space` has no space-accepting method,
so this narrows the arguments on its own, and the non-dense path now computes two
spaces instead of four.
Where no such restructuring applies, the contract is written down instead:
`_trace_permute!` (matching `add_transform!` next door), the
`UniqueTreeTransformer`/`GenericTreeTransformer` constructors (`::HomSpace`,
their only caller always passes one), `parenttype(::Type{Union{}})`, and the
primal `A` of `trace_permute_pullback_ΔA!`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments