Skip to content

Commit efbaf13

Browse files
Juthoclaude
andcommitted
Forward twistmask in the GPU treebraider method
The GPU method still had the old six-argument signature, so the new seven-argument call from `_braid!` fell back to the host `treebraider` and built a host transformer for GPU storage, which `add_transform_kernel!` in the GPU extension does not accept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 81d9bf0 commit efbaf13

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎ext/TensorKitGPUArraysExt.jl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ end
374374

375375
TensorKit.treebraider(
376376
A::Type{<:AnyGPUVector}, Vdst::TensorMapSpace, Vsrc::TensorMapSpace, p::Index2Tuple,
377-
conjsrc::Bool, levels::IndexTuple
378-
) = TensorKit.device_treebraider(A, Vdst, Vsrc, p, conjsrc, levels)
377+
conjsrc::Bool, levels::IndexTuple, twistmask::NTuple{N, Bool}
378+
) where {N} = TensorKit.device_treebraider(A, Vdst, Vsrc, p, conjsrc, levels, twistmask)
379379
TensorKit.treetransposer(
380380
A::Type{<:AnyGPUVector}, Vdst::TensorMapSpace, Vsrc::TensorMapSpace, p::Index2Tuple, conjsrc::Bool
381381
) = TensorKit.device_treetransposer(A, Vdst, Vsrc, p, conjsrc)

‎src/tensors/treetransformers.jl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ end
346346
end
347347

348348
"""
349-
device_treebraider(A, Vdst, Vsrc, p, conjsrc, levels)
349+
device_treebraider(A, Vdst, Vsrc, p, conjsrc, levels, twistmask)
350350
device_treetransposer(A, Vdst, Vsrc, p, conjsrc)
351351
device_treetracer(A, Vdst, Vsrc, p, q)
352352
device_treetwister(A, Vdst, Vsrc, p, conjsrc, twistmask, inv)

0 commit comments

Comments
 (0)