Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
400e8d0
perf(cuda): add Ampere pipeline and decode primitives
groxaxo Jul 11, 2026
d4c0fae
perf(cuda): add async MMA pipeline and small-M GEMV
groxaxo Jul 11, 2026
367ce0d
feat(cuda): expose kernel dispatch modes to PyTorch
groxaxo Jul 11, 2026
9ffc322
perf(runtime): reduce GPTQ-Pro packing memory and expose dispatch ove…
groxaxo Jul 11, 2026
9ccfbee
fix(runtime): handle channelwise groups and document optimized dispatch
groxaxo Jul 11, 2026
510757d
fix(cuda): preserve fallback tails and FP16 dequant semantics
groxaxo Jul 11, 2026
8f15ab9
fix(cuda): satisfy kernel-mode parser control flow
groxaxo Jul 11, 2026
2ccc5f8
test(cuda): validate every GPTQ-Pro dispatch path
groxaxo Jul 11, 2026
02d295a
ci(cuda): compile Ampere kernel and standalone validator
groxaxo Jul 11, 2026
73ac9d6
feat(bench): add raw GPTQ-Pro kernel benchmark and parity checks
groxaxo Jul 11, 2026
3ab9373
test(kernel): lock Ampere dispatch, packing, and source contracts
groxaxo Jul 11, 2026
525503d
docs(readme): document optimized Ampere dispatch and benchmarking
groxaxo Jul 11, 2026
aab5314
docs(roadmap): record implemented Ampere pipeline and remaining gates
groxaxo Jul 11, 2026
5305c81
ci(kernel): add targeted Python style and syntax gate
groxaxo Jul 11, 2026
42cf804
ci(temp): capture formatted kernel Python sources
groxaxo Jul 11, 2026
16c31ac
ci(temp): expose format artifact on pull request runs
groxaxo Jul 11, 2026
ac0b8e9
style(kernel): apply Ruff formatting to runtime helper
groxaxo Jul 11, 2026
59a1aa3
style(kernel): apply Ruff formatting to quantized linear runtime
groxaxo Jul 11, 2026
d1c6a4b
style(kernel): apply Ruff formatting to raw benchmark
groxaxo Jul 11, 2026
07d971f
style(kernel): apply Ruff formatting to Ampere contracts
groxaxo Jul 11, 2026
88411ed
ci(kernel): compile the real PyTorch CUDA extension binding
groxaxo Jul 11, 2026
8c29d56
test(kernel): isolate runtime helper tests from package-wide imports
groxaxo Jul 11, 2026
5aaeb92
fix(ci): build PyTorch extension inside isolated environment
groxaxo Jul 11, 2026
7568327
fix(bench): disable TF32 in numerical reference
groxaxo Jul 11, 2026
39584ad
perf(cuda): consume native GPTQ int32 words directly
groxaxo Jul 11, 2026
33ec1e3
perf(cuda): run all kernels directly from native qweight
groxaxo Jul 11, 2026
1f97a39
perf(cuda): bind native int32 qweight without repacking
groxaxo Jul 11, 2026
8446766
perf(runtime): pass native qweight directly to CUDA
groxaxo Jul 11, 2026
7d714b3
perf(runtime): remove duplicate packed-weight buffer
groxaxo Jul 11, 2026
19898be
test(cuda): validate native qweight dispatch paths
groxaxo Jul 11, 2026
250aaaa
perf(bench): benchmark native qweight without duplicate packing
groxaxo Jul 11, 2026
a399dae
test(kernel): lock native-qweight runtime contract
groxaxo Jul 11, 2026
e81ef38
docs(readme): document native-qweight Ampere runtime
groxaxo Jul 11, 2026
d8ae680
docs(roadmap): record native-qweight runtime and compile gates
groxaxo Jul 11, 2026
6494e7c
style(kernel): apply exact Ruff format after native-qweight pivot
groxaxo Jul 11, 2026
166a1fe
style(kernel): apply exact Ruff format to native-qweight tests
groxaxo Jul 11, 2026
7d7977f
chore(ci): remove temporary kernel format diagnostics
groxaxo Jul 11, 2026
8cb5d31
fix(runtime): normalize native qweight and scale contiguity once
groxaxo Jul 11, 2026
6a2d6b9
chore(cuda): include fixed-width integer declarations explicitly
groxaxo Jul 11, 2026
49b0797
fix(cuda): version the extension ABI after native-qweight changes
groxaxo Jul 11, 2026
88d38ed
fix(ci): isolate kernel contracts from repository conftest
groxaxo Jul 11, 2026
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
139 changes: 139 additions & 0 deletions .github/workflows/gptq-pro-cuda-compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: GPTQ-Pro Kernel CI

