Skip to content

Commit

Permalink
[tests] remove require_non_xpu test markers (#3301)
Browse files Browse the repository at this point in the history
* remove non-xpu marker

* fix import
  • Loading branch information
faaany authored Jan 22, 2025
1 parent 28c171b commit 4c2c89e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions tests/test_kwargs_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
path_in_accelerate_package,
require_multi_device,
require_non_cpu,
require_non_xpu,
)
from accelerate.test_utils.testing import slow
from accelerate.utils import AutocastKwargs, KwargsHandler, ProfileKwargs, TorchDynamoPlugin, clear_environment
Expand All @@ -50,7 +49,6 @@ def test_kwargs_handler(self):
assert MockClass(a=2, c=2.25).to_kwargs() == {"a": 2, "c": 2.25}

@require_non_cpu
@require_non_xpu
def test_grad_scaler_kwargs(self):
# If no defaults are changed, `to_kwargs` returns an empty dict.
scaler_handler = GradScalerKwargs(init_scale=1024, growth_factor=2)
Expand Down
3 changes: 1 addition & 2 deletions tests/test_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from accelerate import Accelerator
from accelerate.state import AcceleratorState
from accelerate.test_utils import require_cpu, require_non_cpu, require_non_xpu
from accelerate.test_utils import require_cpu, require_non_cpu


@require_cpu
Expand All @@ -37,7 +37,6 @@ def test_accelerated_optimizer_pickling(self):


@require_non_cpu
@require_non_xpu
class OptimizerTester(unittest.TestCase):
def test_accelerated_optimizer_step_was_skipped(self):
model = torch.nn.Linear(5, 5)
Expand Down

0 comments on commit 4c2c89e

Please sign in to comment.