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.0.tar.gz (47.4 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.0-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.0-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.0-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.0-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.0.tar.gz.

File metadata

  • Download URL: dynquant_kernels-0.1.0.tar.gz
  • Upload date:
  • Size: 47.4 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.0.tar.gz
Algorithm Hash digest
SHA256 6ba26296ab57bedadf4c698726984ee1c8b52c324180cf3a4311a659e1e6a109
MD5 8ae56a338b403b16c3d4746e53e3b9b0
BLAKE2b-256 3fa4740223571705739ae3f193f8254ca436c7bc62663e5d0fde4db4340a0e31

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynquant_kernels-0.1.0.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.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dynquant_kernels-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 277f7a31a7d2ecb034702f669c88adf5472c62459af47a5f5ff1018e19a2aa75
MD5 0caf079c9d96e7218dc6d8cdaf7bd318
BLAKE2b-256 f0c804528d7d8f1f222ef19fdc57ed8f2b9c784e58e215da1e34cf53ffca28fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynquant_kernels-0.1.0-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.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dynquant_kernels-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2e3657c7c1a0434677730584f30f04d535d5aaac152ae8f602cf1d17d533bf7b
MD5 7b0be163f5680250d8b8b74859795772
BLAKE2b-256 7d7bb1e6b03a8276d931d639b2bdd37f9078a36e9a8961a3aefaf6ba78015223

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynquant_kernels-0.1.0-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.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dynquant_kernels-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 df3b7b3e5e0bdac787f9907c2b618b1f2288ae12ca5daf56f0153d9e5e2e36e7
MD5 e316d478fbb412e4b3344b599f60a27b
BLAKE2b-256 74b01e80b76c25a8294e29389378a75cc6e9eeeda35e81ff80ea5e75b1b1d3be

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynquant_kernels-0.1.0-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.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dynquant_kernels-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 93f4c6f82fe8465ba5d33987cf1e6e7392e85e17fd379ca5b2dbd2778377de58
MD5 7ac6e951704c2c450b405540e47ba8eb
BLAKE2b-256 3d61c2c4aba7c3c8d52719c09fe74e455c0d79bbef2845a9065bff1128cdd37b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynquant_kernels-0.1.0-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