Skip to content

Commit 10bf023

Browse files
jiqing-fengefraimdahl
authored andcommitted
TST Skip some GPU tests for XPU (huggingface#2471)
Avoid issue with numerical instability.
1 parent 1dad6a5 commit 10bf023

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_common_gpu.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,7 @@ def test_serialization_shared_tensors(self):
11251125
@require_non_cpu
11261126
@pytest.mark.single_gpu_tests
11271127
@require_bitsandbytes
1128+
@pytest.mark.skipif(not torch.cuda.is_available(), reason="XPU have numerial errors")
11281129
def test_4bit_dora_inference(self):
11291130
# check for same result with and without DoRA when initializing with init_lora_weights=False
11301131
bnb_config = BitsAndBytesConfig(
@@ -1164,6 +1165,7 @@ def test_4bit_dora_inference(self):
11641165
@require_non_cpu
11651166
@pytest.mark.single_gpu_tests
11661167
@require_bitsandbytes
1168+
@pytest.mark.skipif(not torch.cuda.is_available(), reason="XPU have numerial errors")
11671169
def test_8bit_dora_inference(self):
11681170
# check for same result with and without DoRA when initializing with init_lora_weights=False
11691171
model = AutoModelForCausalLM.from_pretrained(

0 commit comments

Comments
 (0)