Skip to content

Commit a50f429

Browse files
committed
Use property
Signed-off-by: wangxiyuan <[email protected]>
1 parent 39684a0 commit a50f429

File tree

15 files changed

+5
-29
lines changed

15 files changed

+5
-29
lines changed

tests/worker/test_model_input.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
class MockAttentionBackend(AttentionBackend):
1818

19-
use_output: bool = False
20-
2119
@staticmethod
2220
def get_name() -> str:
2321
raise NotImplementedError

vllm/attention/backends/abstract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class AttentionBackend(ABC):
3434
# For some attention backends, we allocate an output tensor before
3535
# calling the custom op. When piecewise cudagraph is enabled, this
3636
# makes sure the output tensor is allocated inside the cudagraph.
37-
use_output: bool
37+
accept_output_buffer: bool = False
3838

3939
@staticmethod
4040
@abstractmethod

vllm/attention/backends/blocksparse_attn.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ def __post_init__(self):
8787

8888
class BlocksparseFlashAttentionBackend(AttentionBackend):
8989

90-
use_output: bool = True
91-
9290
@staticmethod
9391
def get_name() -> str:
9492
# For attention layer compatibility

vllm/attention/backends/flash_attn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
class FlashAttentionBackend(AttentionBackend):
3131

32-
use_output: bool = True
32+
accept_output_buffer: bool = True
3333

3434
@staticmethod
3535
def get_supported_head_sizes() -> List[int]:

vllm/attention/backends/flashinfer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040

4141
class FlashInferBackend(AttentionBackend):
4242

43-
use_output: bool = False
44-
4543
@staticmethod
4644
def get_name() -> str:
4745
return "FLASHINFER"

vllm/attention/backends/hpu_attn.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
class HPUAttentionBackend(AttentionBackend):
2424

25-
use_output: bool = False
26-
2725
@staticmethod
2826
def get_name() -> str:
2927
return "HPU_ATTN"

vllm/attention/backends/ipex_attn.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
class IpexAttnBackend(AttentionBackend):
1919

20-
use_output: bool = False
21-
2220
@staticmethod
2321
def get_name() -> str:
2422
return "IPEX"

vllm/attention/backends/openvino.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ def create_roi_tensor(
3737

3838
class OpenVINOAttentionBackend(AttentionBackend):
3939

40-
use_output: bool = False
41-
4240
@staticmethod
4341
def get_name() -> str:
4442
return "OPENVINO"

vllm/attention/backends/pallas.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
class PallasAttentionBackend(AttentionBackend):
1313

14-
use_output: bool = False
15-
1614
@staticmethod
1715
def get_name() -> str:
1816
return "PALLAS"

vllm/attention/backends/placeholder_attn.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
class PlaceholderAttentionBackend(AttentionBackend):
2222
"""Placeholder backend for when no attention is needed."""
2323

24-
use_output: bool = False
25-
2624
@staticmethod
2725
def get_name() -> str:
2826
return "NO_ATTENTION"

0 commit comments

Comments
 (0)