OpenVINO: added CPU-like conditions (#14338)

Signed-off-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
This commit is contained in:
Ilya Lavrenov 2025-03-07 10:24:49 +04:00 committed by GitHub
parent 63137cd922
commit 8ca7a71df7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -257,7 +257,8 @@ class HfRunner:
return x return x
if device is None: if device is None:
device = "cpu" if current_platform.is_cpu() else "cuda" device = "cpu" if current_platform.is_cpu(
) or current_platform.is_openvino() else "cuda"
if isinstance(x, dict): if isinstance(x, dict):
return {k: self.wrap_device(v, device) for k, v in x.items()} return {k: self.wrap_device(v, device) for k, v in x.items()}

View File

@ -698,7 +698,7 @@ def large_gpu_mark(min_gb: int) -> pytest.MarkDecorator:
without enough resources, or called when filtering tests to run directly. without enough resources, or called when filtering tests to run directly.
""" """
try: try:
if current_platform.is_cpu(): if current_platform.is_cpu() or current_platform.is_openvino():
memory_gb = 0 memory_gb = 0
else: else:
memory_gb = current_platform.get_device_total_memory() / GB_bytes memory_gb = current_platform.get_device_total_memory() / GB_bytes