Compare commits
16 commits
Author | SHA1 | Date | |
---|---|---|---|
|
53cf80a989 | ||
|
bfcf06ecf0 | ||
|
45a4a23be1 | ||
|
19ba93ab1f | ||
|
6439b43963 | ||
|
a2ae671ce1 | ||
|
b447c676eb | ||
|
2a6ee74047 | ||
|
e2d5293bde | ||
|
8ba82dfa1c | ||
|
18cc7ff5b7 | ||
|
43178fd76e | ||
|
d0ea2b39d2 | ||
|
79ac6b5504 | ||
|
d5b31a5207 | ||
|
9e96b283c0 |
3 changed files with 50 additions and 35 deletions
40
.github/workflows/build_sdist_wheel_cpu_only.yml
vendored
Normal file
40
.github/workflows/build_sdist_wheel_cpu_only.yml
vendored
Normal 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
|
|
@ -1,4 +1,4 @@
|
||||||
name: Build AutoGPTQ Wheels
|
name: Build AutoGPTQ Wheels with CUDA
|
||||||
|
|
||||||
on: workflow_dispatch
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: 'main'
|
ref: 'v0.2.2-patch-fix'
|
||||||
|
|
||||||
- uses: actions/setup-python@v3
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
|
@ -51,7 +51,7 @@ jobs:
|
||||||
if ($IsLinux) {$env:LD_LIBRARY_PATH = $env:CONDA_PREFIX + '/lib:' + $env:LD_LIBRARY_PATH}
|
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'
|
$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' }
|
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
|
- uses: actions/upload-artifact@v3
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
|
@ -65,36 +65,7 @@ jobs:
|
||||||
name: 'windows-wheels'
|
name: 'windows-wheels'
|
||||||
path: ./dist/*.whl
|
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
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: 'sdist'
|
name: "sdist"
|
||||||
path: ./dist/*.tar.gz
|
path: ./dist/*.tar.gz
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: 'no-cuda-wheel'
|
|
||||||
path: ./dist/*.whl
|
|
8
setup.py
8
setup.py
|
@ -20,13 +20,13 @@ if sys.version_info < python_min_version:
|
||||||
|
|
||||||
CUDA_VERSION = "".join(os.environ.get("CUDA_VERSION", "").split("."))
|
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 = {
|
common_setup_kwargs = {
|
||||||
"version": version,
|
"version": version,
|
||||||
"name": "auto_gptq",
|
"name": "auto_gptq",
|
||||||
"author": "PanQiWei",
|
"author": "PanQiWei",
|
||||||
"description": "An easy-to-use LLMs quantization package with user-friendly apis, based on GPTQ algorithm.",
|
"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",
|
"long_description_content_type": "text/markdown",
|
||||||
"url": "https://github.com/PanQiWei/AutoGPTQ",
|
"url": "https://github.com/PanQiWei/AutoGPTQ",
|
||||||
"keywords": ["gptq", "quantization", "large-language-models", "pytorch", "transformers"],
|
"keywords": ["gptq", "quantization", "large-language-models", "pytorch", "transformers"],
|
||||||
|
@ -88,6 +88,7 @@ if TORCH_AVAILABLE:
|
||||||
"cmdclass": {'build_ext': cpp_extension.BuildExtension}
|
"cmdclass": {'build_ext': cpp_extension.BuildExtension}
|
||||||
}
|
}
|
||||||
common_setup_kwargs.update(additional_setup_kwargs)
|
common_setup_kwargs.update(additional_setup_kwargs)
|
||||||
|
print(f"include dirs are: {include_dirs}")
|
||||||
setup(
|
setup(
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
install_requires=requirements,
|
install_requires=requirements,
|
||||||
|
@ -96,6 +97,9 @@ if TORCH_AVAILABLE:
|
||||||
**common_setup_kwargs
|
**common_setup_kwargs
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
print(f"include dirs are: {include_dirs}")
|
||||||
|
for each in include_dirs:
|
||||||
|
assert os.path.isdir(each)
|
||||||
setup(
|
setup(
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
install_requires=requirements,
|
install_requires=requirements,
|
||||||
|
|
Loading…
Add table
Reference in a new issue