Skip to content

Commit

Permalink
Improve warning log for CPU fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
mlazzarin committed Dec 23, 2021
1 parent e864ef9 commit 64b7c55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qibo/backends/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def cpu_fallback(self, func, *args):
except self.oom_error: # pragma: no cover
# case not covered by GitHub workflows because it requires OOM
# Force using CPU to perform sampling
log.warn("Falling back to CPU because the GPU is out-of-memory.")
log.warn(f"Falling back to CPU for '{func.__name__}' because the GPU is out-of-memory.")
with self.device(self.get_cpu()):
return func(*args)

Expand Down

0 comments on commit 64b7c55

Please sign in to comment.