From 90d84eaeae6a535f98e3080814503b1b664fee2d Mon Sep 17 00:00:00 2001 From: "PoYen, Chen" Date: Sun, 4 Aug 2024 02:53:40 +0000 Subject: [PATCH] Fix seqlen_k_min for pre-fill case (1 -> 0) --- example/ck_tile/01_fmha/fmha_fwd.cpp | 2 +- example/ck_tile/01_fmha/utils.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/ck_tile/01_fmha/fmha_fwd.cpp b/example/ck_tile/01_fmha/fmha_fwd.cpp index 0bd6c46fd6..4b30e1670e 100644 --- a/example/ck_tile/01_fmha/fmha_fwd.cpp +++ b/example/ck_tile/01_fmha/fmha_fwd.cpp @@ -311,7 +311,7 @@ bool run(const ck_tile::ArgParser& arg_parser) arg_parser.get_str("s"), arg_parser.get_str("s_k"), arg_parser.get_str("s_kpad"), - 0 < seqlen_knew ? seqlen_knew : 1); + 0 < seqlen_knew ? seqlen_knew : 0); // compute kvcache seqlen_k (before appending knew/vnew) auto cache_seqlen_ks = seqlen_ks; std::transform(cache_seqlen_ks.begin(), diff --git a/example/ck_tile/01_fmha/utils.hpp b/example/ck_tile/01_fmha/utils.hpp index 22bac8cca1..88e93e8964 100644 --- a/example/ck_tile/01_fmha/utils.hpp +++ b/example/ck_tile/01_fmha/utils.hpp @@ -109,7 +109,7 @@ decode_seqlen(mode_enum mode, std::string q_val, std::string k_val, std::string k_pad_val, - ck_tile::index_t seqlen_k_min = 1, + ck_tile::index_t seqlen_k_min = 0, std::optional seed = std::nullopt) { #define _S2I_(str_) static_cast(std::atoi((str_).c_str()))