Thanks for pushing on the execution side of the discussion . I think option #1 would be a great improvement! Aligning vector and tensor terminology on what they overlap sounds like the right thing to do and both the simplification of vector.shape_cast
and the canonicalizations proposed sounds great to me. IIUC, with option #1 we would end up with vector.collapse_shape
, vector.expand_shape
and vector.shape_cast
, where the latter would only handle cases where both the source and the destination shapes have the same rank?
Not a big deal, IMO. We should add a canonicalization pattern to make sure we preserve the collapse + expand op order (if that’s the order we want).
I would suggest that you evaluate the impact and amount of work needed for this change and perhaps share an implementation plan so that we can provide feedback. My experience is that this changes may involve far more work and pain that anticipated (see my attempt to remove vector.extract_element
/vector.insert_element
here, I’ve been stuck in step #2 for a few months already) as there might be quite a few patterns that need to be migrated.