mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
Add OpenVINO device logging
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user