Add OpenVINO device logging

This commit is contained in:
Disty0
2023-09-28 19:33:14 +03:00
parent 5edf481c8d
commit 7a3c1da954
2 changed files with 20 additions and 3 deletions
+7 -1
View File
@@ -84,9 +84,15 @@ def get_device():
device = "CPU"
shared.log.warning("OpenVINO: No compatible GPU detected!")
os.environ.setdefault('OPENVINO_TORCH_BACKEND_DEVICE', device)
shared.log.debug(f"OpenVINO Device: {device}")
return device
def get_openvino_device():
core = Core()
try:
return core.get_property(get_device(), "FULL_DEVICE_NAME")
except:
return "OpenVINO"
def cache_root_path():
cache_root = "./cache/"
if os.getenv("OPENVINO_TORCH_CACHE_DIR") is not None: