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:
@@ -69,6 +69,9 @@ fn build(ep: Ep, bytes: &[u8], threads: usize, cache: &Path) -> ort::Result<ort:
|
|||||||
let _ = std::fs::create_dir_all(&d);
|
let _ = std::fs::create_dir_all(&d);
|
||||||
d.to_string_lossy().into_owned()
|
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 {
|
match ep {
|
||||||
Ep::Cpu => {}
|
Ep::Cpu => {}
|
||||||
Ep::MiGraphX => migraphx(&mut b, false, &cache.join("f32"))?,
|
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,
|
&mut b,
|
||||||
c"OpenVINO",
|
c"OpenVINO",
|
||||||
&[
|
&[
|
||||||
("device_type", "GPU".into()),
|
("device_type", gpu.clone()),
|
||||||
("precision", "FP32".into()),
|
("precision", "FP32".into()),
|
||||||
("cache_dir", dir("ov-gpu-f32")),
|
("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,
|
&mut b,
|
||||||
c"OpenVINO",
|
c"OpenVINO",
|
||||||
&[
|
&[
|
||||||
("device_type", "GPU".into()),
|
("device_type", gpu.clone()),
|
||||||
("precision", "FP16".into()),
|
("precision", "FP16".into()),
|
||||||
("cache_dir", dir("ov-gpu-fp16")),
|
("cache_dir", dir("ov-gpu-fp16")),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user