Skip to content

Commit e285eb9

Browse files
committed
fix rebase
Signed-off-by: realliujiaxu <[email protected]>
1 parent 5e45c5d commit e285eb9

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

vllm_ascend/ops/linear.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -428,29 +428,6 @@ def get_custom_tp_group_row(disable_tp, prefix, layer):
428428
return None, get_tp_group().tp_rank, get_tp_group().tp_size
429429

430430

431-
class AscendUnquantizedLinearMethod(UnquantizedLinearMethod):
432-
"""Linear method without quantization."""
433-
434-
def process_weights_after_loading(self, layer: torch.nn.Module) -> None:
435-
super().process_weights_after_loading(layer)
436-
if torch.version.cann.startswith("8.3"):
437-
layer.weight.data = layer.weight.data.transpose(0, 1).contiguous()
438-
layer.weight.data = torch_npu.npu_format_cast(
439-
layer.weight.data, ACL_FORMAT_FRACTAL_NZ)
440-
441-
def apply(self,
442-
layer: torch.nn.Module,
443-
x: torch.Tensor,
444-
bias: Optional[torch.Tensor] = None) -> torch.Tensor:
445-
if torch.version.cann.startswith("8.3"):
446-
if bias is None:
447-
return torch.matmul(x, layer.weight)
448-
else:
449-
return torch.matmul(x, layer.weight) + bias
450-
else:
451-
return torch.nn.functional.linear(x, layer.weight, bias)
452-
453-
454431
class AscendColumnParallelLinear(ColumnParallelLinear):
455432
"""Linear layer with column parallelism.
456433

0 commit comments

Comments
 (0)