Skip to content

Commit

Permalink
skip gpu mem logging if cpu too
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed Sep 21, 2023
1 parent 972bd42 commit b1f1f44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/axolotl/utils/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def actual_decorator(func):
def wrapper(*args, **kwargs):
device = kwargs.get("device", args[0] if args else None)

if not torch.cuda.is_available() or device == "auto":
if not torch.cuda.is_available() or device == "auto" or device == "cpu":
return default_value

return func(*args, **kwargs)
Expand Down

0 comments on commit b1f1f44

Please sign in to comment.