torchrec
torchrec copied to clipboard
prevent d2h sync from keyed jagged index select when possible
Summary: the d2h sync in keyed_jagged_index_select_dim1 can be prevented if we provide the output tensor size ahead of time. when we know the recat tensor is same size as the segment size tensor then we know the output size will have to be the same as the original tensor size.
Differential Revision: D53970276
This pull request was exported from Phabricator. Differential Revision: D53970276
This pull request was exported from Phabricator. Differential Revision: D53970276
This pull request was exported from Phabricator. Differential Revision: D53970276