Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vllm_ascend/quantization/w8a8_dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,13 @@
1, 2).contiguous()
layer.w2_weight.data = layer.w2_weight.data.transpose(
1, 2).contiguous()

torch_npu.npu_format_cast_(layer.w13_weight, 29)
torch_npu.npu_format_cast_(layer.w2_weight, 29)

Check warning on line 821 in vllm_ascend/quantization/w8a8_dynamic.py

View check run for this annotation

Codecov / codecov/patch

vllm_ascend/quantization/w8a8_dynamic.py#L820-L821

Added lines #L820 - L821 were not covered by tests
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contribution. The transformation of grouped_matmul may lead to accuracy problem until newer torch_npu releases. I think it is good to hang up this PR temporarily.


if envs.VLLM_ENABLE_FUSED_EXPERTS_ALLGATHER_EP:
torch_npu.npu_format_cast_(layer.w2_weight, ACL_FORMAT_FRACTAL_NZ)

layer.w13_weight_scale.data = layer.w13_weight_scale.data.view(
layer.w13_weight_scale.data.shape[0], -1)
layer.w13_weight_offset.data = layer.w13_weight_offset.data.view(
Expand Down
Loading