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

[Feature]: faster meta-tensor API for TensorDict #272

Merged
merged 10 commits into from
Jul 14, 2022
Merged

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Jul 14, 2022

Description

Refactors the MetaTensor instantiation in TensorDict to avoid duplicated creations when one TensorDict is used to create another one, and to create MetaTensors only when they are needed.

Motivation and Context

This change brings a 30% speedup in the creation of a TensorDict.

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)
  • Example (update in the folder of examples)

@facebook-github-bot facebook-github-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 Jul 14, 2022
@vmoens vmoens added the enhancement New feature or request label Jul 14, 2022
@vmoens vmoens merged commit e5bea04 into main Jul 14, 2022
@vmoens vmoens deleted the metatensor_improvement branch August 29, 2022 23:16
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. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants