There was an error while loading. Please reload this page.
1 parent 61e286f commit 666a9a0Copy full SHA for 666a9a0
1 file changed
monai/utils/profiling.py
@@ -57,7 +57,7 @@ def torch_profiler_full(func):
57
58
@wraps(func)
59
def wrapper(*args, **kwargs):
60
- with torch.autograd.profiler.profile() as prof:
+ with torch.autograd.profiler.profile(use_device="cuda") as prof:
61
result = func(*args, **kwargs)
62
63
print(prof, flush=True)
@@ -76,7 +76,7 @@ def torch_profiler_time_cpu_gpu(func):
76
77
78
79
80
81
82
cpu_time = prof.self_cpu_time_total
0 commit comments