Skip to content

Commit

Permalink
Fix GPUMemMonitor callback when using xpu device (#4141)
Browse files Browse the repository at this point in the history
fix callback when using xpu
  • Loading branch information
kprokofi authored Dec 4, 2024
1 parent ca6b88b commit 57a4f18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/otx/algo/callbacks/gpu_mem_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _get_and_log_device_stats(
batch_size (int): batch size.
"""
device = trainer.strategy.root_device
if device.type == "cpu":
if device.type in ["cpu", "xpu"]:
return

device_stats = trainer.accelerator.get_device_stats(device)
Expand Down

0 comments on commit 57a4f18

Please sign in to comment.