Skip to content

Conversation

@rmccorm4
Copy link
Contributor

@rmccorm4 rmccorm4 commented Jun 9, 2025

Overview:

Default to pytorch backend in TRTLLM worker if left unspecified.

  • Pytorch backend is currently the only supported path for Deepseek R1
  • Pytorch backend seems like best supported path for use of trtllm-llmapi-launch currently
  • Only pytorch backend supports kv events/metrics currently

Power users can override backend field in extra engine args YAML if needed.

Summary by CodeRabbit

  • New Features
    • Explicitly sets the backend to "pytorch" for the TensorRT-LLM engine configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 9, 2025

Walkthrough

A new key-value pair, "backend": "pytorch", is added to the arg_map dictionary in the init asynchronous function within the TensorRT-LLM subprocess module. This update ensures that the backend is explicitly set to "pytorch" during the initial configuration of engine arguments.

Changes

File(s) Change Summary
launch/dynamo-run/src/subprocess/trtllm_inc.py Added "backend": "pytorch" to arg_map in init function

Poem

In the land of code where engines ignite,
A backend named PyTorch steps into the light.
With a tweak to the map, the journey's begun,
Now every subprocess knows which backend to run.
🐇✨


🪧 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 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
launch/dynamo-run/src/subprocess/trtllm_inc.py (1)

355-355: LGTM! Backend default aligns with PyTorch-first strategy.

The change successfully defaults to PyTorch backend as intended, supporting the DS R1 requirements and kv events/metrics functionality. Users can still override via extra engine args if needed.

Note: This change makes the condition "backend" not in arg_map at line 378 effectively dead code since backend is now always present. Consider documenting this as a breaking change if users were relying on different default backend behavior.

Consider simplifying the validation logic at lines 378-384 since backend is now always set:

 # Only pytorch backend is supported for now to publish events and metrics.
-if "backend" not in arg_map:
-    arg_map["backend"] = "pytorch"
-elif arg_map["backend"] != "pytorch":
+if arg_map["backend"] != "pytorch":
     logging.error(
         "Only pytorch backend is supported for now to publish events and metrics."
     )
     sys.exit(1)
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a673145 and 20131ef.

📒 Files selected for processing (1)
  • launch/dynamo-run/src/subprocess/trtllm_inc.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Build and Test - vllm
  • GitHub Check: pre-merge-rust (lib/bindings/python)
  • GitHub Check: pre-merge-rust (.)
  • GitHub Check: pre-merge-rust (lib/runtime/examples)

@rmccorm4 rmccorm4 enabled auto-merge (squash) June 9, 2025 22:17
@rmccorm4 rmccorm4 merged commit d83633b into main Jun 10, 2025
17 checks passed
@rmccorm4 rmccorm4 deleted the rmccormick/trtllm/default_pytorch branch June 10, 2025 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants