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.post4.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.post4-py3-none-any.whl (61.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mase_triton-0.0.6.post4.tar.gz
Algorithm Hash digest
SHA256 23ca61ad3a2402094ac1bd6510cddc51551c32ec7123bdf0ad556dbf1479db88
MD5 247c1531c8306cdb22105284a751c2c9
BLAKE2b-256 40747b48cdd7a54e712563d62f5d41681c5331f71daba39dd530d1c0ec6c7d43

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mase_triton-0.0.6.post4-py3-none-any.whl
Algorithm Hash digest
SHA256 264ceae871a52b74f3fc7172a3f15cd142a82dfe5a9520fbf54acb85126a77a9
MD5 09502540fe48f45da5aab364e5a22726
BLAKE2b-256 0347086befcf31b7c35d6b3c1cf935d0f1e5839ce57926042b51347bdfaa3ad8

See more details on using hashes here.

Provenance

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