Repository navigation
Backlog
Description
Summary
On Windows (tested on Intel Z890 hybrid P-Core/E-Core CPU + NVIDIA RTX 5070 Ti in REAPER ARA2), v1.0.1 can hit multi-second (5–10s) stalls and 100% CPU spikes during ARA2 loading and small vocal edits.
Findings & Benchmarks
-
Vocoder defaults to CPU in VST3 instead of DirectML GPU:
SettingsManagerinitializesdevice = "CPU". In VST3 builds (without the standalone Settings menu), users stay on CPU permanently.- Measured on
pc_nsf_hifigan.onnx(Windows 11, RTX 5070 Ti vs CPU):- 300 frames: CPU
510 msvs DirectML18.9 ms(27x faster) - 1024 frames: CPU
2615 msvs DirectML55.4 ms(47x faster) - Numerical parity:
maxAbsDiff = 5.67e-5(~-85 dBFS), identical RMS, zero NaNs.
- 300 frames: CPU
GpuDeviceList::getDefaultDeviceIndex("DirectML")also picks the last enumerated adapter (names.size() - 1), which on hybrid systems with an iGPU/software adapter can pick the wrong device. Selecting by maxDedicatedVideoMemoryvia DXGI (IDXGIFactory1::EnumAdapters1, skippingDXGI_ADAPTER_FLAG_SOFTWARE) reliably picks the discrete GPU.
-
DirectML shader recompilation on variable chunk lengths:
- Each unique
numFramespassed toVocoder::inferChunkLockedon DirectML triggers graph/shader compilation (~200–1400 ms). - Quantizing DirectML chunk lengths up to 4 fixed buckets (
128 / 256 / 512 / 1024, repeating the last frame for padding and trimming the output back tonumFrames * hopSize) eliminates per-edit shader recompilation and keeps steady-state edits at ~19–55 ms.
- Each unique
-
ONNX Runtime thread spinning & unbounded thread pools on hybrid P-Core/E-Core CPUs:
- Default ONNX Runtime spin-waiting combined with
hardware_concurrency() / 2(or default0) threads — including in the new v1.0.1BasicPitchEvidence.cppandYamnetVoiceTagger.cppsessions — causes random 8–10s 100% CPU spikes that starve DAW audio threads. - Adding on all
Ort::SessionOptions:completely eliminated the random CPU lockups.options.SetExecutionMode(ExecutionMode::ORT_SEQUENTIAL); options.SetInterOpNumThreads(1); options.AddConfigEntry("session.intra_op.allow_spinning", "0"); options.AddConfigEntry("session.inter_op.allow_spinning", "0"); // CPU sessions: cap intra-op threads to clamp(hw / 2, 1, 4) // DirectML sessions: intra-op = 1, DisableMemPattern()
- Default ONNX Runtime spin-waiting combined with
-
ARA2 analysis & incremental resynthesis scope:
- In
ARADocumentController.cpp, fresh analysis reads and runs Mel/F0/GAME across the entire rawARAAudioSourceeven when theARAPlaybackRegionis trimmed to a short clip (e.g. 13s out of an 86s take). Scoping the neural analysis (and track pre-pass classification reads) to the trimmed playback region span (±0.25s margin) while keeping modification-time alignment makes ARA loading significantly faster. - In
IncrementalSynthesizer.cpp, after quantizing an entire 30s+ vocal take,selectConnectedEditedNotesandcomputeSynthesisRangecan cascade a single-note tweak across the entire take if there are no long gaps. Bounding cluster/voiced expansion (stopping only at non-voiced boundaries past a soft cap, e.g. ~2.2s soft / ~4.4s hard) keeps single-note edits instant without splitting active vowels.
- In
Environment
- PitchNet v1.0.1 (VST3 ARA2)
- Windows 11, Intel Z890 (hybrid P/E-Core), NVIDIA RTX 5070 Ti, REAPER
Metadata
Metadata
Assignees
Labels
No labels
Activity
jie-chen commentedon Dec 2, 2026
Thanks for such a detailed report. The profiling numbers made this easy to track down. Here's where each point landed:
1. Vocoder on CPU in the VST3: fixed. The DirectML default was only applied by the standalone app's Settings dialog, so anyone who only used the plugin stayed on CPU. On top of that, any saved setting wrote "CPU" to
config.jsonas if it had been chosen. The default device is now worked out in one shared place and used by the standalone app, the plugin and the background ARA analysis. Only a device the user actually picks gets saved, and a "CPU" left over from older versions is ignored, so existing installs move to the GPU too.1b. Wrong adapter on hybrid systems: fixed as you suggested. DirectML now defaults to the adapter with the most dedicated video memory instead of the last one Windows lists. A GPU index saved by older versions is ignored for the same reason as above. Choosing a GPU in the Rendering card still sticks.
2. Shader recompilation per chunk length: fixed with buckets. On DirectML, vocoder requests are padded to 128, 256, 512 or 1024 frames, repeating the last frame, and the output is trimmed back. CPU and Core ML are unchanged.
3. ONNX thread spinning: fixed. Every ONNX Runtime session (vocoder, pitch and note detection, classifiers) now uses the same settings: spinning off for both pools, one inter-op thread, and intra-op threads capped at half the cores with a minimum of 2 and a maximum of 8. GPU sessions use a single thread.
4. ARA analysis scope and cluster caps: not taking these, at least for now.
These changes will be in 1.0.2, which is coming shortly. When it's out, could you let us know whether the stalls and CPU spikes are gone on your Z890 + 5070 Ti setup?
Windows performance: GPU by default, no ONNX thread spinning