Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
6737671c
Unverified
Commit
6737671c
authored
Jul 19, 2025
by
Even Zhou
Committed by
GitHub
Jul 18, 2025
Browse files
[Bugfix] Fix w8a8_int8 import error on NPU (#8147)
parent
fd63b62e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
python/sglang/srt/layers/quantization/w8a8_int8.py
python/sglang/srt/layers/quantization/w8a8_int8.py
+2
-0
No files found.
python/sglang/srt/layers/quantization/w8a8_int8.py
View file @
6737671c
...
...
@@ -754,6 +754,8 @@ class NPU_W8A8LinearMethod(LinearMethodBase):
x
:
torch
.
Tensor
,
bias
:
Optional
[
torch
.
Tensor
]
=
None
,
)
->
torch
.
Tensor
:
from
sglang.srt.layers.linear
import
RowParallelLinear
if
isinstance
(
layer
,
RowParallelLinear
):
tp_rank
=
get_tensor_model_parallel_rank
()
return
self
.
quant_method
.
apply
(
layer
,
x
,
bias
,
tp_rank
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment