Skip to content

feat: add multi-device layer split (--backend "diffusion=cuda0&cuda1")#1734

Merged
leejet merged 6 commits into
leejet:masterfrom
pwilkin:layer-split
Jul 4, 2026
Merged

feat: add multi-device layer split (--backend "diffusion=cuda0&cuda1")#1734
leejet merged 6 commits into
leejet:masterfrom
pwilkin:layer-split

Conversation

@pwilkin

@pwilkin pwilkin commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

As per agreed #1470 split, part 1: layer split.

Manual placement only; row/tensor split and auto-fit are follow-ups.

Related Issue / Discussion

#1470

A --backend module assignment can now list several devices separated by
'&'. The module's transformer blocks are partitioned into contiguous
ranges sized proportionally to each device's free memory (minus a fixed
compute headroom) and registered with the ModelManager with per-tensor
compute backends; the existing allocation/staging/LoRA/residency
machinery handles the weights unchanged. The module's graphs execute on
a ggml_backend_sched spanning the devices, pinning each node to the
device of the most recently consumed weight (view ops are never pinned)
and splitting each graph exactly once. Supported for the diffusion and
te modules; for te the dominant encoder (t5xxl or the LLM) splits while
small sub-runners stay on the main device. Graph-cut segmentation and
--stream-layers are disabled for split modules. Adds --list-devices to
print the ggml device names accepted by the backend specs.

Manual placement only; row/tensor split and auto-fit are follow-ups.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@leejet leejet merged commit 7bcd189 into leejet:master Jul 4, 2026
11 checks passed
@leejet

leejet commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Thank you for your contribution.

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