@@ -4,12 +4,9 @@ using BlockArrays:
4
4
BlockArrays,
5
5
Block,
6
6
BlockArray,
7
- BlockIndexRange,
8
7
BlockRange,
9
- BlockSlice,
10
8
BlockVector,
11
9
BlockedOneTo,
12
- BlockedUnitRange,
13
10
BlockedArray,
14
11
BlockedVector,
15
12
blockedrange,
@@ -35,9 +32,8 @@ using BlockSparseArrays:
35
32
view!
36
33
using GPUArraysCore: @allowscalar
37
34
using JLArrays: JLArray, JLMatrix
38
- using LinearAlgebra: Adjoint, Transpose, dot, mul!, norm
35
+ using LinearAlgebra: Adjoint, Transpose, dot, norm
39
36
using SparseArraysBase: SparseArrayDOK, SparseMatrixDOK, SparseVectorDOK, storedlength
40
- using TensorAlgebra: contract
41
37
using Test: @test , @test_broken , @test_throws , @testset , @inferred
42
38
using TestExtras: @constinferred
43
39
using TypeParameterAccessors: TypeParameterAccessors, Position
@@ -1120,20 +1116,7 @@ arrayts = (Array, JLArray)
1120
1116
@test a_dest[Block (2 , 1 )] == a1[Block (2 , 1 )]
1121
1117
@test a_dest[Block (3 , 4 )] == a2[Block (1 , 2 )]
1122
1118
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
+
1137
1120
@testset " blockreshape" begin
1138
1121
a = dev (BlockSparseArray {elt} (undef, ([3 , 4 ], [2 , 3 ])))
1139
1122
a[Block (1 , 2 )] = dev (randn (elt, size (@view (a[Block (1 , 2 )]))))
0 commit comments