-
Notifications
You must be signed in to change notification settings - Fork 703
fix: allow build on arm64 #4502
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Julien Debache <[email protected]>
|
👋 Hi hypdeb! Thank you for contributing to ai-dynamo/dynamo. Just a reminder: The 🚀 |
WalkthroughA configuration file modification that adds target-specific rustflags for Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.cargo/config.toml(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: dmitry-tokarev-nv
Repo: ai-dynamo/dynamo PR: 2300
File: pyproject.toml:64-66
Timestamp: 2025-08-05T22:51:59.230Z
Learning: The ai-dynamo/dynamo project does not ship ARM64 wheels, so platform markers to restrict dependencies to x86_64 are not needed in pyproject.toml dependencies.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build and Test - dynamo
🔇 Additional comments (1)
.cargo/config.toml (1)
4-9: Configuration approach is sound.Using target-specific rustflags under
[target.aarch64-unknown-linux-gnu]is the correct and idiomatic Cargo pattern for architecture-specific compilation flags. This avoids affecting x86_64 or other builds and keeps the fix narrowly scoped.
| [target.aarch64-unknown-linux-gnu] | ||
| rustflags = ["-C", "target-feature=+fp16"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify the correct rustflag for FP16 support on ARM64.
The PR description mentions the error requires "fullfp16", but the config uses target-feature=+fp16. Confirm that this flag is correct and sufficient to resolve the compilation error in gemm-common.
Additionally, consider whether other ARM64 target triples (e.g., aarch64-apple-darwin, aarch64-pc-windows-msvc) require the same configuration, or if this is specific to aarch64-unknown-linux-gnu.
🌐 Web query:
What is the correct Rust/Cargo rustflag to enable fullfp16 or fp16 CPU feature on aarch64?
💡 Result:
Use rustc's target-feature flag with the AArch64 feature name "fullfp16". Example:
- Environment / Cargo: RUSTFLAGS="-C target-feature=+fullfp16"
- .cargo/config.toml: [target.] rustflags = ["-C", "target-feature=+fullfp16"]
References: LLVM/Clang show the AArch64 feature name is fullfp16, and rustc accepts target-feature via -C. [1][2]
Sources:
[1] Clang/LLVM aarch64 tests showing "+fullfp16" feature name.
[2] rustc docs: use -C target-feature to enable/disable CPU features.
Correct the rustflag: use +fullfp16 instead of +fp16.
The correct Rust/Cargo rustflag to enable fullfp16 support on aarch64 is target-feature=+fullfp16. The PR currently uses target-feature=+fp16, which is incorrect and will not resolve the gemm-common compilation error.
Lines 8-9 should be:
[target.aarch64-unknown-linux-gnu]
rustflags = ["-C", "target-feature=+fullfp16"]
🤖 Prompt for AI Agents
In .cargo/config.toml around lines 8 to 9, the rustflags entry incorrectly uses
"target-feature=+fp16"; replace it with the correct feature
"target-feature=+fullfp16" so the aarch64 build enables fullfp16 support (i.e.,
update the rustflags array value to use +fullfp16).
nnshah1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nv-anants can you look as well? What does the arm build do on our end?
Following the developer instructions on arm CPUs results in a bunch of:
It seems this is a simple case of telling Rust to enable this feature, which this PR accomplishes.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.