Skip to main content

Triton kernels for MASE

Project description

MASE-Triton

Software-emulation & acceleration triton kernels for MASE.

Install

Please ensure you are using Python 3.11 or later, and run MASE-Triton on CUDA-enabled GPU.

PyPI

pip install mase-triton

Build from Source

  1. Install uv

  2. Build the package

    uv build
    

    The wheel file can be found in dist/ folder. You can install it by pip install path/to/wheel/file.whl

Functionality

  • Random Bitflip
    • functional APIs: random bitflip function with backward support.
    • layers.py: subclasses of torch.nn.Module that can be used in neural networks.
      • RandomBitflipDropout
      • RandomBitflipLinear
  • Optical Transformer
    • functional APIs: optical transformer function with backward support.
      • ot_quantize
      • ot_linear
      • ot_matmul
    • layers.py: subclasses of torch.nn.Module that can be used in neural networks.
      • OpticalTransformerLinear
  • MXFP: Simulate MXFP formats on CPU & GPU using PyTorch & Triton.
    • functional
      • extract_mxfp_tensor: Cast a tensor to MXFP format (extracting the shared exponent and Minifloat elements).
      • compose_mxfp_tensor: Cast an MXFP tensor to FP format (composing MXFP components).
      • mxfp_linear: functional linear operation with MXFP support.
      • mxfp_matmul: functional matrix multiplication with MXFP support.
    • layers
      • MXFPLinearPTQ: Linear layer with MXFP support for post-training quantization (no back propagation support).
  • Minifloat: Simulate minifloat formats on CPU & GPU using PyTorch & Triton.
    • functional
      • extract_minifloat_component: Extract minifloat components from a tensor.
      • compose_minifloat_component: Compose minifloat components back to a tensor.
      • quantize_dequantize: Quantize and dequantize tensors using minifloat format.
      • minifloat_linear: functional linear operation with minifloat support.
      • minifloat_matmul: functional matrix multiplication with minifloat support.
    • layers
      • MinifloatLinearPTQ: Linear layer with minifloat support for post-training quantization (no back propagation support).

Dev

  1. Install uv

  2. Install dependencies for development

    uv sync
    

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

mase_triton-0.0.6.post6.tar.gz (54.2 kB view details)

Uploaded Source

Built Distribution

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

mase_triton-0.0.6.post6-py3-none-any.whl (61.8 kB view details)

Uploaded Python 3

File details

Details for the file mase_triton-0.0.6.post6.tar.gz.

File metadata

  • Download URL: mase_triton-0.0.6.post6.tar.gz
  • Upload date:
  • Size: 54.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mase_triton-0.0.6.post6.tar.gz
Algorithm Hash digest
SHA256 b582c909e99487708557b079f196885b94f09b44df682e8b83d979319f04a48f
MD5 5ab7bf3d0368da821831043dca0d590a
BLAKE2b-256 94d79f225fac60fe7e98940cefda1942c92ead7da63a1ccbce6e1c57103e5a52

See more details on using hashes here.

Provenance

The following attestation bundles were made for mase_triton-0.0.6.post6.tar.gz:

Publisher: release.yaml on DeepWok/mase-triton

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

File details

Details for the file mase_triton-0.0.6.post6-py3-none-any.whl.

File metadata

File hashes

Hashes for mase_triton-0.0.6.post6-py3-none-any.whl
Algorithm Hash digest
SHA256 2415a6230e5ddd35803ff654e27dc403fc3ffd0cfd66d8a3bd008806005deb8a
MD5 f1409c8912e543e7e3cca9efc8dbc591
BLAKE2b-256 afce767148ad5034d65347e32da238303994ed5919ebcd37f4556de68d73eafd

See more details on using hashes here.

Provenance

The following attestation bundles were made for mase_triton-0.0.6.post6-py3-none-any.whl:

Publisher: release.yaml on DeepWok/mase-triton

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