Skip to content
Merged
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
5 changes: 3 additions & 2 deletions flash_attn/cute/mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ class AttentionMask:
window_size_right: Optional[Int32] = None
qhead_per_kvhead_packgqa: cutlass.Constexpr[int] = 1 # only pass in if we're doing PackGQA
swap_AB: cutlass.Constexpr[bool] = False

@property
def seqlen_q(self) -> Int32:
return self.seqlen_info.seqlen_q

@property
def seqlen_k(self) -> Int32:
return self.seqlen_info.seqlen_k
Expand Down Expand Up @@ -549,6 +549,7 @@ def apply_mask_sm100_transposed(
head_idx_ssa,
q_idx_ssa,
kv_idx_ssa,
self.seqlen_info,
aux_tensors,
)
cond = cutlass.Boolean(utils.ssa_to_scalar(mask_value))
Expand Down
2 changes: 2 additions & 0 deletions tests/cute/test_score_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
dual_buffer_factory as dual_buffer_bias,
)

COMPUTE_CAPABILITY = torch.cuda.get_device_capability()[0]

# Test pairs: (cute_jit_function, eager_reference_function)
TEST_PAIRS = [
(score_mod_1, None),
Expand Down