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
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
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
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
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
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
db0b0ef1b2
Switch sample tracer to emit builtin_ufunc globals instead of the impl versions.
2020-05-08 14:35:13 -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
Stella Laurenzo
6b7c913e0b
Add DialectHelper for Basicpy dialect.
...
* Involved native code for the types and slot_object_get ops.
2020-05-06 18:26:03 -07:00
Stella Laurenzo
4ebf972503
Merge ir.Ops and ir.Types into ir.DialectHelper.
...
This will aid in managing hierarchies of custom dialect helpers.
2020-05-06 18:26:03 -07:00
Stella Laurenzo
a5f755d406
Implement __array_func__ hook and use it to trace np.dot.
...
* Creates an abstraction/registry around emitters (intended to generalize to AST compilation as well).
* Reworks ufuncs to use the same mechanism as array funcs.
* Adds the numpy.dot op.
2020-05-04 15:47:01 -07:00
Stella Laurenzo
c89a35f97f
Rework the poc tracer to be structured how intended.
2020-05-02 19:52:21 -07:00
Stella Laurenzo
0805013716
Rename ufunc_call op builder for consistency.
2020-05-01 19:06:10 -07:00
Stella Laurenzo
78a8e6ec9e
Add enough python bindings to build functions and ufunc calls.
2020-05-01 18:44:06 -07:00
Stella Laurenzo
ba0c96b51a
Add python side Numpy dialect wrapper.
2020-05-01 10:38:52 -07:00