Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ def test_dequantize_blockwise_non_contiguous(self, device, dtype, blocksize):
@pytest.mark.parametrize("quant_type", ["fp4", "nf4"])
@pytest.mark.parametrize("blocksize", [64, 128, 256])
def test_quantize_4bit_non_contiguous(self, device, dtype, quant_type, blocksize):
if device != "cuda":
pytest.skip("Non-contiguous fix targets CUDA backend only")
if device not in ("cuda", "mps"):
pytest.skip("Non-contiguous input handling not implemented for this backend")

# Reproduce issue #1342: non-contiguous tensor from slicing
A_full = torch.randn(3, 4, 6, 256, dtype=dtype, device=device)
Expand All @@ -458,8 +458,8 @@ def test_quantize_4bit_non_contiguous(self, device, dtype, quant_type, blocksize
@pytest.mark.parametrize("blocksize", [64, 128, 256])
def test_quantize_4bit_roundtrip_non_contiguous(self, device, dtype, quant_type, blocksize):
"""End-to-end test: quantize non-contiguous, dequantize, compare with contiguous path."""
if device != "cuda":
pytest.skip("Non-contiguous fix targets CUDA backend only")
if device not in ("cuda", "mps"):
pytest.skip("Non-contiguous input handling not implemented for this backend")

A_full = torch.randn(3, 4, 6, 256, dtype=dtype, device=device)
A_noncontig = A_full[:, ::2, :, :]
Expand Down
Loading