Skip to content

fix: include integrated GPUs in automatic memory planning - #2228

Merged
leejet merged 1 commit into
leejet:masterfrom
Project516:fix/auto-fit-integrated-gpu
Oct 27, 2026
Merged

leejet merged 1 commit into
leejet:masterfrom
Project516:fix/auto-fit-integrated-gpu

Conversation

@Project516

@Project516 Project516 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Include integrated GPU devices when automatic memory planning enumerates compute GPUs. The current filter excludes GGML_BACKEND_DEVICE_TYPE_IGPU unless a backend is explicitly specified, so an integrated-only system skips the planner even though the default Vulkan execution backend works.

CPU exclusion, explicit accelerator selection and memory-budget calculation remain unchanged.

Related Issue / Discussion

Related to #2101. That report's CPU-fallback interpretation does not match the reproduction here: Vulkan runs, but the auto-fit plan is missing without an explicit backend.

Additional Information

  • Vulkan Release build succeeded.
  • Direct SD 1.5 CLI checks on a Radeon 780M UMA device produced an auto-fit plan without --backend, including the requested 4 GiB budget, and generated an image successfully. Explicit --backend vulkan0 also passed.
  • A local C++ harness exercising the source enumeration function passed automatic GPU/IGPU inclusion, CPU exclusion, explicit accelerator selection, and default/per-device budget checks. The unmodified source fails integrated-GPU inclusion.
  • Test code is kept local in accordance with the contribution guidelines. Mixed discrete/integrated hardware and other backends were not tested. No large-model or OOM stress test was attempted.

Checklist

Summary by CodeRabbit

  • New Features
    • GPU device discovery now includes integrated GPUs alongside discrete GPUs. Other device types remain excluded unless explicitly enabled, and CPUs are still excluded in that mode.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2c742ed2-7dd0-49ee-a151-ff06a60fac6b
Commits

Reviewing files that changed from the base of the PR and between be48649 and 791b801.

Files selected for processing: 1
  • src/core/backend_fit.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

Walkthrough

GPU device enumeration now includes integrated GPUs. The existing handling of other device types and CPUs remains unchanged.

Changes: GPU Enumeration

Layer / File(s) Summary
GPU device type filter
src/core/backend_fit.cpp
enumerate_gpu_devices accepts integrated and discrete GPU device types. The existing condition for other device types remains unchanged.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related issues

  • Issue 2192 reports that auto-fit found no GPU devices for an integrated Radeon GPU on Vulkan. This change includes integrated GPUs in device enumeration.

Suggested reviewers: leejet

Merge Risk: Minimal · up to 791b8

The change is limited to including integrated GPUs in automatic enumeration, with existing exclusions preserved.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title names the main change: integrated GPUs are now included in automatic memory planning. It uses the conventional fix: prefix and stays within one line. It matches the raw summary, which descri…
Description check Passed The description follows the template. It has a Summary that states what changed and why. It has a Related Issue / Discussion section that links #2101 and explains how the reproduction differs. It has …
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.
Full details: Title check

Explanation

The title names the main change: integrated GPUs are now included in automatic memory planning. It uses the conventional fix: prefix and stays within one line. It matches the raw summary, which describes the enumerate_gpu_devices filter change in backend_fit.cpp.

Full details: Description check

Explanation

The description follows the template. It has a Summary that states what changed and why. It has a Related Issue / Discussion section that links #2101 and explains how the reproduction differs. It has an Additional Information section with build, CLI, and harness verification notes. It has a checked Checklist item. The template comment asks for an explicit link to related issues, and the PR links one. The description does not add a separate section heading for every template item, but all required content is present.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@leejet
leejet merged commit 2032526 into leejet:master Oct 27, 2026
12 checks passed
@leejet

leejet commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Thanks.

@Project516
Project516 deleted the fix/auto-fit-integrated-gpu branch October 27, 2026 17:31
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