From 22f9bb9247b3e384bbd9d8e7ff96501a29b49265 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Wed, 17 Jan 2024 16:26:43 +0000 Subject: [PATCH] Add test for #8029 (#8032) Tweak correctness_float16_t so that it uses one of the transcendal functions (sqrt) that were missing in Metal. --- test/correctness/float16_t.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/correctness/float16_t.cpp b/test/correctness/float16_t.cpp index 2c10f3e81ae6..d135e8108fa7 100644 --- a/test/correctness/float16_t.cpp +++ b/test/correctness/float16_t.cpp @@ -236,14 +236,14 @@ int run_test() { Param mul("mul"); Func output; - output(x, y) = x * y * (input(x, y) * mul); + output(x, y) = x * y * (sqrt(input(x, y)) * mul); Var xi, yi; output.gpu_tile(x, y, xi, yi, 8, 8); mul.set(float16_t(2.0f)); Buffer in(8, 8); - in.fill(float16_t(0.25f)); + in.fill(float16_t(0.0625f)); input.set(in); Buffer buf = output.realize({8, 8}); for (int y = 0; y < 8; y++) {