Skip to content

Commit

Permalink
skip on cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
janeyx99 committed Oct 18, 2024
1 parent 76d6ae9 commit c14aa1a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/torchtune/training/test_activation_offloading.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@

import pytest
import torch
from tests.test_utils import gpu_test
from torch import nn
from torchtune.training import OffloadActivations


@gpu_test(gpu_count=1)
@pytest.mark.parametrize("use_streams", [True, False])
def test_offloading_is_same_as_without(use_streams) -> None:
with torch.device("cuda"):
Expand Down Expand Up @@ -40,6 +42,7 @@ def test_offloading_is_same_as_without(use_streams) -> None:
assert torch.equal(param.grad, param_c.grad)


@gpu_test(gpu_count=1)
def test_offloading_works_with_view_outputs() -> None:
"""
This test is quite contrived but tests against a very obscure situation where
Expand Down

0 comments on commit c14aa1a

Please sign in to comment.