on:
pull_request:
paths:
- "gptqmodel_ext/gptq_pro/**"
- "gptqmodel/utils/gptq_pro.py"
- "gptqmodel/nn_modules/qlinear/gptq_pro.py"
- "scripts/benchmark_gptq_pro_kernel.py"
- "tests/kernels/test_gptq_pro_ampere_pipeline.py"
- ".github/workflows/gptq-pro-cuda-compile.yml"
push:
branches:
- perf/ampere-kernel-pipeline
paths:
- "gptqmodel_ext/gptq_pro/**"
- "gptqmodel/utils/gptq_pro.py"
- "gptqmodel/nn_modules/qlinear/gptq_pro.py"
- "scripts/benchmark_gptq_pro_kernel.py"
- "tests/kernels/test_gptq_pro_ampere_pipeline.py"
- ".github/workflows/gptq-pro-cuda-compile.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
python-style:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install Ruff
run: python -m pip install ruff==0.13.0
- name: Check modified Python sources
run: |
ruff check \
gptqmodel/utils/gptq_pro.py \
gptqmodel/nn_modules/qlinear/gptq_pro.py \
scripts/benchmark_gptq_pro_kernel.py \
tests/kernels/test_gptq_pro_ampere_pipeline.py
ruff format --check \
gptqmodel/utils/gptq_pro.py \
gptqmodel/nn_modules/qlinear/gptq_pro.py \
scripts/benchmark_gptq_pro_kernel.py \
tests/kernels/test_gptq_pro_ampere_pipeline.py
python -m py_compile \
gptqmodel/utils/gptq_pro.py \
gptqmodel/nn_modules/qlinear/gptq_pro.py \
scripts/benchmark_gptq_pro_kernel.py \
tests/kernels/test_gptq_pro_ampere_pipeline.py

cuda-compile:
runs-on: ubuntu-24.04
container:
image: nvidia/cuda:12.6.3-devel-ubuntu22.04
steps:
- uses: actions/checkout@v6
- name: Install host compiler
run: |
apt-get update
apt-get install -y --no-install-recommends build-essential
rm -rf /var/lib/apt/lists/*
- name: Compile standalone validator for Ampere targets
working-directory: gptqmodel_ext/gptq_pro
run: |
nvcc -O3 -std=c++17 -lineinfo \
-U__CUDA_NO_HALF_OPERATORS__ \
-U__CUDA_NO_HALF_CONVERSIONS__ \
-gencode arch=compute_80,code=sm_80 \
-gencode arch=compute_86,code=sm_86 \
-gencode arch=compute_87,code=sm_87 \
-gencode arch=compute_87,code=compute_87 \
gptq_pro_validate.cu gptq_pro_kernel.cu \
-o /tmp/gptq_pro_validate
- name: Record binary metadata
run: |
test -x /tmp/gptq_pro_validate
ls -lh /tmp/gptq_pro_validate

pytorch-extension-compile:
runs-on: ubuntu-24.04
container:
image: nvidia/cuda:12.6.3-devel-ubuntu22.04
env:
TORCH_CUDA_ARCH_LIST: "8.0;8.6;8.7+PTX"
steps:
- uses: actions/checkout@v6
- name: Install isolated Python build environment
run: |
apt-get update
apt-get install -y --no-install-recommends \
build-essential python3 python3-pip python3-dev python3-venv ninja-build
rm -rf /var/lib/apt/lists/*
python3 -m venv /tmp/gptq-pro-ci
/tmp/gptq-pro-ci/bin/python -m pip install --upgrade pip setuptools wheel ninja
/tmp/gptq-pro-ci/bin/python -m pip install \
--index-url https://download.pytorch.org/whl/cu126 \
torch==2.8.0
/tmp/gptq-pro-ci/bin/python -m pip install pytest
- name: Compile and import PyTorch extension
run: |
mkdir -p /tmp/gptq_pro_extension_ci
/tmp/gptq-pro-ci/bin/python - <<'PY'
from pathlib import Path
from torch.utils.cpp_extension import load

root = Path.cwd()
extension = load(
name="gptqmodel_gptq_pro_ci",
sources=[
str(root / "gptqmodel_ext/gptq_pro/gptq_pro_torch.cpp"),
str(root / "gptqmodel_ext/gptq_pro/gptq_pro_kernel.cu"),
],
extra_cflags=["-O3", "-std=c++17"],
extra_cuda_cflags=[
"-O3",
"-std=c++17",
"-lineinfo",
"-U__CUDA_NO_HALF_OPERATORS__",
"-U__CUDA_NO_HALF_CONVERSIONS__",
"-gencode=arch=compute_80,code=sm_80",
"-gencode=arch=compute_86,code=sm_86",
"-gencode=arch=compute_87,code=sm_87",
"-gencode=arch=compute_87,code=compute_87",
],
build_directory="/tmp/gptq_pro_extension_ci",
verbose=True,
)
assert hasattr(extension, "gptq_pro_gemm")
print(extension.gptq_pro_gemm.__doc__)
PY
- name: Run CPU packing and dispatch contracts
run: |
/tmp/gptq-pro-ci/bin/python -m pytest -q \
--confcutdir=tests/kernels \
tests/kernels/test_gptq_pro_ampere_pipeline.py
Loading
Loading