Repository navigation
feat: add Intel XPU inference support - #35
Conversation
|
Smoke tests passed on Intel Arc 770M, Ubuntu 26.04 |
|
Thanks — the device-selection refactor is clean and sharing Blocker — Evidence. The PR body and your comment say smoke tests passed on an Arc A770M, but there are no commands or output. Could you paste the commands used plus The FP32 decision is implicit. "XPU currently uses the FP32 inference path" is enforced only because Tests and docs. Suggested split. (1) device selection / validation / CLI / docs — mergeable once the serve bug is fixed; (2) hardware paths (STFT/ISTFT, overlap, cache) — mergeable with the evidence above plus an "experimental" note in the docs; (3) bf16 AMP and per-model RTF work — separate PR, and I'd want a benchmark harness first. |
|
Implemented the review fixes in 4f4698a, with the reproducible benchmark and hardware evidence in ec35a6c. I checked the items below against the pushed head, Implemented review items
Hardware evidence and reproductionAdded test/manual/xpu_benchmark.py, raw results, and documented commands and limitations. Environment: Ubuntu 26.04.1, Intel Core i7-12700H, Intel Arc A770M, PyTorch .venv/bin/python -c 'import torch; print(torch.xpu.is_available()); print(torch.xpu.get_device_name(0))'
# True
# Intel(R) Arc(TM) A770M Graphics
.venv/bin/python -m test.manual.xpu_benchmark --input .tmp/input.wavModel: locally cached
Using the shipped
Accuracy limitation: the vocal output is nearly silent (CPU RMS The same run selected Verification and scopeRe-ran the relevant tests on a clean export of the exact pushed commit (without the unrelated local server changes): python -m pytest -q test/test_xpu_runtime.py test/test_npu_runtime.py \
test/test_separator_device_defaults.py test/test_overlap_finalize.py test/test_use_amp.py
# 127 passed, 13 skippedThe suggested split into separate device-selection and hardware-path PRs has not been implemented: both remain in this PR. The fixes and benchmark evidence are separate follow-up commits, not separate PRs. Hardware paths are now documented as experimental. No bf16 AMP or broad per-model performance work is included; the benchmark harness provides a starting point for that future work. I am therefore not claiming that the PR-splitting suggestion or comprehensive accuracy validation is complete. |
Resolve conflicts by keeping the profile-driven device layer while preserving main's XPU work (PR pymss-project#35): - pymss/cli.py: --device choices come from SUPPORTED_DEVICES for every subcommand, so xpu and the vendor aliases cannot drift apart again. - pymss/separator.py: keep both _VENDOR_ALIASES and _validate_device_ids; auto order is cuda -> xpu -> npu -> gcu/mlu/supa -> mps -> cpu; explicit --device xpu keeps the "XPU-enabled PyTorch build" guard. - pymss/utils.py: _autocast stays profile-driven. FP32_INFERENCE_DEVICE_TYPES is dropped because DeviceProfile.amp is now the only source of truth (XPU reports amp=False). _finalize_overlap and the chunked fast path use device_profile().is_accelerator, which covers xpu. - pymss/modules/vocal_remover/vr_separator.py: one AMP policy via pymss.utils._autocast instead of a duplicate autocast call site. - spec_utils.py: keep the profile-based accelerator test. - pymss/plugins/manifest.py: keep math plus the tomllib/tomli fallback. - pyproject.toml: 2.4.0, pymss-core>=0.1.15, packaging>=24.0 from main. Note: test_graph_auto_node_uses_the_first_id_with_an_explicit_gpu_runtime fails identically on clean origin/main (pymss.graph.nodes imports register_node("input_audio") outside the builtin bootstrap), so it is a pre-existing main-branch defect, not a merge regression.
Summary
Validation
uv buildpassed.origin/main; this PR does not change server code. The loudnorm test passes from the standard checkout layout (its nested-worktree error was caused by the sibling-plugin fixture path).