mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-16 01:59:42 +00:00
Merge pull request #1197 from jizhilong/jizhilong-patch-1
fix: make cpufeature a local import
This commit is contained in:
commit
a7b995365e
2 changed files with 3 additions and 2 deletions
|
@ -3,7 +3,7 @@ transformers==4.43.2
|
|||
numpy
|
||||
torch>=2.3.0
|
||||
packaging
|
||||
cpufeature
|
||||
cpufeature; sys_platform == 'win32' or sys_platform == 'Windows'
|
||||
protobuf
|
||||
tiktoken
|
||||
blobfile
|
||||
|
|
3
setup.py
3
setup.py
|
@ -33,7 +33,6 @@ import torch
|
|||
import torch.version
|
||||
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
|
||||
from setuptools import setup, Extension
|
||||
from cpufeature.extension import CPUFeature
|
||||
from torch.utils.cpp_extension import BuildExtension, CUDAExtension, CUDA_HOME, ROCM_HOME
|
||||
try:
|
||||
from torch_musa.utils.simple_porting import SimplePorting
|
||||
|
@ -188,6 +187,8 @@ class VersionInfo:
|
|||
raise ValueError(
|
||||
"Unsupported cpu Instructions: {}".format(flags_line))
|
||||
elif sys.platform == "win32":
|
||||
from cpufeature.extension import CPUFeature
|
||||
|
||||
if CPUFeature.get("AVX512bw", False):
|
||||
return 'fancy'
|
||||
if CPUFeature.get("AVX512f", False):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue