Skip to content

Commit

Permalink
Revert "Try to have kPadSeqLenK be false in splitkv dispatch"
Browse files Browse the repository at this point in the history
This reverts commit 7243b49.
  • Loading branch information
qianfengz committed Oct 26, 2024
1 parent 7243b49 commit 6ffea6a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ struct batched_forward_splitkv_causalmask_bias_dropout_dispatch {
has_uneven_splits,
kHasUnevenSplits,
[&] {
// since buffer_load_dword is used, padding dim seqlen-k is not
// needed when loading K/V, but still needed when loading bias
constexpr bool kPadSeqLenK = kHasBias ? true : false;
constexpr bool kPadSeqLenK = kHasUnevenSplits ? true : false;

using FmhaTraits = ck_tile::TileFmhaFwdSplitKVTraits<
kPadSeqLenQ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ struct batched_infer_splitkv_causalmask_bias_dropout_dispatch {
has_uneven_splits,
kHasUnevenSplits,
[&] {
// since buffer_load_dword is used, padding dim seqlen-k is not
// needed when loading K/V, but still needed when loading bias
constexpr bool kPadSeqLenK = kHasBias ? true : false;
constexpr bool kPadSeqLenK = kHasUnevenSplits ? true : false;

using FmhaTraits = ck_tile::TileFmhaFwdSplitKVTraits<
kPadSeqLenQ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ struct grouped_forward_splitkv_causalmask_bias_dropout_dispatch {
: ck_tile::BlockAttentionBiasEnum::NO_BIAS;

constexpr bool kPadSeqLenQ = true;
// since buffer_load_dword is used, padding dim seqlen-k is not
// needed when loading K/V, but still needed when loading bias
constexpr bool kPadSeqLenK = kHasBias? true : false;
constexpr bool kPadSeqLenK = true;

const bool pad_headdim_q =
!(param.K % FmhaTileShape::kK0BlockLength == 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ struct grouped_infer_splitkv_causalmask_bias_dropout_dispatch {
: ck_tile::BlockAttentionBiasEnum::NO_BIAS;

constexpr bool kPadSeqLenQ = true;
// since buffer_load_dword is used, padding dim seqlen-k is not
// needed when loading K/V, but still needed when loading bias
constexpr bool kPadSeqLenK = kHasBias ? true : false;
constexpr bool kPadSeqLenK = true;

bool pad_headdim_q = !(param.K % FmhaTileShape::kK0BlockLength == 0);
bool pad_headdim_v = !(param.Kv % FmhaTileShape::kN1 == 0);
Expand Down

0 comments on commit 6ffea6a

Please sign in to comment.