Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce Concat op overhead #255

Merged
merged 2 commits into from
Jun 29, 2024
Merged

Reduce Concat op overhead #255

merged 2 commits into from
Jun 29, 2024

Conversation

robertknight
Copy link
Owner

This PR contains a few small optimizations to reduce the overhead of Concat, ie. the work other than actually copying the data.

 - Make `Tensor::append` take view by reference, to avoid unnecessary
   view clone
 - Optimize `concatenated_shape` helper
Avoid creating `inner_iter` iterators for tensors with 4 or fewer dimensions.
@robertknight robertknight merged commit bc41b1b into main Jun 29, 2024
2 checks passed
@robertknight robertknight deleted the concat-opt branch June 29, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant