Skip to content

Commit

Permalink
update: test_cpu_offload_optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
kozistr committed Oct 26, 2024
1 parent 23e0fda commit 26eb948
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ def test_version_utils():


def test_cpu_offload_optimizer():
if not torch.cuda.is_available():
pytest.skip('need GPU to run a test')

params = Example().parameters()

opt = CPUOffloadOptimizer(params, torch.optim.AdamW, fused=False, offload_gradients=True)
Expand Down

0 comments on commit 26eb948

Please sign in to comment.