Skip to content

Adjust quantized paged attention tests to skip float8_e4m3 on < sm89. #29422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 5 additions & 1 deletion tests/pallas/gpu_paged_attention_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def setUp(self):

super().setUp()


class PagedAttentionKernelTest(PallasBaseTest):

def setUp(self):
Expand Down Expand Up @@ -179,7 +180,7 @@ def test_paged_attention(
attn_logits_soft_cap=(None,),
quantize_k=(True, False),
quantize_v=(True, False),
quant_dtype=(jnp.float8_e4m3fn, jnp.int8),
quant_dtype=(jnp.float8_e5m2, jnp.float8_e4m3fn, jnp.int8)
)
def test_quantized_paged_attention(
self,
Expand All @@ -198,6 +199,9 @@ def test_quantized_paged_attention(
):
if not quantize_k and not quantize_v:
self.skipTest("Skipping since neither (k, v) quantization requested.")
if (quant_dtype == jnp.float8_e4m3fn
and not jtu.is_cuda_compute_capability_at_least("8.9")):
self.skipTest("Skipping since float8_e4m3fn is not supported on >= sm89")
max_kv_len = 2048
seq_lens = np.asarray([3, 256, 513, 1023, 2048], dtype=jnp.int32)
q, k_pages, v_pages, block_tables = _generate_qkv(
Expand Down
Loading