Skip to content

Commit f3da192

Browse files
gshtrasmgoin
andcommitted
Change the order of the checks
Co-authored-by: Michael Goin <[email protected]> Signed-off-by: Gregory Shtrasberg <[email protected]>
1 parent 2205c07 commit f3da192

File tree

1 file changed

+1
-1
lines changed
  • vllm/model_executor/layers/quantization

1 file changed

+1
-1
lines changed

vllm/model_executor/layers/quantization/fp8.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def create_weights(
252252
def add_padding_to_weight(self, weight: torch.Tensor) -> torch.Tensor:
253253
# Pad the weight tensor. This is an optimization on ROCm platform, which
254254
# can benefit from tensors located far enough from one another in memory
255-
if (current_platform.is_rocm() and envs.VLLM_ROCM_FP8_PADDING
255+
if (envs.VLLM_ROCM_FP8_PADDING and current_platform.is_rocm()
256256
and weight.stride(-1) == 1
257257
and (weight.stride(-2) * weight.element_size()) % 512 == 0):
258258
num_pad = 256 // weight.element_size()

0 commit comments

Comments
 (0)