perf(unraid): move inference to less contended RTX 3090
This commit is contained in:
@@ -71,7 +71,8 @@ def authorized(authorization: str | None = Header(default=None)) -> None:
|
||||
|
||||
def gpu_info() -> dict:
|
||||
try:
|
||||
nvmlInit(); handle = nvmlDeviceGetHandleByIndex(0); memory = nvmlDeviceGetMemoryInfo(handle)
|
||||
nvmlInit(); physical_index = int(os.getenv("CUDA_VISIBLE_DEVICES", "0").split(",")[0])
|
||||
handle = nvmlDeviceGetHandleByIndex(physical_index); memory = nvmlDeviceGetMemoryInfo(handle)
|
||||
name = nvmlDeviceGetName(handle)
|
||||
if isinstance(name, bytes): name = name.decode()
|
||||
return {"name": name, "cuda_available": torch.cuda.is_available(),
|
||||
|
||||
Reference in New Issue
Block a user