Skip to content

Remove forward-loading of modules#427

Merged
shi-eric merged 1 commit into
newton-physics:mainfrom
shi-eric:ershi/cleanup-graph-capture
Jul 16, 2025
Merged

Remove forward-loading of modules#427
shi-eric merged 1 commit into
newton-physics:mainfrom
shi-eric:ershi/cleanup-graph-capture

Conversation

@shi-eric

@shi-eric shi-eric commented Jul 16, 2025

Copy link
Copy Markdown
Member

Description

Newton will no longer technically support CUDA drivers older than 545, so we can get rid of these workarounds.

Newton Migration Guide

Please ensure the migration guide for warp.sim users is up-to-date with the changes made in this MR.

  • The migration guide in docs/migration.rst is up-to date

Before your PR is "Ready for review"

  • All commits are signed-off to indicate that your contribution adheres to the Developer Certificate of Origin requirements
  • Necessary tests have been added and new examples are tested (see newton/tests/test_examples.py)
  • Documentation is up-to-date
  • Code passes formatting and linting checks with pre-commit run -a

Summary by CodeRabbit

  • Refactor

    • Simplified CUDA graph initialization in multiple simulation examples and tests by removing explicit module imports and manual module loading steps.
    • CUDA graph capture logic remains unchanged, now relying on implicit module handling for improved maintainability.
  • Chores

    • Cleaned up unused import statements across several example scripts and test files.

Newton will no longer technically  support CUDA drivers older than 545,
so we can get rid of these workarounds.

Signed-off-by: Eric Shi <ershi@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Explicit imports and manual module loading for CUDA graph compatibility have been removed from several example and test scripts. Code sections that previously set module options or loaded solver and kernel modules before CUDA graph capture have been deleted. The CUDA graph capture logic and simulation workflows remain unchanged, now relying on implicit or deferred module loading.

Changes

File(s) Change Summary
newton/examples/example_anymal_c_walk.py Removed explicit import and manual loading of newton.solvers.euler.kernels for CUDA graph support.
newton/examples/example_anymal_c_walk_on_sand.py Removed explicit imports and loading of newton.solvers.euler modules for CUDA graph support.
newton/examples/example_cloth_bending.py
newton/examples/example_cloth_hanging.py
newton/examples/example_cloth_self_contact.py
Removed explicit imports and manual loading of geometry and VBD solver modules for CUDA graph support.
newton/examples/example_cloth_style3d.py Removed explicit imports and manual loading of Style3D solver modules for CUDA graph support.
newton/examples/example_robot_manipulating_cloth.py Removed explicit imports and manual loading of geometry, articulation, Euler, and VBD solver modules.
newton/tests/test_cloth.py Removed explicit imports and conditional manual loading of solver modules in CUDA graph setup.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ExampleScript
    participant CUDA
    participant WarpModuleLoader

    User->>ExampleScript: Run simulation with CUDA graph capture enabled
    ExampleScript->>CUDA: Begin CUDA graph capture
    Note over ExampleScript,CUDA: (No explicit module loading)
    CUDA->>WarpModuleLoader: Implicitly load required modules as needed
    WarpModuleLoader-->>CUDA: Modules loaded on demand
    CUDA->>ExampleScript: Complete CUDA graph capture
    ExampleScript->>User: Proceed with simulation
Loading

📜 Recent review details

Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 69cb291 and b94d0ea.

📒 Files selected for processing (8)
  • newton/examples/example_anymal_c_walk.py (0 hunks)
  • newton/examples/example_anymal_c_walk_on_sand.py (0 hunks)
  • newton/examples/example_cloth_bending.py (0 hunks)
  • newton/examples/example_cloth_hanging.py (0 hunks)
  • newton/examples/example_cloth_self_contact.py (0 hunks)
  • newton/examples/example_cloth_style3d.py (0 hunks)
  • newton/examples/example_robot_manipulating_cloth.py (0 hunks)
  • newton/tests/test_cloth.py (0 hunks)
💤 Files with no reviewable changes (8)
  • newton/examples/example_cloth_bending.py
  • newton/examples/example_cloth_style3d.py
  • newton/examples/example_cloth_self_contact.py
  • newton/examples/example_anymal_c_walk.py
  • newton/examples/example_robot_manipulating_cloth.py
  • newton/examples/example_cloth_hanging.py
  • newton/examples/example_anymal_c_walk_on_sand.py
  • newton/tests/test_cloth.py
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@shi-eric shi-eric requested review from eric-heiden and jumyungc July 16, 2025 18:11

@eric-heiden eric-heiden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@shi-eric shi-eric enabled auto-merge (rebase) July 16, 2025 18:24
@shi-eric shi-eric merged commit 7017f31 into newton-physics:main Jul 16, 2025
10 checks passed
@shi-eric shi-eric deleted the ershi/cleanup-graph-capture branch July 16, 2025 18:55
@coderabbitai coderabbitai Bot mentioned this pull request Oct 4, 2025
4 tasks
vidurv-nvidia pushed a commit to vidurv-nvidia/newton that referenced this pull request Mar 6, 2026
# Description

Updated documentation for the teleop config changes. Includes
documentation for:
- Teleop device config inside the env config
- How to add new devices
- How to add new retargeters
- Updates to script params for handtracking

<!--
Thank you for your interest in sending a pull request. Please make sure
to check the contribution guidelines.

Link:
https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html
-->

Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context.
List any dependencies that are required for this change.

Fixes # (issue)

<!-- As a practice, it is recommended to open an issue to have
discussions on the proposed pull request.
This makes it easier for the community to keep track of what is being
developed or added, and if a given feature
is demanded by more than one party. -->

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- This change requires a documentation update

## Screenshots

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

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->

## Checklist

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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
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.

2 participants