@@ -12,7 +12,7 @@ using TensorKit.TensorOperations: linearize, DefaultAllocator
1212using TensorKit. Factorizations
1313using TensorKit. Factorizations: AbstractAlgorithm
1414using TensorKit: SectorDict, tensormaptype, scalar, similarstoragetype, AdjointTensorMap, scalartype, project_symmetric_and_check
15- using TensorKit: StridedSubblocks, UniqueTreeTransformer, GenericTreeTransformer, @cached , TensorMapSpace, Index2Tuple, IndexTuple
15+ using TensorKit: UniqueTreeTransformer, GenericTreeTransformer, @cached , TensorMapSpace, Index2Tuple, IndexTuple
1616import TensorKit: randisometry, rand, randn, fill_braidingsubblock!, add_transform_kernel!
1717
1818function TensorKit. fill_braidingsubblock! (data:: TD , val) where {T, TD <: Union{<:AnyGPUMatrix{T}, <:StridedViews.StridedView{T, 4, <:AnyGPUArray{T}}} }
@@ -447,33 +447,32 @@ function _launch_generic!(data_dst, data_src, op, transformer, α, β, ::Val{N})
447447 return nothing
448448end
449449
450- const GPUStridedSubblocks = StridedSubblocks{<: AnyGPUArray }
451-
450+ # we don't want/need the `StridedSubblocks` here because that information is already in the transformer
452451TensorKit. _transform_subblocks (
453452 tdst:: TensorMap , tsrc:: TensorMap ,
454453 transformer:: Union{DeviceUniqueTreeTransformer, DeviceGenericTreeTransformer}
455- ) = StridedSubblocks (tdst), StridedSubblocks ( tsrc)
454+ ) = (tdst. data, tsrc. data )
456455
457456function TensorKit. add_transform_kernel! (
458- dst:: GPUStridedSubblocks , src:: GPUStridedSubblocks , p, conjsrc:: Bool ,
457+ dst:: AnyGPUVector , src:: AnyGPUVector , p, conjsrc:: Bool ,
459458 device:: DeviceUniqueTreeTransformer , α, β, backend, allocator, ntasks:: Int
460459 )
461460 N = length (linearize (p))
462461 op = conjsrc ? conj : identity
463- _launch_unique! (dst. data , src. data , op, device, α, β, Val (N))
462+ _launch_unique! (dst, src, op, device, α, β, Val (N))
464463 return nothing
465464end
466465
467466function TensorKit. add_transform_kernel! (
468- dst:: GPUStridedSubblocks , src:: GPUStridedSubblocks , p, conjsrc:: Bool ,
467+ dst:: AnyGPUVector , src:: AnyGPUVector , p, conjsrc:: Bool ,
469468 device:: DeviceGenericTreeTransformer , α, β, backend, allocator, ntasks:: Int
470469 )
471470 N = length (linearize (p))
472471 op = conjsrc ? conj : identity
473472 # one-tree blocks are a scaled permutation, which the unique kernel already handles; the
474473 # two kernels touch disjoint subblocks so the launch order does not matter
475- _launch_unique! (dst. data , src. data , op, device. unique_blocks, α, β, Val (N))
476- _launch_generic! (dst. data , src. data , op, device, α, β, Val (N))
474+ _launch_unique! (dst, src, op, device. unique_blocks, α, β, Val (N))
475+ _launch_generic! (dst, src, op, device, α, β, Val (N))
477476 return nothing
478477end
479478
0 commit comments