Skip to content

Commit edfff88

Browse files
kshyattKatharine Hyatt
andauthored
Fix AMD tensor spaces to match CPU (#572)
Co-authored-by: Katharine Hyatt <katharine.hyatt@ugent.be>
1 parent 515b2c2 commit edfff88

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎test/amd/tensors.jl‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ for V in spacelist
9494
end
9595
end
9696
@timedtestset "Tensor Dict conversion" begin
97-
W = V1 ⊗ V2 ⊗ V3 ← V4 ⊗ V5
97+
W = V1 ⊗ V2 ← (V3 ⊗ V4 ⊗ V5)'
9898
for T in (Int, Float32, ComplexF64)
9999
t = @constinferred AMDGPU.rand(T, W)
100100
d = convert(Dict, t)
@@ -152,7 +152,7 @@ for V in spacelist
152152
end
153153
end
154154
@timedtestset "Trivial space insertion and removal" begin
155-
W = V1 ⊗ V2 ⊗ V3 ← V4 ⊗ V5
155+
W = V1 ⊗ V2 ← (V3 ⊗ V4 ⊗ V5)'
156156
for T in (Float32, ComplexF64)
157157
t = @constinferred AMDGPU.rand(T, W)
158158
t2 = @constinferred insertleftunit(t)
@@ -170,7 +170,7 @@ for V in spacelist
170170
end
171171
@test @constinferred(removeunit(t3, $(numind(t3)))) == t
172172
t4 = @constinferred insertrightunit(t, 3; dual = true)
173-
@test numin(t4) == numin(t) && numout(t4) == numout(t) + 1
173+
@test numin(t4) == numin(t) + 1 && numout(t4) == numout(t)
174174
for (c, b) in blocks(t)
175175
@test b == block(t4, c)
176176
end
@@ -380,7 +380,7 @@ for V in spacelist
380380
end
381381
@timedtestset "Multiplication and inverse: test via CPU" begin
382382
W1 = V1 ⊗ V2 ⊗ V3
383-
W2 = V4 ⊗ V5
383+
W2 = (V4 ⊗ V5)'
384384
for T in (Float32, Float64, ComplexF32, ComplexF64)
385385
t1 = AMDGPU.rand(T, W1, W1)
386386
t2 = AMDGPU.rand(T, W2, W2)

0 commit comments

Comments
 (0)