Skip to content

Commit

Permalink
fix(api): correct device for VRAM check
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 17, 2023
1 parent 56a8262 commit cf8ca34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/onnx_web/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def run_gc(devices: List[DeviceParams] = []):
with torch.cuda.device(device.torch_str()):
torch.cuda.empty_cache()
torch.cuda.ipc_collect()
mem_free, mem_total = torch.cuda.mem_get_info(device=device.torch_str())
mem_free, mem_total = torch.cuda.mem_get_info()
logger.debug(
"remaining CUDA VRAM usage: %s of %s",
(mem_total - mem_free),
Expand Down

0 comments on commit cf8ca34

Please sign in to comment.