From e49498f616dd4bbf793667a09313b06c36f978a0 Mon Sep 17 00:00:00 2001 From: Po Yen Chen Date: Mon, 8 Apr 2024 12:32:07 +0000 Subject: [PATCH] Set fp8 rounding error for check_err() --- example/ck_tile/01_fmha/fmha_fwd.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/example/ck_tile/01_fmha/fmha_fwd.cpp b/example/ck_tile/01_fmha/fmha_fwd.cpp index 5970aa13cb..f0c282cbb9 100644 --- a/example/ck_tile/01_fmha/fmha_fwd.cpp +++ b/example/ck_tile/01_fmha/fmha_fwd.cpp @@ -103,6 +103,23 @@ auto get_elimit(int init_method) } } +template <> +auto get_elimit(int init_method) +{ + if(init_method == 0) + { + unsigned rounding_error = 0; + double atol = 2e-3; + return ck_tile::make_tuple(rounding_error, atol); + } + else + { + unsigned rounding_error = 1; + double atol = 0.0625; + return ck_tile::make_tuple(rounding_error, atol); + } +} + template bool run(const ck_tile::ArgParser& arg_parser) {