Skip to content

Commit 3acff2a

Browse files
committed
address precommit
1 parent c8ee86a commit 3acff2a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

benchmarks/cutlass_benchmarks/w8a8_benchmarks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ def bench_fp8(
115115
a_cont = a.contiguous()
116116
scale_a = torch.tensor(1.0, device="cuda", dtype=torch.float32)
117117
scale_b = torch.tensor(1.0, device="cuda", dtype=torch.float32)
118+
118119
def ceil_div(x: int, y: int) -> int:
119120
return (x + y - 1) // y
121+
120122
block_scale_a = torch.rand((m, ceil_div(k, 128)),
121123
device="cuda",
122124
dtype=torch.float32)

vllm/model_executor/layers/quantization/utils/fp8_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ def apply_w8a8_block_fp8_linear(
4848
shape_supported_by_cutlass = (weight.shape[0] % 128 == 0
4949
and weight.shape[1] % 128 == 0)
5050
if current_platform.has_device_capability(100):
51+
5152
def ceil_div(x: int, y: int) -> int:
5253
return (x + y - 1) // y
54+
5355
shape_supported_by_cutlass = (
5456
ceil_div(weight.shape[0], 128) == weight_scale.shape[0]
5557
and ceil_div(weight.shape[1], 128) == weight_scale.shape[1])

0 commit comments

Comments
 (0)