https://github.com/certik/mlc
Machine Learning Compiler
https://github.com/certik/mlc
Last synced: about 1 year ago
JSON representation
Machine Learning Compiler
- Host: GitHub
- URL: https://github.com/certik/mlc
- Owner: certik
- License: mit
- Created: 2024-02-26T18:30:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-29T03:59:53.000Z (over 2 years ago)
- Last Synced: 2025-04-15T00:47:57.749Z (about 1 year ago)
- Language: C
- Size: 255 KB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Machine Learning Compiler (mlc)
In top-level directory, `mlc`.
## Build
### (Recommended) Install `mamba` and `conda` from `miniforge`.
We have found that the `miniforge` versions of `mamba` and `conda`
work better than those you get from the `anaconda` graphical
installer. You can make any of them work, but this seems
smoothest to us.
https://github.com/conda-forge/miniforge
### Create and Activate Environment
```
mamba env create -f environment_unix.yml
conda activate mlc
```
## Install `src`, or set `PYTHONPATH`
There are two ways to make the code accessible
and to reload it on each run:
### Alternative 1: Install Editable
into the `mlc` environment
```
pip install -e .
```
### Alternative 2: Set `PYTHONPATH`
Either on-the-fly for each run, for example:
```
PYTHONPATH="./src:$PYTHONPATH" pytest
```
or once per terminal session:
```
export PYTHONPATH="./src:$PYTHONPATH"
```
before running tests.
## Run tests:
```
pytest
```
## See the IR
The `-s` option tells `pytest` to display `print` output.
```
pytest -s
```
## Plot the computational graph:
```
dot -Tpng mnist-cnn.dot -o mnist-cnn.dot.png
```
