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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mase_triton-0.0.6.post5.tar.gz
  • Upload date:
  • Size: 53.9 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.post5.tar.gz
Algorithm Hash digest
SHA256 dd8930d6ee7f83a9fef506f2477d1607947fd235c2e21bfaf36482a03bb060a2
MD5 f4e13fc21a8f3c1db7c059fd264b0be2
BLAKE2b-256 155b0fbc7e3eec323fd23b668b59332856575c11933cc0adedf19e5cd9d67837

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mase_triton-0.0.6.post5-py3-none-any.whl
Algorithm Hash digest
SHA256 5490889adba4665d787102f9c78bc42c1fcac1abc9657dd605c9276a6eee14d2
MD5 84759fcc47110cdc0be359341c1a8e23
BLAKE2b-256 d3dcc8d4dcfc6ca10d2d33823b7f43e139b2760d358d9d4ba6702d9687f07693

See more details on using hashes here.

Provenance

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