Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
8c1d4acb
Unverified
Commit
8c1d4acb
authored
Sep 19, 2025
by
Li, Jiang
Committed by
GitHub
Sep 19, 2025
Browse files
[CPU] Disable oneDNN linear on non-x86 platforms (#25166)
Signed-off-by:
jiang1.li
<
jiang1.li@intel.com
>
parent
486c5599
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
vllm/model_executor/layers/utils.py
vllm/model_executor/layers/utils.py
+3
-2
No files found.
vllm/model_executor/layers/utils.py
View file @
8c1d4acb
...
@@ -7,7 +7,7 @@ import torch
...
@@ -7,7 +7,7 @@ import torch
from
vllm
import
_custom_ops
as
ops
from
vllm
import
_custom_ops
as
ops
from
vllm
import
envs
from
vllm
import
envs
from
vllm.platforms
import
current_platform
from
vllm.platforms
import
CpuArchEnum
,
current_platform
from
vllm.utils
import
direct_register_custom_op
from
vllm.utils
import
direct_register_custom_op
...
@@ -167,7 +167,8 @@ def dispatch_cpu_unquantized_gemm(
...
@@ -167,7 +167,8 @@ def dispatch_cpu_unquantized_gemm(
if
remove_weight
:
if
remove_weight
:
layer
.
weight
=
torch
.
nn
.
Parameter
(
torch
.
empty
(
0
),
layer
.
weight
=
torch
.
nn
.
Parameter
(
torch
.
empty
(
0
),
requires_grad
=
False
)
requires_grad
=
False
)
elif
ops
.
_supports_onednn
:
elif
(
ops
.
_supports_onednn
and
current_platform
.
get_cpu_architecture
()
==
CpuArchEnum
.
X86
):
origin_weight
=
layer
.
weight
origin_weight
=
layer
.
weight
if
remove_weight
:
if
remove_weight
:
layer
.
weight
=
torch
.
nn
.
Parameter
(
torch
.
empty
(
0
),
layer
.
weight
=
torch
.
nn
.
Parameter
(
torch
.
empty
(
0
),
...
...
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