From 8bd46b67e12aee26e1c9743e9e9f322705e668d3 Mon Sep 17 00:00:00 2001 From: Christian Guinard <28689358+christiangnrd@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:49:52 -0400 Subject: [PATCH] Simpler fix --- test/random.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/random.jl b/test/random.jl index 3066acb5..88180e94 100644 --- a/test/random.jl +++ b/test/random.jl @@ -12,7 +12,8 @@ const OOPLACE_TUPLES = [[(Metal.rand, rand, T) for T in RAND_TYPES]; rng = Metal.MPS.RNG() @testset "$f with $T" for (f, T) in INPLACE_TUPLES - @testset "$d" for d in (1, 3, (3, 3), (3, 3, 3), 16, (16, 16), (16, 16, 16), (1000,), (1000,1000)) + # d == 2 and d == 3 are to hit the test cases where sizeof(A) <= 4 + @testset "$d" for d in (2, 3, (3, 3), (3, 3, 3), 16, (16, 16), (16, 16, 16), (1000,), (1000,1000)) A = MtlArray{T}(undef, d) # default_rng @@ -224,7 +225,8 @@ const OOPLACE_TUPLES = [[(Metal.rand, rand, T) for T in RAND_TYPES]; end rng = Metal.MPS.RNG() @testset "$f with $T" for (f, T) in mps_tuples - @testset "$d" for d in (1, 3, (3, 3), (3, 3, 3), 16, (16, 16), (16, 16, 16), (1000,), (1000,1000)) + # d == 2 and d == 3 are to hit the test cases where sizeof(A) <= 4 + @testset "$d" for d in (2, 3, (3, 3), (3, 3, 3), 16, (16, 16), (16, 16, 16), (1000,), (1000,1000)) A = zeros(T, d) if (prod(d) * sizeof(T)) % 4 == 0 f(rng, A)