Skip to content

Enable MPS for dorado polish on macOS ARM64 - #1638

Open
DylanCosto wants to merge 1 commit into
nanoporetech:release-v2.1from
DylanCosto:optimization/polish-mps
Open

DylanCosto wants to merge 1 commit into
nanoporetech:release-v2.1from
DylanCosto:optimization/polish-mps

Conversation

@DylanCosto

Copy link
Copy Markdown

Enable MPS acceleration for dorado polish on macOS ARM64. Accept --device metal/mps, select MPS for --device auto, and budget half of shared host memory. Changes are guarded by DORADO_METAL_BUILD.

macOS ARM64: E. coli reads aligned to a Flye draft, v5.2 read-level model.

Workload CPU → MPS Speedup Runs
1 Mb 339.4 → 63.6 s 5.3× Median of 3
Full 4.88 Mb draft 1729.2 → 274.5 s 6.3× Single run

Consensus FASTA is byte-identical between CPU and MPS for both workloads.

Linux x86-64 CPU/CUDA regression checks also pass with byte-identical consensus to baseline (HG003 ONT chr20, 20 kb; v5.0 read-level model).

dorado polish only accepted 'cpu' or CUDA devices, and on Metal builds 'auto'
resolved to the CPU. Accept 'metal'/'mps' (Torch MPS, budgeting half of the
unified memory for batch sizing) and make 'auto' select it on Metal builds.

E. coli ONT 51x, Flye draft (4.88 Mb), dna_r10.4.1_e8.2_400bps_sup@v5.2.0_polish_rl,
M4 Pro: whole draft 1729s on the CPU (official 2.1.2 release) vs 274.5s on
the GPU; 1 Mb region median of 3: 339.4s vs 63.6s. The consensus is
identical to the CPU in both cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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