Skip to content

Commit 8b54381

Browse files
committed
fix device check
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
1 parent 9897eae commit 8b54381

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def test_linear8bitlt_no_fp16_weights(device, threshold):
143143
b1 = torch.randn(16, 8, 32, device=device, dtype=torch.float16)
144144
o1 = mlp(b1)
145145
assert o1.dtype == torch.float16
146-
if threshold > 0 and device.type not in ("cpu", "xpu"):
146+
if threshold > 0 and device not in ("cpu", "xpu"):
147147
assert mlp.fc1.state.idx is not None
148148
assert mlp.fc2.state.idx is not None
149149

0 commit comments

Comments
 (0)