Skip to content

Conversation

@grahamking
Copy link
Contributor

@grahamking grahamking commented May 30, 2025

Make cargo build target CUDA. Update docs to show how to do non-CUDA builds: CPU-only, Metal, etc.

Let's find out if this works in CI.

Summary by CodeRabbit

  • Documentation

    • Updated documentation to clarify default engines and build instructions for various platforms and model formats.
    • Added details about default engines for safetensors and GGUF models.
  • Chores

    • Adjusted default build features to include CUDA support by default.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 30, 2025

Walkthrough

The documentation for the dynamo run command and its build instructions was updated to clarify default engine and feature behavior, particularly regarding CUDA support. The dynamo-run package's default features in its Cargo manifest were modified to include cuda by default, aligning the documentation and build configuration.

Changes

File(s) Change Summary
docs/guides/dynamo_run.md Updated documentation to clarify default engines for model formats, revise build instructions, and explain CUDA default.
launch/dynamo-run/Cargo.toml Modified default features to include cuda alongside mistralrs and llamacpp.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Docs
    participant Cargo
    User->>Docs: Reads build instructions
    Docs->>User: Describes default engines and build features (CUDA, mistralrs, llamacpp)
    User->>Cargo: Runs cargo build (default)
    Cargo->>User: Builds with cuda, mistralrs, llamacpp features enabled
Loading

Possibly related PRs

Poem

In the warren where code runs free,
CUDA joins the build, as clear as can be.
Mistralrs and llamacpp hop along too,
With docs refreshed for every crew.
Now every bunny can plainly see—
The engines and features, in harmony!
🐇✨


🪧 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 (3)
docs/guides/dynamo_run.md (3)

38-38: Fix grammar: use past participle “built” and add missing period for “etc.”

- `dynamo-run` is build for CUDA by default. For other builds (CPU, Metal, etc) see the [Setup section](#setup).
+ `dynamo-run` is built for CUDA by default. For other builds (CPU, Metal, etc.) see the [Setup section](#setup).
🧰 Tools
🪛 LanguageTool

[grammar] ~38-~38: Make sure that the noun ‘build’ is correct. Did you mean the past participle “built”?
Context: ... syntax as RUST_LOG. dynamo-run is build for CUDA by default. For other builds (...

(BE_VB_OR_NN)


[style] ~38-~38: In American English, abbreviations like “etc.” require a period.
Context: ... default. For other builds (CPU, Metal, etc) see the Setup section. ## Q...

(ETC_PERIOD)


46-46: Unify engine naming for consistency.
The text uses mistral.rs and llama.cpp, but elsewhere engine names are mistralrs and llamacpp. For consistency across documentation, consider aligning these identifiers.


259-283: Add language identifiers to fenced code blocks and standardize list markers.
To satisfy markdownlint checks (MD040 & MD004), consider:

  • Replacing dashes - with asterisks * for list items.
  • Adding a language label (e.g., bash or shell) to all fenced code blocks, for example:
- ```
+ ```bash
  cargo build
- ```
+ ```
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

259-259: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


260-260: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


266-266: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


270-270: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


271-271: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


275-275: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


276-276: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


280-280: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


281-281: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9210a26 and d2198b1.

📒 Files selected for processing (2)
  • docs/guides/dynamo_run.md (3 hunks)
  • launch/dynamo-run/Cargo.toml (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/guides/dynamo_run.md

[grammar] ~38-~38: Make sure that the noun ‘build’ is correct. Did you mean the past participle “built”?
Context: ... syntax as RUST_LOG. dynamo-run is build for CUDA by default. For other builds (...

(BE_VB_OR_NN)


[style] ~38-~38: In American English, abbreviations like “etc.” require a period.
Context: ... default. For other builds (CPU, Metal, etc) see the Setup section. ## Q...

(ETC_PERIOD)

🪛 markdownlint-cli2 (0.17.2)
docs/guides/dynamo_run.md

259-259: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


260-260: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


266-266: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


270-270: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


271-271: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


275-275: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


276-276: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


280-280: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


281-281: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Build and Test - vllm
  • GitHub Check: pre-merge-rust (lib/runtime/examples)
  • GitHub Check: pre-merge-rust (.)
  • GitHub Check: pre-merge-rust (lib/bindings/python)
🔇 Additional comments (4)
launch/dynamo-run/Cargo.toml (3)

17-17: Default features updated to include CUDA.
Enabling cuda in the default features matches the PR goal of default GPU support for dynamo-run.


17-17: Confirm CI readiness for default CUDA build.
By adding cuda to the default feature set, cargo build will now attempt to compile CUDA code out-of-the-box. Please verify that CI environments and developer machines have the necessary CUDA toolkit and environment variables (e.g., CUDA_HOME) installed, or update CI configurations/documentation accordingly to avoid build failures.


18-19: Validate dep: prefix usage in feature definitions.
The features mistralrs and llamacpp reference dependencies using a dep: prefix which is non-standard in Cargo. Ensure this syntax is supported by your workspace tooling, or consider switching to the canonical form:

-mistralrs = ["dep:dynamo-engine-mistralrs"]
+mistralrs = ["dynamo-engine-mistralrs"]
-llamacpp = ["dep:dynamo-engine-llamacpp"]
+llamacpp = ["dynamo-engine-llamacpp"]
docs/guides/dynamo_run.md (1)

27-27: Update supported engines list.
The documentation now correctly lists the supported engines including sglang and tensorrt-llm.

@grahamking
Copy link
Contributor Author

See #1217 for next steps. The docker base image needs to be include the CUDA toolkit.


Set the environment variable `DYN_LOG` to adjust the logging level; for example, `export DYN_LOG=debug`. It has the same syntax as `RUST_LOG`.

`dynamo-run` is build for CUDA by default. For other builds (CPU, Metal, etc) see the [Setup section](#setup).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`dynamo-run` is build for CUDA by default. For other builds (CPU, Metal, etc) see the [Setup section](#setup).
`dynamo-run` is built with CUDA support by default. For other builds (CPU, Metal, etc) see the [Setup section](#setup).

Copy link
Contributor

Choose a reason for hiding this comment

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

question: the build will support CPU as well as CUDA - right? maybe dynamo is built with CPU and GPU support by default ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently we have to decide that at build time. We could (probably should) release two versions, one for CPU and CUDA.

It would be valuable to investigate doing a multi-build that can support either, and detect at runtime. Need engineering time there though, so many other priorities.

which is equivalent to
```
cargo build --features cuda,mistralrs,llamacpp
Copy link
Contributor

Choose a reason for hiding this comment

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

awesome!

@github-actions
Copy link

github-actions bot commented Jul 3, 2025

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jul 3, 2025
@github-actions
Copy link

This PR has been closed due to inactivity. If you believe this PR is still relevant, please feel free to reopen it with additional context or information.

@github-actions github-actions bot closed this Jul 11, 2025
@github-actions github-actions bot deleted the gk-default-cuda branch July 11, 2025 09:36
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