Stella Laurenzo
fae15ec5e7
Allow the ndarray type to carry a shape.
2020-07-05 17:34:03 -07:00
Stella Laurenzo
00c791f925
Make common utilities for converting TypeNode <-> IR types.
...
* Generalizes the conversions from ObjectValueType <-> tensor and ndarray.
* Creates a utility to construct the default type map hook.
2020-07-04 20:33:13 -07:00
Stella Laurenzo
97c92aa264
Remove the existing attached values/ops from CPA types.
...
This was ad-hoc and needs to be replaced by a more principled track back to the IR.
2020-07-04 17:47:19 -07:00
Stella Laurenzo
6a50efd046
Extend the CPA type inference to work on numpy types/ops.
...
* Adds an op interface for adding CPA constraints.
* Adds a type conversion hook for handling built-in types (that we can't have adopt our interface).
* Converts tensor<> to object(!Tensor, [e:<type>]) just like NdArray.
* Implement a few numpy ops far enough to do dtype inference for simple sequences.
2020-07-03 18:16:34 -07:00
Stella Laurenzo
34861b18f4
Add NdArray type inference conversion.
2020-07-03 16:38:10 -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
efe8915901
Add NdArrayType.
2020-06-28 17:37:20 -07:00
Stella Laurenzo
432e01fe8f
Move Basicpy and Numpy dialect IR to IR/ folder.
2020-06-09 19:22:24 -07:00
Sean Silva
cd7258dbd4
Enable warnings by default.
...
The secret here is LLVM_ENABLE_WARNINGS=ON.
I also fixed a couple warnings, which gets us to be warning-clean.
I noticed also that npcomp-run-mlir/basic.mlir seems to be failing.
Maybe something since the latest integrate. My next commit (introduce
npcomp mini runtime) will largely rewrite it though, so it'll get fixed
then.
2020-06-03 20:39:34 -07:00
Stella Laurenzo
950ba12426
Bump llvm-project to 3af85fa8f06220b43f03f26de216a67be4568fe7.
2020-05-08 20:42:40 -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
d3632af675
Add !numpy.any_dtype dialect type.
2020-04-29 18:20:42 -07:00
Stella Laurenzo
c4a192d5c9
Rename from npcomp::NUMPY to NPCOMP::numpy to follow IREE convention.
2020-04-29 17:10:10 -07:00
Stella Laurenzo
e845db8a20
Add builtin_ufunc and generic_ufunc ops.
2020-04-28 23:51:54 -07:00
Stella Laurenzo
953ef89a30
Add npcomp-opt and lit runner.
2020-04-26 17:55:15 -07:00
Stella Laurenzo
d3b6e1767a
Add stub numpy dialect.
2020-04-26 17:20:58 -07:00