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.7.tar.gz (54.7 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.7-py3-none-any.whl (62.0 kB view details)

Uploaded Python 3

File details

Details for the file mase_triton-0.0.7.tar.gz.

File metadata

  • Download URL: mase_triton-0.0.7.tar.gz
  • Upload date:
  • Size: 54.7 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.7.tar.gz
Algorithm Hash digest
SHA256 a3979803670fdace520a07f9151758e61ea68bdc9067957fe9f70cf989f8128f
MD5 53ee5c044dad53b6010ad4dda1b53694
BLAKE2b-256 552c5ac657f88515a0239912ab507daddfea501d75824742de698140b0edf1cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for mase_triton-0.0.7.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.7-py3-none-any.whl.

File metadata

  • Download URL: mase_triton-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 62.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mase_triton-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 75f001a6fc0fa487d2b44ecb0293ba6d4fd3484edb76e649ec446a2bd8d7560c
MD5 bf3f4409a0288cc0f9fd805765be1784
BLAKE2b-256 ecec0df6507dae5a458710154d1039266d1f11ef2f03a78dc70a3b9e2b018d09

See more details on using hashes here.

Provenance

The following attestation bundles were made for mase_triton-0.0.7-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