Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ struct FMHAFwdMainloop<XeDefault<Stages>, CausalMask_,
QVCoord blk_qv, // WG tile indices: (Q,V)
int blk_k0, // K block range: [K0,K1)
int blk_k1,
int total_blk, // Total # of K blocks
int thr_id) { // Work-item ID

using namespace sycl::ext::oneapi::this_work_item;
Expand Down Expand Up @@ -289,7 +290,7 @@ struct FMHAFwdMainloop<XeDefault<Stages>, CausalMask_,
prefetch(prefetch_v, pVgV(_,_,_,K));

/* k masking for remainder tiles */
if (check_remainder_k && K == blk_k1 - 1) {
if (check_remainder_k && K == total_blk - 1) {
FragSRow k_rem_mask;
int k = get<0>(tKgK(0,0,0,K,0)) + get_sub_group().get_local_id()[0];
CUTLASS_PRAGMA_UNROLL
Expand Down
Loading
Loading