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

Optimizes getters of data inside asset classes #2118

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

Mayankm96
Copy link
Contributor

@Mayankm96 Mayankm96 commented Mar 19, 2025

Description

Previously the root positions was obtained by performing the following steps:

  1. Call PhysX getters to get transforms and velocities
  2. Concatenating the two to make a single state tensor
  3. Indexing this tensor to get the position

For applications where we only want the positions, the above is an expensive operation as we call CUDA-MemCpy twice and then do concatenation which adds overhead.

This MR simplifies the above process by having separate lazy buffers for poses, velocities and states.

Fixes # (issue)

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

Please attach before and after screenshots of the change if applicable.

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Verified

This commit was signed with the committer’s verified signature.
targos Michaël Zasso

Verified

This commit was signed with the committer’s verified signature.
marco-ippolito Marco Ippolito

Verified

This commit was signed with the committer’s verified signature.
marco-ippolito Marco Ippolito

Verified

This commit was signed with the committer’s verified signature.
tpoisseau tpoisseau
@Mayankm96 Mayankm96 marked this pull request as ready for review March 20, 2025 04:48
Copy link
Collaborator

@jtigue-bdai jtigue-bdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its a good separation for the pose vs velocity buffers. The added lazy buffer layer in the update call is also a nice addition. Tests all pass (at least the ones I think are dependant) so I think its in good shape. Can you add the performance graphs to the PR description for reference when we look back?

@Mayankm96
Copy link
Contributor Author

Will share my logs here tomorrow. It's on a different PC. Might have made sense to run OSMO benchmarking but that seems like quite a bit of an effort.

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.

None yet

3 participants