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
ox696c
ktransformers
Commits
9a759e9f
Unverified
Commit
9a759e9f
authored
Apr 25, 2025
by
jzl
Committed by
GitHub
Apr 25, 2025
Browse files
fix: make cpufeature a local import
parent
67042d11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
setup.py
setup.py
+2
-1
No files found.
setup.py
View file @
9a759e9f
...
@@ -33,7 +33,6 @@ import torch
...
@@ -33,7 +33,6 @@ import torch
import
torch.version
import
torch.version
from
wheel.bdist_wheel
import
bdist_wheel
as
_bdist_wheel
from
wheel.bdist_wheel
import
bdist_wheel
as
_bdist_wheel
from
setuptools
import
setup
,
Extension
from
setuptools
import
setup
,
Extension
from
cpufeature.extension
import
CPUFeature
from
torch.utils.cpp_extension
import
BuildExtension
,
CUDAExtension
,
CUDA_HOME
,
ROCM_HOME
from
torch.utils.cpp_extension
import
BuildExtension
,
CUDAExtension
,
CUDA_HOME
,
ROCM_HOME
try
:
try
:
from
torch_musa.utils.simple_porting
import
SimplePorting
from
torch_musa.utils.simple_porting
import
SimplePorting
...
@@ -188,6 +187,8 @@ class VersionInfo:
...
@@ -188,6 +187,8 @@ class VersionInfo:
raise
ValueError
(
raise
ValueError
(
"Unsupported cpu Instructions: {}"
.
format
(
flags_line
))
"Unsupported cpu Instructions: {}"
.
format
(
flags_line
))
elif
sys
.
platform
==
"win32"
:
elif
sys
.
platform
==
"win32"
:
from
cpufeature.extension
import
CPUFeature
if
CPUFeature
.
get
(
"AVX512bw"
,
False
):
if
CPUFeature
.
get
(
"AVX512bw"
,
False
):
return
'fancy'
return
'fancy'
if
CPUFeature
.
get
(
"AVX512f"
,
False
):
if
CPUFeature
.
get
(
"AVX512f"
,
False
):
...
...
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