Name Date Size #Lines LOC

..13-Mar-2025-

data/H13-Mar-2025-121114

tools/H13-Mar-2025-2,7972,084

README.mdH A D13-Mar-20251 KiB2821

lit.local.cfgH A D13-Mar-2025220 65

test_MTTKRP.pyH A D13-Mar-20251.9 KiB5623

test_SDDMM.pyH A D13-Mar-20251.8 KiB5931

test_SpMM.pyH A D13-Mar-20251.1 KiB3620

test_SpMV.pyH A D13-Mar-20251.9 KiB5723

test_Tensor.pyH A D13-Mar-20252.5 KiB10377

test_scalar_tensor_algebra.pyH A D13-Mar-2025932 3723

test_simple_tensor_algebra.pyH A D13-Mar-20251.7 KiB6245

test_tensor_complex.pyH A D13-Mar-2025934 3224

test_tensor_types.pyH A D13-Mar-2025978 3627

test_tensor_unary_ops.pyH A D13-Mar-20251.3 KiB4130

test_true_dense_tensor_algebra.pyH A D13-Mar-2025702 2312

unit_test_tensor_core.pyH A D13-Mar-202516.2 KiB527372

unit_test_tensor_io.pyH A D13-Mar-20254 KiB146108

unit_test_tensor_utils.pyH A D13-Mar-20253.6 KiB12279

README.md

1# MLIR-PyTACO: Implementing PyTACO with MLIR
2
3TACO (http://tensor-compiler.org/) is a tensor algebra compiler. TACO defines
4PyTACO, a domain specific language in Python, for writing tensor algebra
5applications.
6
7This directory contains the implementation of PyTACO using MLIR. In particular,
8we implement a Python layer that accepts the PyTACO language, generates MLIR
9linalg.generic OPs with sparse tensor annotation to represent the tensor
10computation, and invokes the MLIR sparse tensor code generator
11(https://mlir.llvm.org/docs/Dialects/SparseTensorOps/) as well as other MLIR
12compilation passes to generate an executable. Then, we invoke the MLIR execution
13engine to execute the program and pass the result back to the Python layer.
14
15As can be seen from the tests in this directory, in order to port a PyTACO
16program to MLIR-PyTACO, we basically only need to replace this line that imports
17PyTACO:
18
19```python
20import pytaco as pt
21```
22
23with this line to import MLIR-PyTACO:
24
25```python
26from tools import mlir_pytaco_api as pt
27```
28