You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
save a little size on "Reapply #11294 and #11295 (improve GLU test and implement using internal views to avoid copying)"
These were reverted due to internal test failures. Sending this as an exported internal diff so that we can make sure we get internal signal.
Original summary for #11294 (to make the GLU test input asymmetric):
This way it will produce different results along each tested dim.
Original summaryfor #11295:
GLU requires slicing the input Tensor into two halves. Currently, we
accomplish this by copying; ExecuTorch does not support views in general
because it requires Tensors to be contiguous. However, nothing stops us
from implementing [the ATen that uses
views](https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/native/GatedLinearUnit.cpp#L35)
entirely internally to the op.
To support this, I added `support_noncontiguous_tensors` as an optional
template argument to BroadcastIndexesRange and plumbed it through to the
elementwise_util functions as an optional SupportNonContiguousTensors
parameter.
Differential Revision: [D76311585](https://our.internmc.facebook.com/intern/diff/D76311585/)
[ghstack-poisoned]
0 commit comments