facebookresearch / TensorComprehensions

A domain specific language to express machine learning workloads.
https://facebookresearch.github.io/TensorComprehensions/
Apache License 2.0
1.76k stars 211 forks source link

Scattering #9

Open abadams opened 6 years ago

abadams commented 6 years ago

We currently support computed expressions in the indices on the RHS. We should plumb through computed expressions on the LHS too, e.g:

hist(im(i)) +=! 1

abadams commented 6 years ago

Note that this would also enable the following formulation of a concat:

out(0, i) = a(i) out(1, i) = b(i)

abadams commented 6 years ago

Currently blocked by the many places that assume the bounds on tensors are affine. Scattering makes them at least piecewise affine, which we could probably handle, but in general makes them non-affine. Not sure how best to relax this. Anywhere in the current code that calls makeIslAffFromExpr is a problem.