Commit Graph

17 Commits (85b724e70cf925b5b9f69f869de530436428e138)

Author SHA1 Message Date
Stella Laurenzo 85b724e70c Adds ODS and import support for binary_expr and binary_compare ops.
* Currently only supports non-short-circuit comparisons.
2020-06-08 13:46:06 -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 af4466197e Add lit test suite for python compiler.
* Adds a test for simple constants and fixes issues.
2020-06-07 14:29:39 -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 680e11ae62 Rename basicpy_None_type to basicpy_NoneType to match native spelling.
* Also adds Basicpy.py to tests.
2020-05-06 19:07:50 -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