@@ -27,26 +27,26 @@ using LinearAlgebra: norm
27
27
@test collect (E2) ≈ E1
28
28
end
29
29
30
- # @testset "tensortrace" begin
31
- # A = randn(Float32, (5, 10, 10))
32
- # @tensor B1[a] := A[a, b′, b′]
33
- # @tensor B2[a] := CuArray(A) [a, b′, b′]
34
- # @test collect(B2) ≈ B1
35
-
36
- # C = randn(ComplexF32, (3, 20, 5, 3, 20, 4, 5))
37
- # @tensor D1[e, a, d] := C[a, b, c, d, b, e, c]
38
- # @tensor D2[e, a, d] := CuArray(C) [a, b, c, d, b, e, c]
39
- # @test collect(D2) ≈ D1
40
-
41
- # @tensor D3[a, e, d] := conj(C[a, b, c, d, b, e, c])
42
- # @tensor D4[a, e, d] := conj(CuArray(C) [a, b, c, d, b, e, c])
43
- # @test collect(D4) ≈ D3
44
-
45
- # α = randn(ComplexF32)
46
- # @tensor D5[d, e, a] := α * C[a, b, c, d, b, e, c]
47
- # @tensor D6[d, e, a] := α * CuArray(C) [a, b, c, d, b, e, c]
48
- # @test collect(D6) ≈ D5
49
- # end
30
+ @testset " tensortrace" begin
31
+ A = randn (Float32, (5 , 10 , 10 ))
32
+ @tensor B1[a] := A[a, b′, b′]
33
+ @tensor backend = tblis B2[a] := A [a, b′, b′]
34
+ @test B2 ≈ B1
35
+
36
+ C = randn (ComplexF32, (3 , 20 , 5 , 3 , 20 , 4 , 5 ))
37
+ @tensor D1[e, a, d] := C[a, b, c, d, b, e, c]
38
+ @tensor backend = tblis D2[e, a, d] := C [a, b, c, d, b, e, c]
39
+ @test D2 ≈ D1
40
+
41
+ @tensor D3[a, e, d] := conj (C[a, b, c, d, b, e, c])
42
+ @tensor backend = tblis D4[a, e, d] := conj (C [a, b, c, d, b, e, c])
43
+ @test D4 ≈ D3
44
+
45
+ α = randn (ComplexF32)
46
+ @tensor D5[d, e, a] := α * C[a, b, c, d, b, e, c]
47
+ @tensor backend = tblis D6[d, e, a] := α * C [a, b, c, d, b, e, c]
48
+ @test D6 ≈ D5
49
+ end
50
50
51
51
@testset " tensorcontract" begin
52
52
A = randn (Float32, (3 , 20 , 5 , 3 , 4 ))
0 commit comments