Skip to content

Commit aa4aaee

Browse files
committed
Allow some scalar indexing
1 parent c6891b7 commit aa4aaee

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

test/amd/tensors.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,13 +432,15 @@ for V in spacelist
432432
t = AMDGPU.rand(T, W1, W2)
433433
@test t1 * (t1 \ t) t
434434
@test (t / t2) * t2 t
435-
@test t1 \ one(t1) inv(t1)
436-
@test one(t1) / t1 pinv(t1)
435+
AMDGPU.@allowscalar begin
436+
@test t1 \ one(t1) inv(t1)
437+
@test one(t1) / t1 pinv(t1)
438+
tp = pinv(t) * t
439+
@test tp tp * tp
440+
end
437441
@test_throws SpaceMismatch inv(t)
438442
@test_throws SpaceMismatch t2 \ t
439443
@test_throws SpaceMismatch t / t1
440-
tp = pinv(t) * t
441-
@test tp tp * tp
442444
end
443445
end
444446
@timedtestset "Multiplication and inverse: test via CPU" begin

0 commit comments

Comments
 (0)