- Full support of ORT-GPU alongside with ORT - New opton in Settings: Execution Provider selector - Many different fixes and improvements VersionUP (0.5.0 alpha2)
19 lines
426 B
Python
19 lines
426 B
Python
import os
|
|
from pathlib import Path
|
|
|
|
IS_RUN: bool = False
|
|
BASE_PATH = os.path.join(Path(__file__).parents[1])
|
|
DEVICE_LIST: list = ["CPU", "CUDA"]
|
|
|
|
def updateDevice():
|
|
try:
|
|
LAST_DEVICE_PATH = os.path.join(BASE_PATH, "last_device.txt")
|
|
with open(LAST_DEVICE_PATH) as f:
|
|
for el in f:
|
|
device = el.strip()
|
|
except:
|
|
device = "CPU"
|
|
return device
|
|
|
|
DEVICE = updateDevice()
|