Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stellaraccident committed Dec 30, 2020
1 parent ce4d60e commit 9206809
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# MLIR Python Release Scripts

This repository contains setup and packaging scripts for MLIR related
projects that need to build together. They may eventually go to their
respective homes, but developing them together for now helps.

## Prep

This repository is meant to be checked out adjacent to source repositories:

* `../llvm-project` : https://github.com/llvm/llvm-project.git
* `../mlir-npcomp` : https://github.com/llvm/mlir-npcomp.git

### Create a virtual environment:

Not strictly necessary, and if you know what you are doing, do that. Otherwise:

```shell
python -m venv create ~/.venv/mlir
source ~/.venv/mlir/bin/activate
```

### Install common dependencies:

```shell
python -m pip -r requirements.txt
```

NOTE: Some older distributions still have `python` as python 2. Make sure you
are running python3, which on these systems is often `python3`.

## Install into current python environment

If you are just looking to get packages that you can import and use, do:

```shell
python ./setup_mlir.py install
```

## Build wheel files (installable archives)

```shell
python ./setup_mlir.py bdist_wheel
```
2 changes: 2 additions & 0 deletions requirements.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
numpy>=1.19.4
pybind11>=2.6.1
2 changes: 2 additions & 0 deletions setup_mlir.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# This setup.py file adapted from many places, including:
# https://github.com/pytorch/pytorch/blob/master/setup.py
# various places on stack overflow
# IREE setup files
# (does anyone write these things except by copy-paste-mash-keys until it
# works?)

Expand Down

0 comments on commit 9206809

Please sign in to comment.