mirror of https://github.com/llvm/torch-mlir
Update readme
parent
d2b684a1c3
commit
193e7ba0d5
16
README.md
16
README.md
|
@ -1,6 +1,7 @@
|
|||
# npcomp - An aspirational MLIR based numpy compiler
|
||||
|
||||
## Scratch-pad of build configurations that have worked
|
||||
This is a research prototype of MLIR dialects for representing
|
||||
numpy programs, and a set of reference tracing/compiler tools.
|
||||
|
||||
## Quick start
|
||||
|
||||
|
@ -18,19 +19,21 @@ ninja
|
|||
|
||||
The native extension relies on pybind11. In a perfect world, this could just
|
||||
be installed with your system package manager. However, at least on
|
||||
Ubuntu Disco, the system package installed with broken cmake files.
|
||||
some tested versions of Ubuntu, the system package installed with broken cmake
|
||||
files.
|
||||
|
||||
I built/installed from pybind11 head without issue and put it in /usr/local.
|
||||
There are better ways to do this.
|
||||
If this happens, you must install pybind11 from source.
|
||||
|
||||
### Building the python native library
|
||||
|
||||
```shell
|
||||
# From the build directory
|
||||
ninja NPCOMPNativePyExt
|
||||
# Outputs to tools/npcomp/python/npcomp/native...so
|
||||
ninja check-npcomp
|
||||
python3 ./python/run_tests.py
|
||||
|
||||
# Setup PYTHONPATH for interactive use.
|
||||
export PYTHONPATH=$(pwd)/tools/npcomp/python
|
||||
python3 -m npcomp.smoketest
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
@ -42,3 +45,4 @@ Notes:
|
|||
day this ends). Since the native library at development time binds to a
|
||||
specific version, if you try to run with a different python, you will get
|
||||
an error about the "native" module not being found.
|
||||
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
# New Project Template
|
||||
|
||||
This repository contains a template that can be used to seed a repository for a
|
||||
new Google open source project.
|
||||
|
||||
See [go/releasing](http://go/releasing) (available externally at
|
||||
https://opensource.google/docs/releasing/) for more information about
|
||||
releasing a new Google open source project.
|
||||
|
||||
This template uses the Apache license, as is Google's default. See the
|
||||
documentation for instructions on using alternate license.
|
||||
|
||||
## How to use this template
|
||||
|
||||
1. Check it out from GitHub.
|
||||
* There is no reason to fork it.
|
||||
1. Create a new local repository and copy the files from this repo into it.
|
||||
1. Modify README.md and docs/contributing.md to represent your project, not the
|
||||
template project.
|
||||
1. Develop your new project!
|
||||
|
||||
``` shell
|
||||
git clone https://github.com/google/new-project
|
||||
mkdir my-new-thing
|
||||
cd my-new-thing
|
||||
git init
|
||||
cp -r ../new-project/* .
|
||||
git add *
|
||||
git commit -a -m 'Boilerplate for new Google open source project'
|
||||
```
|
||||
|
||||
## Source Code Headers
|
||||
|
||||
Every file containing source code must include copyright and license
|
||||
information. This includes any JS/CSS files that you might be serving out to
|
||||
browsers. (This is to help well-intentioned people avoid accidental copying that
|
||||
doesn't comply with the license.)
|
||||
|
||||
Apache header:
|
||||
|
||||
Copyright 2020 Google LLC
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
Loading…
Reference in New Issue