Skip to content
Merged
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
12 changes: 6 additions & 6 deletions csrc/src/flash_attention_fwd_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,12 @@ inline __device__ void compute_attn_1rowblock(const Params &params, const int bi
Tensor tVsV = gmem_thr_copy_QKV.partition_D(sV);
Tensor tZeroHoldgZeroHold = gmem_thr_copy_ZeroHold.partition_S(gZeroHold);
Tensor tZeroHoldsZeroHold = gmem_thr_copy_ZeroHold.partition_D(sZeroHold);
auto tCausalMaskgCausalMask = has_causal_mask ?
gmem_thr_copy_CausalMask.partition_S(gCausalMask) :
make_tensor(static_cast<Element*>(nullptr), make_shape(Int<1>{}, Int<1>{}), make_stride(0,0));
auto tCausalMasksCausalMask = has_causal_mask ?
gmem_thr_copy_CausalMask.partition_D(sCausalMask) :
make_tensor(static_cast<Element*>(nullptr), make_shape(Int<1>{}, Int<1>{}), make_stride(0,0));
decltype(gmem_thr_copy_CausalMask.partition_S(gCausalMask)) tCausalMaskgCausalMask;
decltype(gmem_thr_copy_CausalMask.partition_D(sCausalMask)) tCausalMasksCausalMask;
if (has_causal_mask) {
tCausalMaskgCausalMask = gmem_thr_copy_CausalMask.partition_S(gCausalMask);
tCausalMasksCausalMask = gmem_thr_copy_CausalMask.partition_D(sCausalMask);
}

// Matrix Multiply Accumulate
typename Kernel_traits::TiledMma tiled_mma;
Expand Down