Skip to content

Commit

Permalink
A follow-up cleanup on #57.
Browse files Browse the repository at this point in the history
  • Loading branch information
wujingyue committed Mar 23, 2024
1 parent f64f110 commit bfccc97
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions thunder/executors/cudnnex.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,25 +334,7 @@ def _cudnn_sdpa_checker(
if d % 8 != 0 or d > 128:
return False

is_backward_supported = _cudnn_sdpa_backward_checker(
query, key, value, attn_mask, dropout_p, is_causal, scale=scale
)

return True and is_backward_supported


@langctx("torch")
def _cudnn_sdpa_backward_checker(
query: TensorLike,
key: TensorLike,
value: TensorLike,
attn_mask: TensorLike | None = None,
dropout_p: float = 0.0,
is_causal: bool = False,
*,
scale: float | None = None,
) -> bool:
return cudnn is not None
return True


cudnn_sdpa_fwd = cudnn_ex.register_operator(
Expand Down

0 comments on commit bfccc97

Please sign in to comment.