Skip to content

Conversation

jd7-tr
Copy link
Contributor

@jd7-tr jd7-tr commented Sep 5, 2025

Summary:
Optimized JaggedTensor to dense conversion that provides better performance than to_padded_dense():

Performance optimizations:

  1. Length=1 sequences: Zero DtoH transfers (simple reshape)
  2. Uniform lengths: Eliminates max_length computation DtoH transfer
  3. Variable lengths: Uses to_padded_dense() directly without reconstruction overhead

Differential Revision: D81793451

…rformance

Summary:
Optimized JaggedTensor to dense conversion that provides better performance than to_padded_dense():

Performance optimizations:
1. Length=1 sequences: Zero DtoH transfers (simple reshape)
2. Uniform lengths: Eliminates max_length computation DtoH transfer
3. Variable lengths: Uses to_padded_dense() directly without reconstruction overhead

Differential Revision: D81793451
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 5, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D81793451

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants