@@ -4,12 +4,9 @@ using BlockArrays:
44 BlockArrays,
55 Block,
66 BlockArray,
7- BlockIndexRange,
87 BlockRange,
9- BlockSlice,
108 BlockVector,
119 BlockedOneTo,
12- BlockedUnitRange,
1310 BlockedArray,
1411 BlockedVector,
1512 blockedrange,
@@ -35,9 +32,8 @@ using BlockSparseArrays:
3532 view!
3633using GPUArraysCore: @allowscalar
3734using JLArrays: JLArray, JLMatrix
38- using LinearAlgebra: Adjoint, Transpose, dot, mul!, norm
35+ using LinearAlgebra: Adjoint, Transpose, dot, norm
3936using SparseArraysBase: SparseArrayDOK, SparseMatrixDOK, SparseVectorDOK, storedlength
40- using TensorAlgebra: contract
4137using Test: @test , @test_broken , @test_throws , @testset , @inferred
4238using TestExtras: @constinferred
4339using TypeParameterAccessors: TypeParameterAccessors, Position
@@ -1120,20 +1116,7 @@ arrayts = (Array, JLArray)
11201116 @test a_dest[Block (2 , 1 )] == a1[Block (2 , 1 )]
11211117 @test a_dest[Block (3 , 4 )] == a2[Block (1 , 2 )]
11221118 end
1123- @testset " TensorAlgebra" begin
1124- a1 = dev (BlockSparseArray {elt} (undef, [2 , 3 ], [2 , 3 ]))
1125- a1[Block (1 , 1 )] = dev (randn (elt, size (@view (a1[Block (1 , 1 )]))))
1126- a2 = dev (BlockSparseArray {elt} (undef, [2 , 3 ], [2 , 3 ]))
1127- a2[Block (1 , 1 )] = dev (randn (elt, size (@view (a1[Block (1 , 1 )]))))
1128- # TODO : Make this work, requires customization of `TensorAlgebra.fusedims` and
1129- # `TensorAlgebra.splitdims` in terms of `BlockSparseArrays.blockreshape`,
1130- # and customization of `TensorAlgebra.:⊗` in terms of `GradedUnitRanges.tensor_product`.
1131- a_dest, dimnames_dest = contract (a1, (1 , - 1 ), a2, (- 1 , 2 ))
1132- @allowscalar begin
1133- a_dest_dense, dimnames_dest_dense = contract (Array (a1), (1 , - 1 ), Array (a2), (- 1 , 2 ))
1134- @test a_dest ≈ a_dest_dense
1135- end
1136- end
1119+
11371120 @testset " blockreshape" begin
11381121 a = dev (BlockSparseArray {elt} (undef, ([3 , 4 ], [2 , 3 ])))
11391122 a[Block (1 , 2 )] = dev (randn (elt, size (@view (a[Block (1 , 2 )]))))
0 commit comments