Compare commits

...

16 commits
main ... v0.2.2

Author SHA1 Message Date
PanQiWei
53cf80a989 rename to build_wheels_cuda.yml 2023-06-08 13:32:07 +08:00
PanQiWei
bfcf06ecf0 upload sdist file 2023-06-08 13:30:16 +08:00
PanQiWei
45a4a23be1 assert dir exists 2023-06-08 13:23:44 +08:00
PanQiWei
19ba93ab1f revert absolute path in include_dirs 2023-06-08 13:14:22 +08:00
PanQiWei
6439b43963 print include dirs 2023-06-08 13:12:04 +08:00
PanQiWei
a2ae671ce1 display directory structure 2023-06-08 13:09:22 +08:00
PanQiWei
b447c676eb make sdist only 2023-06-08 13:02:38 +08:00
PanQiWei
2a6ee74047 set python version to 3.8 2023-06-08 12:55:50 +08:00
PanQiWei
e2d5293bde change to runs-on windows-latest 2023-06-08 12:41:50 +08:00
PanQiWei
8ba82dfa1c change workflow name 2023-06-08 12:34:25 +08:00
PanQiWei
18cc7ff5b7 add build_sdist_wheel_cpu_only.yml 2023-06-08 12:27:52 +08:00
PanQiWei
43178fd76e remove build_sdist job 2023-06-08 12:27:33 +08:00
PanQiWei
d0ea2b39d2 use absolute path in include_dirs 2023-06-08 12:25:33 +08:00
PanQiWei
79ac6b5504 set encoding of long_description to utf-8 2023-06-08 10:58:28 +08:00
PanQiWei
d5b31a5207 change branch to checkout 2023-06-08 10:53:50 +08:00
PanQiWei
9e96b283c0 set version to 0.2.2 2023-06-08 10:53:37 +08:00
3 changed files with 50 additions and 35 deletions

View file

@ -0,0 +1,40 @@
name: Build AutoGPTQ Wheels CPU only
on: workflow_dispatch
jobs:
build_sdist:
if: ${{ github.repository_owner == 'PanQiWei' }}
name: Build source distribution
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v3
with:
ref: 'v0.2.2-patch-fix'
- uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Install Dependencies
run: |
python -m pip install --upgrade build setuptools wheel
- name: Build Wheel
run: |
echo $(ls)
python setup.py sdist
- uses: actions/upload-artifact@v3
with:
name: 'sdist'
path: ./dist/*.tar.gz
# - uses: actions/upload-artifact@v3
# with:
# name: 'no-cuda-wheel'
# path: ./dist/*.whl

View file

@ -1,4 +1,4 @@
name: Build AutoGPTQ Wheels
name: Build AutoGPTQ Wheels with CUDA
on: workflow_dispatch
@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: 'main'
ref: 'v0.2.2-patch-fix'
- uses: actions/setup-python@v3
with:
@ -51,7 +51,7 @@ jobs:
if ($IsLinux) {$env:LD_LIBRARY_PATH = $env:CONDA_PREFIX + '/lib:' + $env:LD_LIBRARY_PATH}
$env:TORCH_CUDA_ARCH_LIST = '6.0 6.1 7.0 7.5 8.0 8.6+PTX'
if ([decimal]$env:CUDA_VERSION -ge 11.8) { $env:TORCH_CUDA_ARCH_LIST = '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
python -m build -n
python setup.py sdist bdist_wheel
- uses: actions/upload-artifact@v3
if: runner.os == 'Linux'
@ -65,36 +65,7 @@ jobs:
name: 'windows-wheels'
path: ./dist/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v3
with:
ref: 'main'
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install Dependencies
run: |
python -m pip install --upgrade build setuptools wheel
- name: Build Wheel
run: |
python -m build -n
- uses: actions/upload-artifact@v3
with:
name: 'sdist'
name: "sdist"
path: ./dist/*.tar.gz
- uses: actions/upload-artifact@v3
with:
name: 'no-cuda-wheel'
path: ./dist/*.whl

View file

@ -20,13 +20,13 @@ if sys.version_info < python_min_version:
CUDA_VERSION = "".join(os.environ.get("CUDA_VERSION", "").split("."))
version = "0.2.1" + (f"+cu{CUDA_VERSION}" if CUDA_VERSION and IN_GITHUB_ACTIONS else "")
version = "0.2.2" + (f"+cu{CUDA_VERSION}" if CUDA_VERSION and IN_GITHUB_ACTIONS else "")
common_setup_kwargs = {
"version": version,
"name": "auto_gptq",
"author": "PanQiWei",
"description": "An easy-to-use LLMs quantization package with user-friendly apis, based on GPTQ algorithm.",
"long_description": (Path(__file__).parent / "README.md").read_text(),
"long_description": (Path(__file__).parent / "README.md").read_text(encoding="UTF-8"),
"long_description_content_type": "text/markdown",
"url": "https://github.com/PanQiWei/AutoGPTQ",
"keywords": ["gptq", "quantization", "large-language-models", "pytorch", "transformers"],
@ -88,6 +88,7 @@ if TORCH_AVAILABLE:
"cmdclass": {'build_ext': cpp_extension.BuildExtension}
}
common_setup_kwargs.update(additional_setup_kwargs)
print(f"include dirs are: {include_dirs}")
setup(
packages=find_packages(),
install_requires=requirements,
@ -96,6 +97,9 @@ if TORCH_AVAILABLE:
**common_setup_kwargs
)
else:
print(f"include dirs are: {include_dirs}")
for each in include_dirs:
assert os.path.isdir(each)
setup(
packages=find_packages(),
install_requires=requirements,