From 30dd274e7ebef964649d711b930ac9f612b4e454 Mon Sep 17 00:00:00 2001 From: Qianfeng Zhang Date: Tue, 12 Aug 2025 01:33:06 +0000 Subject: [PATCH] Adjust the atol and rtol and fix the check_err() using in example_hstu_attention.cpp --- .../18_hstu_attention/example_hstu_attention.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/example/ck_tile/18_hstu_attention/example_hstu_attention.cpp b/example/ck_tile/18_hstu_attention/example_hstu_attention.cpp index f1d0e5c461..c82651f552 100644 --- a/example/ck_tile/18_hstu_attention/example_hstu_attention.cpp +++ b/example/ck_tile/18_hstu_attention/example_hstu_attention.cpp @@ -191,8 +191,8 @@ static void show_hstu_attention_fwd_param(std::ostream& os, HstuAttentionFwdPara template auto get_elimit() { - double rtol = 1e-3; - double atol = 1e-3; + double rtol = 1.6e-2; + double atol = 1e-5; return ck_tile::make_tuple(rtol, atol); } @@ -200,8 +200,8 @@ auto get_elimit() template <> auto get_elimit() { - double rtol = 1e-3; - double atol = 1e-3; + double rtol = 1.6e-2; + double atol = 1e-5; return ck_tile::make_tuple(rtol, atol); } @@ -545,7 +545,7 @@ bool run(const ck_tile::ArgParser& arg_parser) auto [rtol, atol] = get_elimit(); res = ck_tile::check_err( - o_host, o_host_ref, std::string("hstu_attention output error"), atol, rtol); + o_host, o_host_ref, std::string("hstu_attention output error"), rtol, atol); }; if(measure_perf)