Skip to content

Commit

Permalink
Change the order of the checks
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Goin <mgoin64@gmail.com>
  • Loading branch information
gshtras and mgoin authored Feb 18, 2025
1 parent 2205c07 commit 6106325
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vllm/model_executor/layers/quantization/fp8.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def create_weights(
def add_padding_to_weight(self, weight: torch.Tensor) -> torch.Tensor:
# Pad the weight tensor. This is an optimization on ROCm platform, which
# can benefit from tensors located far enough from one another in memory
if (current_platform.is_rocm() and envs.VLLM_ROCM_FP8_PADDING
if (envs.VLLM_ROCM_FP8_PADDING and current_platform.is_rocm()
and weight.stride(-1) == 1
and (weight.stride(-2) * weight.element_size()) % 512 == 0):
num_pad = 256 // weight.element_size()
Expand Down

0 comments on commit 6106325

Please sign in to comment.