Skip to content

Commit

Permalink
Add test for halide#8029 (halide#8032)
Browse files Browse the repository at this point in the history
Tweak correctness_float16_t so that it uses one of the transcendal functions (sqrt) that were missing in Metal.
  • Loading branch information
steven-johnson authored and ardier committed Mar 3, 2024
1 parent 9a31620 commit 883c69b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/correctness/float16_t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,14 @@ int run_test() {
Param<float16_t> 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<float16_t> in(8, 8);
in.fill(float16_t(0.25f));
in.fill(float16_t(0.0625f));
input.set(in);
Buffer<float16_t> buf = output.realize({8, 8});
for (int y = 0; y < 8; y++) {
Expand Down

0 comments on commit 883c69b

Please sign in to comment.