From 84120aff0aae8bc6dff7630e4027ad53021e47f9 Mon Sep 17 00:00:00 2001 From: "Lin, Fanli" Date: Tue, 17 Dec 2024 22:54:31 -0800 Subject: [PATCH 1/2] enable on xpu --- tests/test_modeling_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_modeling_utils.py b/tests/test_modeling_utils.py index 4ee90d07141..f41de294347 100644 --- a/tests/test_modeling_utils.py +++ b/tests/test_modeling_utils.py @@ -852,7 +852,7 @@ def test_infer_auto_device_map_with_fallback_allocation_and_buffers(self): expected_device_map = {"batchnorm": 0, "linear1": "disk", "linear2": "disk"} assert device_map == expected_device_map - @require_cuda + @require_non_cpu def test_get_balanced_memory(self): model = ModelForTest() # model has size 236: linear1 64, batchnorm 72, linear2 100 From f51f8697842f4c56668aaad9754951c07560835e Mon Sep 17 00:00:00 2001 From: "Lin, Fanli" Date: Mon, 23 Dec 2024 23:15:47 -0800 Subject: [PATCH 2/2] remove require_cuda --- tests/test_modeling_utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_modeling_utils.py b/tests/test_modeling_utils.py index f41de294347..8b2f6e8ae35 100644 --- a/tests/test_modeling_utils.py +++ b/tests/test_modeling_utils.py @@ -28,7 +28,6 @@ from accelerate import init_empty_weights from accelerate.big_modeling import cpu_offload from accelerate.test_utils import ( - require_cuda, require_huggingface_suite, require_multi_device, require_non_cpu,