horde-ad
horde-ad copied to clipboard
Future work: vectorize using rugged tensors (irregular arrays) and/or Blelloch's flattening
Once vectorization on strictly regular array expressions works (these are expressions that result in regular arrays even after vectorization), generalize it to irregular arrays. Optionally, at the end, check regularity of the result and cast it back as regular arrays (which is close to what Futhark does, sometimes incurring a proof obligation). Alternatively, flatten the irregular tensors early or late and so get regular tensors of lower dimensions (but try not to flatten everything down to vectors, or somehow add a portion of the dimensions back, if possible).
This is needed to expand the language we are able to support (more of the shape-influcencing Int
s can be dynamic expressions), Currently, due to emergent irregularity, we need to reject some expressions even in the restricted language (or just not vectorize them, e.g., building tensors of delta expressions instead).