Skip to content

Commit

Permalink
linter and unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
gshtras committed Aug 29, 2024
1 parent 4e36cd9 commit 8295ea0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion vllm/model_executor/layers/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from typing import Dict, List, Optional, Tuple

import torch
import torch.nn.functional as F
from torch.nn.parameter import Parameter, UninitializedParameter

from vllm.distributed import (divide, get_tensor_model_parallel_rank,
Expand Down
4 changes: 2 additions & 2 deletions vllm/model_executor/layers/quantization/utils/w8a8_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ def apply_fp8_linear(
scale_b=weight_scale,
scale_result=TORCH_SCALED_MM_SCALE_RESULT,
bias=bias)
# A fix for discrepancy in scaled_mm which returns tuple for torch < 2.5
# and a single value in torch >= 2.5
# A fix for discrepancy in scaled_mm which returns tuple
# for torch < 2.5 and a single value in torch >= 2.5
if type(output) is tuple and len(output) == 2:
return torch.narrow(output[0], 0, 0, input.shape[0])
return torch.narrow(output, 0, 0, input.shape[0])
Expand Down

0 comments on commit 8295ea0

Please sign in to comment.