Skip to content

Commit 45548a8

Browse files
committed
change eltype of test arrays to ComplexF32
1 parent fbf59b5 commit 45548a8

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

test/integration/omeinsum.jl

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ using Reactant
33
using OMEinsum
44

55
@testset "sum" begin
6-
a = Reactant.TestUtils.construct_test_array(ComplexF64, 2, 3)
6+
a = Reactant.TestUtils.construct_test_array(ComplexF32, 2, 3)
77
a_re = Reactant.to_rarray(a)
88

99
f = ein"ij->"
@@ -23,7 +23,7 @@ using OMEinsum
2323
end
2424

2525
@testset "trace" begin
26-
a = Reactant.TestUtils.construct_test_array(ComplexF64, 3, 3)
26+
a = Reactant.TestUtils.construct_test_array(ComplexF32, 3, 3)
2727
a_re = Reactant.to_rarray(a)
2828

2929
f = ein"ii->"
@@ -33,15 +33,15 @@ end
3333
end
3434

3535
@testset "transpose" begin
36-
a = Reactant.TestUtils.construct_test_array(ComplexF64, 2, 3)
36+
a = Reactant.TestUtils.construct_test_array(ComplexF32, 2, 3)
3737
a_re = Reactant.to_rarray(a)
3838

3939
f = ein"ij->ji"
4040
c = f(a)
4141
c_re = @jit f(a_re)
4242
@test c c_re
4343

44-
a = Reactant.TestUtils.construct_test_array(ComplexF64, 2, 3, 4, 5)
44+
a = Reactant.TestUtils.construct_test_array(ComplexF32, 2, 3, 4, 5)
4545
a_re = Reactant.to_rarray(a)
4646

4747
f = ein"ijkl->jilk"
@@ -51,8 +51,8 @@ end
5151
end
5252

5353
@testset "matmul" begin
54-
a = Reactant.TestUtils.construct_test_array(ComplexF64, 2, 3)
55-
b = Reactant.TestUtils.construct_test_array(ComplexF64, 3, 4)
54+
a = Reactant.TestUtils.construct_test_array(ComplexF32, 2, 3)
55+
b = Reactant.TestUtils.construct_test_array(ComplexF32, 3, 4)
5656
a_re = Reactant.to_rarray(a)
5757
b_re = Reactant.to_rarray(b)
5858

@@ -63,8 +63,8 @@ end
6363
end
6464

6565
@testset "hadamard product" begin
66-
a = Reactant.TestUtils.construct_test_array(ComplexF64, 2, 3)
67-
b = Reactant.TestUtils.construct_test_array(ComplexF64, 2, 3)
66+
a = Reactant.TestUtils.construct_test_array(ComplexF32, 2, 3)
67+
b = Reactant.TestUtils.construct_test_array(ComplexF32, 2, 3)
6868
a_re = Reactant.to_rarray(a)
6969
b_re = Reactant.to_rarray(b)
7070

@@ -73,7 +73,7 @@ end
7373
c_re = @jit f(a_re, b_re)
7474
@test c c_re
7575

76-
b = Reactant.TestUtils.construct_test_array(ComplexF64, 3, 2)
76+
b = Reactant.TestUtils.construct_test_array(ComplexF32, 3, 2)
7777
b_re = Reactant.to_rarray(b)
7878
f = ein"ij,ji->ij"
7979
c = f(a, b)
@@ -82,8 +82,8 @@ end
8282
end
8383

8484
@testset "inner product" begin
85-
a = Reactant.TestUtils.construct_test_array(ComplexF64, 4, 3)
86-
b = Reactant.TestUtils.construct_test_array(ComplexF64, 3, 4)
85+
a = Reactant.TestUtils.construct_test_array(ComplexF32, 4, 3)
86+
b = Reactant.TestUtils.construct_test_array(ComplexF32, 3, 4)
8787
a_re = Reactant.to_rarray(a)
8888
b_re = Reactant.to_rarray(b)
8989

@@ -94,8 +94,8 @@ end
9494
end
9595

9696
@testset "outer product" begin
97-
a = Reactant.TestUtils.construct_test_array(ComplexF64, 2, 3)
98-
b = Reactant.TestUtils.construct_test_array(ComplexF64, 4, 5)
97+
a = Reactant.TestUtils.construct_test_array(ComplexF32, 2, 3)
98+
b = Reactant.TestUtils.construct_test_array(ComplexF32, 4, 5)
9999
a_re = Reactant.to_rarray(a)
100100
b_re = Reactant.to_rarray(b)
101101

@@ -116,8 +116,8 @@ end
116116
end
117117

118118
@testset "scale" begin
119-
a = Reactant.TestUtils.construct_test_array(ComplexF64, 2, 3)
120-
b = ComplexF64[2.0]
119+
a = Reactant.TestUtils.construct_test_array(ComplexF32, 2, 3)
120+
b = ComplexF32[2.0]
121121
a_re = Reactant.to_rarray(a)
122122
b_re = Reactant.to_rarray(b)
123123

@@ -128,8 +128,8 @@ end
128128
end
129129

130130
@testset "batch matmul" begin
131-
a = Reactant.TestUtils.construct_test_array(ComplexF64, 2, 3, 6)
132-
b = Reactant.TestUtils.construct_test_array(ComplexF64, 3, 4, 6)
131+
a = Reactant.TestUtils.construct_test_array(ComplexF32, 2, 3, 6)
132+
b = Reactant.TestUtils.construct_test_array(ComplexF32, 3, 4, 6)
133133
a_re = Reactant.to_rarray(a)
134134
b_re = Reactant.to_rarray(b)
135135

@@ -145,8 +145,8 @@ end
145145
end
146146

147147
@testset "tensor contraction" begin
148-
a = Reactant.TestUtils.construct_test_array(ComplexF64, 2, 4, 3)
149-
b = Reactant.TestUtils.construct_test_array(ComplexF64, 4, 5, 3)
148+
a = Reactant.TestUtils.construct_test_array(ComplexF32, 2, 4, 3)
149+
b = Reactant.TestUtils.construct_test_array(ComplexF32, 4, 5, 3)
150150
a_re = Reactant.to_rarray(a)
151151
b_re = Reactant.to_rarray(b)
152152

0 commit comments

Comments
 (0)