Let ep_probe name the OpenVINO GPU

On the hybrid laptop OpenVINO's `GPU` was the RTX 3050 through NVIDIA's
OpenCL, not the Iris Xe; DARKROOM_OV_GPU picks GPU.0, GPU.1 and so on.
This commit is contained in:
2026-10-04 21:00:15 -04:00
parent 0291b80672
commit 555ec0efb3
@@ -69,6 +69,9 @@ fn build(ep: Ep, bytes: &[u8], threads: usize, cache: &Path) -> ort::Result<ort:
let _ = std::fs::create_dir_all(&d);
d.to_string_lossy().into_owned()
};
// `GPU` is OpenVINO's first OpenCL GPU, which on a hybrid laptop can be
// the discrete NVIDIA one; DARKROOM_OV_GPU=GPU.1 names another.
let gpu = std::env::var("DARKROOM_OV_GPU").unwrap_or_else(|_| "GPU".into());
match ep {
Ep::Cpu => {}
Ep::MiGraphX => migraphx(&mut b, false, &cache.join("f32"))?,
@@ -79,7 +82,7 @@ fn build(ep: Ep, bytes: &[u8], threads: usize, cache: &Path) -> ort::Result<ort:
&mut b,
c"OpenVINO",
&[
("device_type", "GPU".into()),
("device_type", gpu.clone()),
("precision", "FP32".into()),
("cache_dir", dir("ov-gpu-f32")),
],
@@ -88,7 +91,7 @@ fn build(ep: Ep, bytes: &[u8], threads: usize, cache: &Path) -> ort::Result<ort:
&mut b,
c"OpenVINO",
&[
("device_type", "GPU".into()),
("device_type", gpu.clone()),
("precision", "FP16".into()),
("cache_dir", dir("ov-gpu-fp16")),
],