Skip to main content

Compiled CUDA kernels for DynQuant: n-bit dequant, decode GEMV, tensor-core GEMM, MoE grouped GEMM.

Project description

dynquant-kernels

Compiled CUDA kernels for DynQuant.

You almost certainly want pip install dynquant, which resolves this wheel for your platform. Install it directly only to force a specific variant.

What is in here

One shared object, exposed through the PyTorch dispatcher under the dynquant namespace (not pybind, so torch.compile can trace through it):

  • n-bit tile dequantization
  • decode GEMV, templated on bit-width — the memory-bound case that dominates serving
  • tensor-core prefill GEMM (cuBLASLt, then fused CUTLASS)
  • MoE grouped GEMM — one launch for all experts, not one per expert

Built with Thrust, CUB, cuBLASLt and CUTLASS. -use_fast_math is off by design: it implies denormals-to-zero, and a dequantized weight near the bottom of a 2-bit group's range is exactly the denormal case, so accuracy measured with it on is not reproducible.

Variants

The wheel version carries a PEP 440 local segment identifying what it was built against, the same scheme torch uses:

dynquant-kernels==0.1.0+cu124torch27

Compatibility with dynquant-core is enforced by an ABI number baked into the binary, checked at import. A mismatch refuses to load with an actionable message rather than returning wrong numbers — see csrc/include/dynquant/abi.h.

Diagnosing an install

This package never raises on import, so a broken binary degrades to the reference backend rather than taking down import dynquant. To find out what happened:

import dynquant_kernels

print(dynquant_kernels.report())

That works with dynquant-core absent, which is the point — it makes this wheel diagnosable on its own. dynquant doctor gives the same information in context.

Building from source

pip install --no-build-isolation -e packages/dynquant-kernels

Needs CMake ≥ 3.26, nvcc, and a C++17 compiler. --no-build-isolation is required: an isolated build resolves the newest torch, and an extension linked against a different libtorch than the one you run fails to import.

With no CUDA toolkit present the build still succeeds, producing a CPU-only extension — deliberately, so a cheap CI runner catches CMake and registration errors before a GPU runner is needed. Release builds set DYNQUANT_REQUIRE_CUDA=ON so that a toolkit which failed detection is a build failure, not a wheel advertising kernels it does not contain.

License

Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dynquant_kernels-0.1.1.tar.gz (47.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dynquant_kernels-0.1.1-cp313-cp313-manylinux_2_34_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

dynquant_kernels-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

dynquant_kernels-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

dynquant_kernels-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

Details for the file dynquant_kernels-0.1.1.tar.gz.

File metadata

  • Download URL: dynquant_kernels-0.1.1.tar.gz
  • Upload date:
  • Size: 47.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for dynquant_kernels-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ca6bc3297c532d48e80353284ae5b2de9151af076ec103e616bac455e426d9c9
MD5 93bd54bfa5d8a7d2938290f6cdec0775
BLAKE2b-256 28ef96d738902b8fe3d1d1900e4bf1c165d42146e1b409c23653879161b905ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynquant_kernels-0.1.1.tar.gz:

Publisher: wheels.yml on kambojvikram/dynquant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dynquant_kernels-0.1.1-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dynquant_kernels-0.1.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e0c5fb5522d6f76d41e48ea823b0ee45254eb983672610651a8d400077169aaa
MD5 9a6e3dee4705d74e1c49336d6680c51d
BLAKE2b-256 b32c2d6eed16f0011436574fdce3f9cd959990ff078919596c3572f390e1334d

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynquant_kernels-0.1.1-cp313-cp313-manylinux_2_34_x86_64.whl:

Publisher: wheels.yml on kambojvikram/dynquant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dynquant_kernels-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dynquant_kernels-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6f021e0684a5993d15e43173264cb4d86ba1330d41f24fb4cbb6aac62325a0a6
MD5 cb71c4f565a86d0afcbfd8692394ab5a
BLAKE2b-256 1ff5a717cf932ad1e59f3a3fa877d976d1217a3296960d4a8d223d091faaf248

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynquant_kernels-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: wheels.yml on kambojvikram/dynquant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dynquant_kernels-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dynquant_kernels-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d6e319a815aad21b3b8aa709c99b55203889f00156094bb31553e737cc7a2b50
MD5 5a4f589350b7bc8966a8e7743511368a
BLAKE2b-256 3204aecba9864b2640ffd9f84b9e2f0a62f764783e3382210eedd90c5ce2c523

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynquant_kernels-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: wheels.yml on kambojvikram/dynquant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dynquant_kernels-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dynquant_kernels-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 dd2be27336272711bb39c66262e52bc5df35101841b749d5241510600bd0dfaf
MD5 160c977aa14d96f2d853fdc88129db0f
BLAKE2b-256 8c853b614a7750c93803d2f8fd25fd4d8c72ee89b5c170f86fc5c3d23f1907bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynquant_kernels-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl:

Publisher: wheels.yml on kambojvikram/dynquant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page