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
HLO treats all values as tensors which is suboptimal for things like loop iterators and conditions controlling program flow. Not only is it additional overhead (allocations/metadata storage/etc) but also introduces host/device round trips when the values are used for host functionality (control flow, array indexing, etc). We should be able to aggressively convert HLO ops on scalar tensors into standard ops on primitives in a lot of these cases, even without any sophisticated analysis for tracking usage. The goal is to try to reduce the total number of readbacks (flow.tensor.load) and keep as much simple computation as possible on the host by avoiding tensors.
I think it really depends on whether we have a tf.while - if we do, we'll need it (so that we aren't computing a loop iterator increment asynchronously). Will update this issue with IR when we have it!
Looks like mobilebert is entirely unrolled (lame!) - so we don't need it for that - but any model we aren't trying to also run in tflite really should not be unrolled and then we'll need it. Would be really good to get done in q4 so we stop having to worry about it, but not blocking.
Activity
silvasean commentedon Oct 1, 2020
Please ping me when this shows up on the profile. I have the design sketched out in some detail, and am happy to implement it.
benvanik commentedon Oct 1, 2020
I think it really depends on whether we have a tf.while - if we do, we'll need it (so that we aren't computing a loop iterator increment asynchronously). Will update this issue with IR when we have it!
benvanik commentedon Oct 2, 2020
Looks like mobilebert is entirely unrolled (lame!) - so we don't need it for that - but any model we aren't trying to also run in tflite really should not be unrolled and then we'll need it. Would be really good to get done in q4 so we stop having to worry about it, but not blocking.
benvanik commentedon Nov 22, 2020
Duping with #1159.