Skip to content

feat(cardwire-cli): improve automatic-gpu selection - #187

Merged
luytan merged 1 commit into
mainfrom
fix-gpu-selection-on-launch
Aug 14, 2026
Merged

feat(cardwire-cli): improve automatic-gpu selection#187
luytan merged 1 commit into
mainfrom
fix-gpu-selection-on-launch

Conversation

@luytan

@luytan luytan commented Aug 14, 2026

Copy link
Copy Markdown
Member

Description

Improve the automatic-gpu selection by copying the daemon SystemType enum into the cli, and changes in the Manual GPU Ordering

Fixes # (issue)

TODO

  • Copy-Paste this line

Checklist:

  • My code follows the style guidelines of this project (cargo fmt)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the mdBook documentation
  • My changes generate no new warnings (clippy/clang)
  • New and existing unit tests pass locally with my changes (either use nix flake check or wait for the ci)

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ebb93d9d-7400-48a3-bd07-45fc31254c2c

📥 Commits

Reviewing files that changed from the base of the PR and between 5ad86b4 and fd608bd.

📒 Files selected for processing (2)
  • crates/cardwire-cli/src/main.rs
  • crates/cardwire-cli/src/types.rs

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Improved automatic GPU selection when no GPU is specified.
    • Detects laptop, desktop, and manual system configurations.
    • Selects suitable available and launchable GPUs according to the detected system type.
  • Bug Fixes
    • Prevents unavailable or non-launchable GPUs from being selected automatically.
    • Falls back to manual selection when the system configuration cannot be determined reliably.

Walkthrough

The CLI now classifies available GPUs as laptop, desktop, or manual systems. When no GPU is specified, it filters launchable devices and selects one using the detected system type.

Changes

GPU launch selection

Layer / File(s) Summary
System type classification
crates/cardwire-cli/src/types.rs
Adds SystemType and classifies suitable GPU combinations as Laptop, Desktop, or Manual.
System-specific launch selection
crates/cardwire-cli/src/main.rs
Filters available and launchable GPUs, then applies laptop, desktop, or manual selection priorities.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to fd608

This localized CLI change improves automatic GPU selection, and no actionable merge-blocking risk remains based on the supplied evidence.

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant SystemType
  participant GPUDevices
  CLI->>GPUDevices: Filter available and launchable GPUs
  CLI->>SystemType: Classify the GPU list
  SystemType-->>CLI: Return system type
  CLI->>GPUDevices: Select GPU by system-specific priority
Loading
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change to automatic GPU selection.
Description check ✅ Passed The description includes the required sections and summarizes the change, but the issue reference and checklist remain incomplete.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@luytan
luytan merged commit dc3f1ca into main Aug 14, 2026
9 checks passed
@luytan
luytan deleted the fix-gpu-selection-on-launch branch August 14, 2026 14:06
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.

1 participant