Commit 58fb0c33 authored by zhuwenwen's avatar zhuwenwen
Browse files

update version and skip install gptq_kernels

parent b2068609
......@@ -309,33 +309,11 @@ def find_version(filepath: str) -> str:
raise RuntimeError("Unable to find version string.")
def get_abi():
try:
command = "echo '#include <string>' | gcc -x c++ -E -dM - | fgrep _GLIBCXX_USE_CXX11_ABI"
result = subprocess.run(command, shell=True, capture_output=True, text=True)
output = result.stdout.strip()
abi = "abi" + output.split(" ")[-1]
return abi
except Exception:
return 'abiUnknown'
def get_sha(root: Union[str, Path]) -> str:
try:
return subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=root).decode('ascii').strip()
except Exception:
return 'Unknown'
def get_version_add(sha: Optional[str] = None) -> str:
vllm_root = os.path.dirname(os.path.abspath(__file__))
add_version_path = os.path.join(os.path.join(vllm_root, "vllm"), "version.py")
if sha != 'Unknown':
if sha is None:
sha = get_sha(vllm_root)
version = 'das1.2.git' + sha[:7]
# abi version
version += "." + get_abi()
version = 'das.opt1.'
# dtk version
if os.getenv("ROCM_PATH"):
......
......@@ -4,8 +4,8 @@ from typing import List, Optional, Tuple, Type
import torch
try:
import gptq_kernels
except ImportError as e:
raise RuntimeError("Failed to import gptq_kernel with, Please install gptq_kernels from csrc/quantization/gptq ")
except Exception:
print("INFO: Need to import gptq_kernel with, Please install gptq_kernels from csrc/quantization/gptq .\n")
try:
import vllm._C
......
......@@ -11,7 +11,7 @@ from vllm.model_executor.utils import set_weight_attrs
try:
from lmslim import quant_ops as _ops
except Exception:
print("INFO:you need install lmslim if you want infer awq model.\n")
print("INFO: You need install lmslim if you want infer awq model.\n")
class AWQShareWorkSpace():
awqworkshapcesize=2<<29 #
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment