Commit Graph

9 Commits (d0f15d2cec40fa2338f6b87aea50d69329232d92)

Author SHA1 Message Date
Stella Laurenzo 5aa2f0f9f6 Add a trivial copy elision canonicalization on ndarray->tensor.
* This elides the very common code the compiler adds for chaining otherwise tensor-related numpy ops together.
* More aggressive canonicalizations would require more advanced analysis.
2020-07-05 18:09:43 -07:00
Stella Laurenzo 504e3c4946 Fixup local ndarray<->tensor transforms to preserve shape.
* Preserving shape across the copy ops makes more thing shaped by default.
* Inference of ndarray types will now preserve the shape when specializing the dtype.
2020-07-05 17:45:45 -07:00
Stella Laurenzo fae15ec5e7 Allow the ndarray type to carry a shape. 2020-07-05 17:34:03 -07:00
Stella Laurenzo dc271dfb87 Complete the basic spike to perform dtype inference.
* Correctly infers the unknown dtypes that emit as part of compilation for the simple ufunc case.
* Significant more testing needs to be done on the details now that the pass is minimally functional.
* The actual pass itself is still too hacky/not general, but the underlying analysis is further along.
2020-07-05 16:09:16 -07:00
Stella Laurenzo f66f4d7ef8 Update for renamed pass. 2020-07-04 17:43:04 -07:00
Stella Laurenzo 34861b18f4 Add NdArray type inference conversion. 2020-07-03 16:38:10 -07:00
Stella Laurenzo 2d4b0843c1 Fix evaluation message reporting and add checks to tests. 2020-06-29 17:48:17 -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