Skip to content

Commit 167c780

Browse files
Post release 2 - All additional packages goes into extras (#653)
1 parent 947a839 commit 167c780

File tree

4 files changed

+11
-27
lines changed

4 files changed

+11
-27
lines changed

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,15 @@ There are a few ways to install AutoAWQ:
5757
1. Default:
5858
- `pip install autoawq`
5959
- NOTE: The default installation includes no external kernels and relies on Triton for inference.
60-
61-
2. From main branch with kernels:
62-
- `INSTALL_KERNELS=1 pip install git+https://github.com/casper-hansen/AutoAWQ.git`
60+
61+
2. From release with kernels:
62+
- `pip install autoawq[kernels]`
63+
- NOTE: This requires you to match the latest torch version that the kernels were build with.
6364
- NOTE: This installs https://github.com/casper-hansen/AutoAWQ_kernels
6465

6566
3. From main branch for Intel CPU and Intel XPU optimized performance:
66-
- `pip install intel_extension_for_pytorch`
67-
- `pip install git+https://github.com/casper-hansen/AutoAWQ.git`
67+
- `pip install autoawq[cpu]`
68+
- NOTE: Minimum of torch 2.4.0 is required.
6869

6970
## Usage
7071

awq/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "0.2.7.post1"
1+
__version__ = "0.2.7.post2"
22
from awq.models.auto import AutoAWQForCausalLM

scripts/download_wheels.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Set variables
4-
AWQ_VERSION="0.2.7.post1"
4+
AWQ_VERSION="0.2.7.post2"
55
RELEASE_URL="https://api.github.com/repos/casper-hansen/AutoAWQ/releases/tags/v${AWQ_VERSION}"
66

77
# Create a directory to download the wheels

setup.py

+3-20
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,9 @@
33
from pathlib import Path
44
from setuptools import setup, find_packages
55

6-
AUTOAWQ_VERSION = "0.2.7.post1"
7-
INSTALL_KERNELS = os.getenv("INSTALL_KERNELS", "0") == "1"
8-
IS_CPU_ONLY = not torch.backends.mps.is_available() and not torch.cuda.is_available()
6+
AUTOAWQ_VERSION = "0.2.7.post2"
97
TORCH_VERSION = str(os.getenv("TORCH_VERSION", None) or torch.__version__).split('+', maxsplit=1)[0]
108

11-
CUDA_VERSION = os.getenv("CUDA_VERSION", None) or torch.version.cuda
12-
if CUDA_VERSION:
13-
CUDA_VERSION = "".join(CUDA_VERSION.split("."))[:3]
14-
159
common_setup_kwargs = {
1610
"version": AUTOAWQ_VERSION,
1711
"name": "autoawq",
@@ -50,25 +44,14 @@
5044
"zstandard",
5145
]
5246

53-
try:
54-
import awq_ext
55-
56-
KERNELS_INSTALLED = True
57-
except ImportError:
58-
KERNELS_INSTALLED = False
59-
60-
if not KERNELS_INSTALLED and CUDA_VERSION and INSTALL_KERNELS and CUDA_VERSION.startswith("12"):
61-
requirements.append("autoawq-kernels")
62-
63-
elif IS_CPU_ONLY:
64-
requirements.append("intel-extension-for-pytorch>=2.4.0")
65-
6647
setup(
6748
packages=find_packages(),
6849
install_requires=requirements,
6950
extras_require={
7051
"eval": ["lm_eval==0.4.1", "tabulate", "protobuf", "evaluate", "scipy"],
7152
"dev": ["black", "mkdocstrings-python", "mkdocs-material", "griffe-typingdoc"],
53+
"cpu": ["intel-extension-for-pytorch>=2.4.0"],
54+
"kernels": ["autoawq-kernels"],
7255
},
7356
**common_setup_kwargs,
7457
)

0 commit comments

Comments
 (0)