Stella Laurenzo
2d4b0843c1
Fix evaluation message reporting and add checks to tests.
2020-06-29 17:48:17 -07:00
Stella Laurenzo
d5e3902b6d
Fix broken link
2020-06-29 16:49:23 -07:00
Stella Laurenzo
e5ac477862
Add docs on ufuncs.
2020-06-29 16:44:33 -07:00
Stella Laurenzo
272f13fc31
Update docs with notes on the numpy extension.
2020-06-29 16:37:29 -07:00
Stella Laurenzo
046751254f
Refactor old tracing tests and remove deprecated ops.
...
* Old doctests to run under lit.
* Old custom filecheck tests -> pytest directory (under lit).
* Rename some old ufunc ops in the tracer.
2020-06-29 16:19:03 -07:00
Stella Laurenzo
7ca292ade5
Add partial evaluator for explicit numpy ufuncs.
...
* This enables emission of "numpy.add(a, b)" and several dozen others.
* Will deprecate original ufunc infra in a follow-on.
2020-06-29 15:27:39 -07:00
Stella Laurenzo
1024c508f8
Move numpy compiler support to new directory.
2020-06-29 13:02:34 -07:00
Stella Laurenzo
a4f3ce1ed3
Add value coding for ndarray.
...
* This lets us import arrays from the outer environment, which is the first step to actually handling numpy ops.
2020-06-28 18:42:08 -07:00
Stella Laurenzo
f6721c173d
Add create_array_from_tensor and copy_to_tensor ops.
2020-06-28 17:58:26 -07:00
Stella Laurenzo
b2708e4687
Add test case for !numpy.ndarray.
2020-06-28 17:41:21 -07:00
Stella Laurenzo
efe8915901
Add NdArrayType.
2020-06-28 17:37:20 -07:00
Stella Laurenzo
bccfd5f6fc
Refactor environment.py into components.
...
* Creates a new top level Configuration class
* Adds a module for creating test configs, getting some hard coding out of core classes
2020-06-28 16:52:25 -07:00
Stella Laurenzo
d6b428fb60
Merge pull request #4 from google/stella_dev
...
Add "template function" ops and importer code.
2020-06-26 18:38:46 -07:00
Stella Laurenzo
7bd5733d38
Add "template function" ops and importer code.
...
* This starts to lay down the infra for reasoning about calls
* Adds the importer code to generate IR for function calls of compiler recognized static functions.
2020-06-26 18:36:36 -07:00
Stella Laurenzo
26fd2a576e
Update docs for 'macro' -> 'partial evaluation'.
2020-06-26 13:53:40 -07:00
Stella Laurenzo
e45287d83e
Rename 'macro' nomenclature to 'partial eval'.
2020-06-26 13:50:51 -07:00
Stella Laurenzo
dd6a4e638b
Add macro facility and use it to enable module and namedtuple attribute resolution.
2020-06-25 23:11:32 -07:00
Stella Laurenzo
25a580b8d3
Add section on name resolution and update broken links.
2020-06-22 23:25:30 -07:00
Stella Laurenzo
5e54bcfc8c
Change test to explicit module level constant.
2020-06-22 18:46:40 -07:00
Stella Laurenzo
e5958d820f
Add constant resolution from globals and builtins.
2020-06-22 18:42:32 -07:00
Stella Laurenzo
f791909a25
Factor name resolution and constant creation to a new environment facility.
2020-06-22 18:15:56 -07:00
Stella Laurenzo
2242f48228
Fix broken link
2020-06-20 12:01:49 -07:00
Stella Laurenzo
12d8459d73
Rework README, add docs, and move some scripts to better locations accordingly.
2020-06-20 11:56:13 -07:00
Stella Laurenzo
b3ecd57b29
Add a sample test that exercises short circuit control flow.
2020-06-19 17:25:18 -07:00
Stella Laurenzo
b811db4b76
Wrap the IREE compiler flow in a one stop API.
2020-06-19 17:17:22 -07:00
Stella Laurenzo
dc87e09b5a
Enable simple_invoke with upstream fix for scalar arguments.
2020-06-19 16:32:15 -07:00
Stella Laurenzo
fc5f10c5c5
Bump revision and fix issues.
...
* llvm revision = 4836188ad9b3334b0c1e055d45ccaa54ed797e4b
* iree revision = 091482e8fdf599d6cb5c701d5b3ccb27fc66c014
2020-06-19 10:38:51 -07:00
Stella Laurenzo
529873d13c
Wire up IREE compilation and runtime in a new backend test.
...
* Adds python bindings for invoking flow, HAL, and VM lowering pipelines.
* Adds pythong bindings for translating to VM module flatbuffer.
* Adds a new backend_test/iree directory and configure lit to find the IREE python rt bindings.
* Open code a simple_invoke.py that exercises the whole pipeline (need real APIs for a lot of this).
* Fails when invoking the function because I never implemented argument marshaling for scalars :(
* Plenty of stuff to do tomorrow.
2020-06-19 00:30:34 -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
b21b5322f6
Basicpy conversion to IREE+std skeleton and first conversions.
...
* Conversions to std for numeric binary expressions, numeric to_boolean, and numeric comparisons.
* Added folders to constant ops to comply with requirements of the pass system.
* Extended the frontend with parameter/result annotation processing for primitives (can specify types for function arguments).
* Added (empty) directory/sources for IREEVM conversions. These are only enabled if IREE is enabled.
2020-06-13 23:45:43 -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
c3d4436397
Introduce a Target class and use it to define generic 32 and 64bit variants.
2020-06-13 14:43:10 -07:00
Stella Laurenzo
2bc7a77f98
Add conditional registration of IREE passes.
2020-06-11 17:57:10 -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
a29ef9adc8
Add initial support for taking a dep on IREE.
...
* This won't work for most people until some upstream changes percolate.
* Sequestered it behind a flag and a special configure script (cmake_configure_iree.sh) for now.
2020-06-11 16:40:31 -07:00
Stella Laurenzo
308a54c3d0
Bump llvm-project to 52cae05e087b3d4fd02849fc37c387c720055ffb (2020/6/10).
...
* Fixes compile errors from upstream.
* XFAIL several tests that are now failing to legalize (will hand off to Sean).
2020-06-11 16:10:05 -07:00
Stella Laurenzo
750541e9a9
Extend type inference so that it works across conditional boundaries.
...
* The implementation is still limited but gives something to build on.
2020-06-10 21:33:17 -07:00
Stella Laurenzo
c84ce17573
Add test showing argument type inference.
2020-06-10 19:23:01 -07:00
Stella Laurenzo
917fd94f94
Add limited support for function arguments.
2020-06-10 19:17:29 -07:00
Stella Laurenzo
e3fd22a035
Add a (very) basic type inference pass for basicpy.
...
For simple programs, this gets us enough typing to lower to real backends.
2020-06-10 19:04:05 -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
6728503fcf
Remove unused assignment
2020-06-09 18:35:21 -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
2bb4cdf4e7
Split frontent.py into importer.py.
2020-06-09 17:16:36 -07:00
Stella Laurenzo
22cbe044c2
Add IfExp emission.
2020-06-09 17:10:52 -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
b0a80e04f1
Make binary_expr and binary_compare have similar asm syntax.
2020-06-08 18:29:14 -07:00
Stella Laurenzo
44f7e22f4d
Remove 2-arg compare special case and use common utility to do sub evaluation.
2020-06-08 17:54:14 -07:00