From 2e8bb730a34b485daf6de41a4c39597b3ff419d5 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Sun, 5 Jul 2026 19:40:16 -0500 Subject: [PATCH] feat(paths): DirectML runtime dir/dll/ready helpers (P2) --- src-tauri/src/paths.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src-tauri/src/paths.rs b/src-tauri/src/paths.rs index 989369e..e4449fe 100644 --- a/src-tauri/src/paths.rs +++ b/src-tauri/src/paths.rs @@ -63,6 +63,26 @@ pub fn npu_runtime_ready() -> bool { npu_runtime_dll().exists() } +/// On-demand DirectML runtime (ONNX Runtime built with the DirectML EP, P2). +/// The non-Vulkan GPU path for AMD/Intel reuses the same Whisper-ONNX model as +/// the NPU path but needs a *different* `onnxruntime.dll` — Intel's OpenVINO ORT +/// build doesn't carry the DirectML EP — so it lives in its own runtime dir. +/// `DirectML.dll` itself ships with Windows 10 1903+, so the bundle is just ORT. +pub fn directml_runtime_dir() -> PathBuf { + wa_root().join("runtime").join("directml") +} + +/// The dlopen target for `ort` (load-dynamic) on the DirectML path; its presence +/// is the readiness signal that gates AMD/Intel non-Vulkan availability. +pub fn directml_runtime_dll() -> PathBuf { + directml_runtime_dir().join("onnxruntime.dll") +} + +/// True once the DirectML runtime has been staged (P2). +pub fn directml_runtime_ready() -> bool { + directml_runtime_dll().exists() +} + /// Fixed filenames pending T4.7 (diarization model management/selection in Settings). pub fn diarization_segmentation_model_file() -> PathBuf { models_dir().join("seg-pyannote-3.0.onnx")