Skip to content

Commit 22a7223

Browse files
authored
[CuTe] Fix lint failures (#2625)
stack-info: PR: #2625, branch: drisspg/stack/42
1 parent d80a771 commit 22a7223

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

flash_attn/cute/flash_bwd.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import cutlass
1212
import cutlass.cute as cute
1313
from cutlass.cute.nvgpu import cpasync, warp
14-
from cutlass import Float32, Int32
14+
from cutlass import Int32
1515
import cutlass.utils as utils_basic
1616

1717
from quack import layout_utils
@@ -167,13 +167,13 @@ def _check_type(
167167
else:
168168
if cutlass.const_expr(not (mdK_type == mdV_type == cutlass.Float32)):
169169
raise TypeError("mdKaccum and mdVaccum tensors must have the data type Float32")
170-
if cutlass.const_expr(not mQ_type in [cutlass.Float16, cutlass.BFloat16]):
170+
if cutlass.const_expr(mQ_type not in [cutlass.Float16, cutlass.BFloat16]):
171171
raise TypeError("Only Float16 or BFloat16 is supported")
172-
if cutlass.const_expr(not mLSE_type in [cutlass.Float32]):
172+
if cutlass.const_expr(mLSE_type not in [cutlass.Float32]):
173173
raise TypeError("LSE tensor must be Float32")
174-
if cutlass.const_expr(not mdPsum_type in [cutlass.Float32]):
174+
if cutlass.const_expr(mdPsum_type not in [cutlass.Float32]):
175175
raise TypeError("dPsum tensor must be Float32")
176-
if cutlass.const_expr(not mdQaccum_type in [cutlass.Float32]):
176+
if cutlass.const_expr(mdQaccum_type not in [cutlass.Float32]):
177177
raise TypeError("dQaccum tensor must be Float32")
178178
if cutlass.const_expr(mCuSeqlensQ_type not in [None, cutlass.Int32]):
179179
raise TypeError("cuSeqlensQ tensor must be Int32")

flash_attn/cute/flash_fwd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
import math
99
from types import SimpleNamespace
10-
from typing import Type, Callable, Optional, List
10+
from typing import Type, Callable, Optional
1111
from functools import partial
1212

1313
import cuda.bindings.driver as cuda
1414

1515
import cutlass
1616
import cutlass.cute as cute
17-
from cutlass import Constexpr, Float32, Int32, const_expr, Boolean
17+
from cutlass import Float32, Int32, const_expr
1818
from cutlass.cute.nvgpu import cpasync, warp
1919
import cutlass.utils as utils_basic
2020
from cutlass.base_dsl.arch import Arch

flash_attn/cute/interface.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import torch
1111

1212

13-
import cuda.bindings.driver as cuda
1413

1514
import cutlass
1615
import cutlass.cute as cute
@@ -55,7 +54,6 @@
5554
to_cute_block_sparse_tensors,
5655
normalize_block_sparse_config,
5756
normalize_block_sparse_config_bwd,
58-
get_block_sparse_broadcast_pattern,
5957
)
6058

6159
def _parse_arch_str(arch_str):

0 commit comments

Comments
 (0)