OpenVINO Hardware Improvements (#20071)

* Use OpenVINO directly to detect if devices are available

* Cleanup

* Update OpenVINO

* Cleanup

* Don't try to use OpenVINO when CPU is set as device

* Catch case where input tensor can't be pre-defined

* Cleanup
This commit is contained in:
Nicolas Mowen
2025-09-15 08:35:49 -05:00
committed by GitHub
parent 2d4a0cc584
commit 03fe054078
5 changed files with 63 additions and 29 deletions
+12 -8
View File
@@ -338,14 +338,18 @@ def get_ort_providers(
else:
continue
elif provider == "OpenVINOExecutionProvider":
os.makedirs(os.path.join(MODEL_CACHE_DIR, "openvino/ort"), exist_ok=True)
providers.append(provider)
options.append(
{
"cache_dir": os.path.join(MODEL_CACHE_DIR, "openvino/ort"),
"device_type": device,
}
)
# OpenVINO is used directly
if device == "OpenVINO":
os.makedirs(
os.path.join(MODEL_CACHE_DIR, "openvino/ort"), exist_ok=True
)
providers.append(provider)
options.append(
{
"cache_dir": os.path.join(MODEL_CACHE_DIR, "openvino/ort"),
"device_type": device,
}
)
elif provider == "MIGraphXExecutionProvider":
# MIGraphX uses more CPU than ROCM, while also being the same speed
if device == "MIGraphX":