Skip to content

Commit 05e3007

Browse files
Tests: guard linear8bit compile test for ipex cpu issue
1 parent 332aed9 commit 05e3007

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_linear8bitlt.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,14 @@ def test_linear8bitlt_torch_compile(device, threshold, bias, fullgraph, mode):
271271

272272
# Test with gradients. Currently only works with threshold=0.
273273
# Has a strange regression on Linux aarch64 CPU in torch==2.6.0.
274+
# There is also an issue with torch==2.7.0 on x86-64 with IPEX.
274275
is_broken_platform = (
275276
device == "cpu"
276-
and platform.machine() == "aarch64"
277277
and platform.system() == "Linux"
278-
and ((2, 7) > torch.__version__ >= (2, 6))
278+
and (
279+
(platform.machine() == "aarch64" and (2, 6) <= torch.__version__ < (2, 7))
280+
or (platform.machine() == "x86_64" and bnb.functional.ipex_cpu)
281+
)
279282
)
280283

281284
if threshold == 0 and not is_broken_platform:

0 commit comments

Comments
 (0)