Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the dependency on AutoGPTQ for CPU and bump to V0.4.3 #380

Merged
merged 6 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .azure-pipelines/template/ut-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ steps:
- ${{ if eq(parameters.imageSource, 'build') }}:
- script: |
docker exec ${{ parameters.utContainerName }} bash -c "cd /auto-round \
&& pip install -r requirements.txt \
&& pip install -vvv --no-build-isolation .[cpu] \
&& pip install -vvv --no-build-isolation . \
&& pip list"
displayName: "Env Setup"

- ${{ if eq(parameters.imageSource, 'pull') }}:
- script: |
docker exec ${{ parameters.utContainerName }} bash -c "cd /auto-round \
&& pip install -vvv --no-build-isolation .[hpu] \
&& pip install -vvv --no-build-isolation . \
&& pip list"
displayName: "HPU Env Setup"

Expand Down
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
include requirements.txt
include requirements.txt
include requirements-cpu.txt
include requirements-hpu.txt
20 changes: 2 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AutoRound
<h3> Advanced Quantization Algorithm for LLMs</h3>

[![python](https://img.shields.io/badge/python-3.9%2B-blue)](https://github.com/intel/auto-round)
[![version](https://img.shields.io/badge/release-0.4.2-green)](https://github.com/intel/auto-round)
[![version](https://img.shields.io/badge/release-0.4.3-green)](https://github.com/intel/auto-round)
[![license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/intel/auto-round/blob/main/LICENSE)
---
<div align="left">
Expand Down Expand Up @@ -47,30 +47,14 @@ details and quantized huggingface space models in [OPEA](https://huggingface.co/
### Install from pypi

```bash
# GPU
pip install auto-round

# CPU
pip install auto-round[cpu]

# HPU
pip install auto-round[hpu]
```

<details>
<summary>Build from Source</summary>

```bash
pip install -r requirements.txt

# GPU
pip install -vvv --no-build-isolation -e .

# CPU
pip install -vvv --no-build-isolation -e .[cpu]

# HPU
pip install -vvv --no-build-isolation -e .[hpu]
pip install -vvv --no-build-isolation .
```

</details>
Expand Down
2 changes: 1 addition & 1 deletion auto_round/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"""Intel® auto-round: An open-source Python library
supporting popular model weight only compression based on signround."""

__version__ = "0.4.2"
__version__ = "0.4.3"
1 change: 0 additions & 1 deletion requirements-cpu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ threadpoolctl
lm-eval>=0.4.2,<0.5
tqdm
packaging
auto-gptq>=0.7.1
pillow
numba
tbb
Expand Down
17 changes: 11 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

def is_cuda_available():
try:
os.system("pip install torch")
import torch

return torch.cuda.is_available()
Expand Down Expand Up @@ -111,6 +112,15 @@ def detect_local_sm_architectures():
return arch_list


def detect_hardware():
if is_hpu_available():
return "requirements-hpu.txt"
elif is_cuda_available():
return "requirements.txt"
else:
return "requirements-cpu.txt"


UNSUPPORTED_COMPUTE_CAPABILITIES = ['3.5', '3.7', '5.0', '5.2', '5.3']

if BUILD_CUDA_EXT:
Expand Down Expand Up @@ -219,11 +229,7 @@ def detect_local_sm_architectures():
"auto_round_extension.*",
],
),
"install_requires": fetch_requirements("requirements.txt"),
"extras_require": {
"hpu": fetch_requirements("requirements-hpu.txt"),
"cpu": fetch_requirements("requirements-cpu.txt"),
},
"install_requires": fetch_requirements(detect_hardware()),
}

if __name__ == "__main__":
Expand All @@ -248,7 +254,6 @@ def detect_local_sm_architectures():
url="https://github.com/intel/auto-round",
packages=include_packages,
include_dirs=include_dirs,
##include_package_data=False,
install_requires=install_requires,
extras_require=extras_require,
python_requires=">=3.7.0",
Expand Down
Loading