Commit d76078ef authored by yangql's avatar yangql
Browse files

initing develop

parent a2630e0f
......@@ -9,7 +9,7 @@ os.environ["CC"] = "g++"
os.environ["CXX"] = "g++"
common_setup_kwargs = {
"version": "0.8.0.dev0",
"version": "0.8.0",
"name": "auto_gptq",
"author": "PanQiWei",
"description": "An easy-to-use LLMs quantization package with user-friendly apis, based on GPTQ algorithm.",
......@@ -33,6 +33,17 @@ common_setup_kwargs = {
]
}
def get_version_add():
if os.getenv("ROCM_PATH"):
rocm_path = os.getenv('ROCM_PATH', "")
rocm_version_path = os.path.join(rocm_path, '.info', "rocm_version")
with open(rocm_version_path, 'r',encoding='utf-8') as file:
lines = file.readlines()
#rocm_version=lines[0][:-2].replace(".", "")
rocm_version=lines[0][:].replace(".", "")
common_setup_kwargs['version'] += "+dtk" + rocm_version
get_version_add()
PYPI_RELEASE = os.environ.get('PYPI_RELEASE', None)
BUILD_CUDA_EXT = int(os.environ.get('BUILD_CUDA_EXT', '1')) == 1
......@@ -40,22 +51,8 @@ DISABLE_QIGEN = int(os.environ.get('DISABLE_QIGEN', '1')) == 1
COMPILE_MARLIN = int(os.environ.get('COMPILE_MARLIN', '1')) == 1
UNSUPPORTED_COMPUTE_CAPABILITIES = ['3.5', '3.7', '5.0', '5.2', '5.3']
if BUILD_CUDA_EXT:
try:
import torch
except Exception as e:
print(f"Building PyTorch CUDA extension requires PyTorch being installed, please install PyTorch first: {e}.\n NOTE: This issue may be raised due to pip build isolation system (ignoring local packages). Please use `--no-build-isolation` when installing with pip, and refer to https://github.com/AutoGPTQ/AutoGPTQ/pull/620 for more details.")
sys.exit(1)
CUDA_VERSION = None
full_version = torch.version.hip
ROCM_VERSION = '.'.join(full_version.split('.')[:2])
if ROCM_VERSION:
common_setup_kwargs['version'] += f"+rocm{ROCM_VERSION}"
requirements = [
"torch>=2.0.1",
"accelerate>=0.26.0",
"datasets",
"sentencepiece",
......
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