Stella Laurenzo
aeb422b030
Some fixes to get npcomp building and passing on windows.
...
There is more that can be done here, but this gets it minimally working.
2020-07-01 21:28:04 -07:00
Stella Laurenzo
373878f31f
Add _npcomp.backend.iree module.
...
* Populates with builders for the various path pipelines and translator.
2020-06-18 23:28:30 -07:00
Stella Laurenzo
213041449f
Move most python sources to the include and lib tree.
2020-06-18 18:02:39 -07:00
Stella Laurenzo
2ba8296151
Add script tools/format_source.sh and run it on all python and c++ sources.
2020-06-13 14:53:54 -07:00
Stella Laurenzo
19196f23e1
Make a real library for InitAll and extend it to conditionally initialize dependencies.
...
* Conditioned on the top level CMake option to enable IREE.
* There is still some warning flags and such that need triage, but it does build/work.
2020-06-11 17:47:14 -07:00
Stella Laurenzo
3e58d8fe37
Add skeleton of type inference pass.
2020-06-10 14:48:22 -07:00
Stella Laurenzo
432e01fe8f
Move Basicpy and Numpy dialect IR to IR/ folder.
2020-06-09 19:22:24 -07:00
Stella Laurenzo
340f109742
Add implicit return and expression statements where the value id discarded.
2020-06-09 18:34:07 -07:00
Stella Laurenzo
e18e8e0a96
Add boolean/logical operations (and, or, not).
...
* Adds a new to_boolean op to evaluate a value as a truthy i1
* Uses cascading scf.if ops to properly evaluate and/or sequences (short-circuit and original value returning)
* Adds a helper to construct select ops and uses it to implement 'not'
2020-06-09 00:01:21 -07:00
Stella Laurenzo
1ef3614682
Add support for short-circuit comparisons with scf.if.
2020-06-08 17:52:07 -07:00
Stella Laurenzo
a32219c3bb
Refactor things so that an SCF mixin dialect helper can be used.
...
* Makes the OpBuilder an input to the DialectHelper.
* The containment hierarchy can be simplified further.
* There are still only a few places this is instantiated, so opting for working over great.
2020-06-08 16:10:51 -07:00
Stella Laurenzo
72499e0319
Add bytes constants.
2020-06-07 16:00:29 -07:00
Stella Laurenzo
f3829b1d4f
Add string constants.
2020-06-07 15:46:28 -07:00
Stella Laurenzo
869228e316
Add bool constants.
2020-06-07 15:15:19 -07:00
Stella Laurenzo
28048337ae
Fix issue with float_attr.
2020-06-06 22:01:38 -07:00
Stella Laurenzo
0cc0a7165e
Add basic AST -> basicpy dialect function extraction.
...
* Extends the bindings to support locations.
* Various other things necessary to extract a function with simple numeric expressions.
2020-06-06 21:24:28 -07:00
Stella Laurenzo
60f132b26f
Add pass registrations and a simple compilation example from python.
...
* Got side-tracked hunting down a vague-linkage RTTI issue due to not anchoring key methods in PassOptions.h to a module.
* Took the path of least resistance and just added the option to build LLVM with RTTI. I know how to fix this but would like to do some broader upstream fixes versus just hunting/pecking/working around in this project.
2020-06-03 23:58:58 -07:00
Stella Laurenzo
fddf41ca92
Add python binding for running passes.
2020-06-03 01:29:59 -07:00
Sean Silva
1fed1cb016
Update llvm-project to 753a21928413f8a7e76978cb1354e09150e114e0
2020-05-21 13:09:06 -07:00
Stella Laurenzo
f2985e0901
Add implicit constant capture.
...
We want more sophisticated capture later, but this allows basics to function.
2020-05-08 17:55:02 -07:00
Stella Laurenzo
8ae71a9551
Add MLIRContext.dense_elements_attr to create an attribute from a python buffer/array.
2020-05-08 17:36:07 -07:00
Stella Laurenzo
a91b0bfbe1
Add numpy.get_slice op and wire it up to the tracer.
2020-05-08 16:04:58 -07:00
Stella Laurenzo
3611958b11
Move python native library to python_native/_npcomp...so.
...
This allows binary and source packages to exist at different physical paths.
2020-05-06 22:44:12 -07:00