Skip to content
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
11 changes: 10 additions & 1 deletion .github/scripts/generate_release_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def as_matrix_item(self) -> dict[str, int | str]:
return {
"cuda": self.cuda,
"torch": self.torch,
"python": self.python,
"python": format_python_version(self.python),
}


Expand All @@ -57,6 +57,15 @@ def python_key(python_version: str) -> tuple[int, int]:
return base, 0 if free_threaded else 1


def format_python_version(python_version: str) -> str:
free_threaded = python_version.endswith("t")
base = python_version[:-1] if free_threaded else python_version
if len(base) < 2:
raise ValueError(f"unsupported python version format: {python_version}")
formatted = f"{base[0]}.{base[1:]}"
return f"{formatted}t" if free_threaded else formatted


def fetch_torch_index(source_url: str) -> str:
request = urllib.request.Request(
source_url,
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def worker() -> None:

def stream_process_output(proc: subprocess.Popen[str], log_file: Path) -> int:
assert proc.stdout is not None
log_file.parent.mkdir(parents=True, exist_ok=True)
with log_file.open("w", encoding="utf-8") as fh:
for line in proc.stdout:
print(line, end="")
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,15 @@ jobs:
run: |
echo "UV_PYTHON=${{ matrix.python }}" >> "$GITHUB_ENV"
echo "UV_TORCH_BACKEND=cu${{ matrix.cuda }}" >> "$GITHUB_ENV"
export UV_PYTHON=${{ matrix.python }}
export UV_TORCH_BACKEND=cu${{ matrix.cuda }}

env_name="cu${{ matrix.cuda }}_torch${{ matrix.torch }}_py${{ matrix.python }}_release"
/opt/uv/setup_uv_venv.sh $env_name ${{ matrix.python }}
source /opt/uv/setup_uv_venv.sh $env_name ${{ matrix.python }}
python -VV

echo "source /opt/env/init_compiler_torch_only.sh ${{ matrix.cuda }} ${{ matrix.torch }} $UV_PYTHON"
source /opt/env/init_compiler_torch_only.sh ${{ matrix.cuda }} ${{ matrix.torch }} $UV_PYTHON
echo "source /opt/env/init_compiler_torch_only.sh ${{ matrix.cuda }} ${{ matrix.torch }} ${{ matrix.python }}"
/opt/env/init_compiler_torch_only.sh ${{ matrix.cuda }} ${{ matrix.torch }} ${{ matrix.python }}

- name: Print uv env
if: env.SHOULD_RUN == 1
Expand Down Expand Up @@ -232,7 +234,7 @@ jobs:

[ $(stat -c%s "dist/$whl") -lt 104857600 ] && echo "wheel size < 100M" && exit 1 || echo "$whl size check passed."

if [ "${{ matrix.python }}" != "313t" ]; then # twine doesn't support python 3.13 yet
if [ "${{ matrix.python }}" != "3.13t" ]; then # twine doesn't support python 3.13 yet
uv pip install twine
twine check dist/$whl
fi
Expand Down
3 changes: 1 addition & 2 deletions gptqmodel/utils/awq.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

from .cpp import TorchOpsJitExtension, default_torch_ops_build_root


_AWQ_OPS_NAME = "gptqmodel_awq_ops"
_AWQ_OPS_NAMESPACE = "gptqmodel_awq"

Expand Down Expand Up @@ -62,7 +61,7 @@ def _awq_extra_cuda_cflags() -> list[str]:
os.getenv("NVCC_THREADS", "2"),
"--optimize=3",
"-Xptxas",
"-v,-O3,-dlcm=ca",
"-O3,-dlcm=ca", # -v, removed, or log file is too large.
"-lineinfo",
"-Xfatbin",
"-compress-all",
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from setuptools import find_namespace_packages, find_packages, setup
from setuptools.command.bdist_wheel import bdist_wheel as _bdist_wheel


if Version(setuptools.__version__) < Version("78.1.1"):
raise RuntimeError(
f"\033[31mYour setuptools version (`{setuptools.__version__}`) is too old and incompatible.\n"
Expand Down Expand Up @@ -715,7 +714,7 @@ def _env_enabled_any(names, default="1") -> bool:
# Print register/shared-memory usage per kernel (debug aid, no perf effect)
# Ensure PTXAS uses maximum optimization
# Cache global loads in both L1 and L2 (better for memory-bound kernels)
"-Xptxas", "-v,-O3,-dlcm=ca",
"-Xptxas", "-O3,-dlcm=ca", # -v, removed, or log file is too large.
"-lineinfo", # keep source line info for profiling
# "--resource-usage", # show per-kernel register/SMEM usage
"-Xfatbin", "-compress-all", # compress fatbin
Expand Down
Loading