Skip to main content

The MPACT Project

Introduction

The MPACT project's main objective is to dramatically reduce the effort required to create highly optimizing HPC and ML compilers for a large class of architectures using LLVM and MLIR. We do this by providing a declarative language-based mechanism for collecting and expressing critical aspects of a target architecture in a way that can be reasoned about and leveraged by all passes in both MLIR and LLVM.

Building the MPACT compiler

To build and run the MPACT compiler from source (for developers), please follow the steps below.

Check out code and sync submodules

Use the following commands to clone the MPACT compiler repository.

git clone https://github.com/MPACT-ORG/mpact-compiler.git
cd mpact-compiler
git submodule update --init --recursive --progress

All following commands assume you remain in the mpact-compiler directory.

Setup Python virtual environment

The following commands initialize a virtual environment.

python3.11 -m venv mpact_venv  # one time set up
source mpact_venv/bin/activate # for each session

Also make sure to set the Python paths as follows.

export PYTHONPATH=`pwd`/build/tools/mpact/python_packages/mpact

Install build requirements

Note that currently we rely on torch-mlir requirements defined in the submodule to ensure all the build requirements are consistent.

python -m pip install --upgrade pip
python -m pip install -r externals/torch-mlir/requirements.txt
python -m pip install -r externals/torch-mlir/torchvision-requirements.txt

Building the MPACT compiler in-tree

The following command generates configuration files to build the MPACT compiler project completely in-tree, which means that both LLVM as well as torch-mlir are built from source.

cmake -GNinja -Bbuild \
  -DCMAKE_BUILD_TYPE=Release \
  -DPython3_FIND_VIRTUALENV=ONLY \
  -DLLVM_ENABLE_PROJECTS=mlir \
  -DLLVM_EXTERNAL_PROJECTS="torch-mlir;mpact" \
  -DLLVM_EXTERNAL_TORCH_MLIR_SOURCE_DIR="${PWD}/externals/torch-mlir" \
  -DLLVM_EXTERNAL_MPACT_SOURCE_DIR="${PWD}" \
  -DLLVM_TARGETS_TO_BUILD=host \
  -DMLIR_ENABLE_BINDINGS_PYTHON=ON \
  externals/torch-mlir/externals/llvm-project/llvm

Run the following to ensure the MPACT compiler builds and runs correctly.

cmake --build build --target check-mpact

Metadata

Release files for mpact 20240607

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mpact 20240607
File Interpreter ABI Platform
mpact-20240607-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details

Release files / mpact-20240607-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mpact-20240607-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 53.3 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
805a05affb2e3c90e198bea36c767c865ac9c0a1a9bed8a85c6b1acaa3ebd4a1
BLAKE2b-256 checksum
How to use checksums
5f9e6ce8b0f51b31b8dae568d52aa0ffb3f9e297250b0e25fa3990e7a537b48a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.14

Security for mpact 20240607

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

20240607 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page