1515"""Unit tests for Pallas Mosaic TPU v2 kernels."""
1616
1717import collections
18+ import pytest
1819
1920from absl .testing import absltest
2021from absl .testing import parameterized
@@ -213,6 +214,7 @@ def setUp(self):
213214 self .skipTest ("Only supported on TPUs." )
214215 super ().setUp ()
215216
217+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
216218 @parameterized .product (
217219 batch_size = [128 , 512 ],
218220 in_size = [512 , 1024 ],
@@ -252,6 +254,7 @@ def test_gmm_basic(self, batch_size, in_size, out_size, num_groups, has_bias, ha
252254
253255 assert_arrays_all_close (actual , expected )
254256
257+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
255258 @parameterized .product (
256259 batch_size = [128 , 1024 ],
257260 in_size = [512 , 1024 ],
@@ -287,6 +290,7 @@ def test_tgmm_basic(self, batch_size, in_size, out_size, num_groups, group_offse
287290 # print(f"Output mean diff: {jnp.mean(jnp.abs(expected - actual))}")
288291 assert_arrays_all_close (actual , expected )
289292
293+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
290294 @parameterized .product (
291295 batch_size = [128 , 256 ],
292296 in_size = [255 , 500 ],
@@ -316,6 +320,7 @@ def test_tgmm_implicit_padding(self, batch_size, in_size, out_size, num_groups,
316320 self .assertEqual (actual .shape , (num_local_groups , in_size , out_size ))
317321 assert_arrays_all_close (actual , expected )
318322
323+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
319324 @parameterized .product (
320325 batch_size = [256 , 1024 ],
321326 in_size = [1024 ],
@@ -359,6 +364,7 @@ def test_tgmm_with_tile_info(
359364 self .assertEqual (actual .shape , (num_local_groups , in_size , out_size ))
360365 assert_arrays_all_close (actual , expected )
361366
367+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
362368 @parameterized .product (
363369 batch_size = [128 ],
364370 in_size = [512 ],
@@ -403,6 +409,7 @@ def test_tgmm_empty_group(
403409 self .assertEqual (actual .shape , (num_local_groups , in_size , out_size ))
404410 assert_arrays_all_close (actual , expected )
405411
412+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
406413 def test_tgmm_explicitly_exercises_all_branches (self ):
407414 # Group 0 (size 4*tile_m, 4 gm tiles): matmul_new_group, matmul, matmul,
408415 # matmul_group_changing.
@@ -436,6 +443,7 @@ def test_tgmm_explicitly_exercises_all_branches(self):
436443 self .assertEqual (actual .shape , (num_local_groups , in_size , out_size ))
437444 assert_arrays_all_close (actual , expected )
438445
446+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
439447 @parameterized .product (
440448 batch_size = [128 ],
441449 in_size = [512 , 1024 ],
@@ -495,6 +503,7 @@ def test_gmm_weight_quantized(
495503
496504 chex .assert_trees_all_close (actual , expected , atol = 3e-1 , rtol = 3e-1 )
497505
506+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
498507 def test_gmm_security_isolation (self ):
499508 """Verifies that sequences (experts) are isolated from each other.
500509
@@ -533,6 +542,7 @@ def test_gmm_security_isolation(self):
533542 )
534543 self .assertFalse (jnp .any (jnp .isnan (actual_malicious [:first_expert_size ])))
535544
545+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
536546 def test_gmm_uninitialized_memory_robustness (self ):
537547 """Verifies that the kernel is robust against uninitialized scratchpads.
538548
@@ -558,6 +568,7 @@ def test_gmm_uninitialized_memory_robustness(self):
558568 # 3. Verify that the output is NaN-free
559569 self .assertFalse (jnp .any (jnp .isnan (actual )))
560570
571+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
561572 @parameterized .product (
562573 batch_size = [128 ],
563574 in_size = [1024 ],
@@ -614,6 +625,7 @@ def test_gmm_weight_quantized_block_larger_than_tile_k(
614625
615626 chex .assert_trees_all_close (actual , expected , atol = 3e-1 , rtol = 3e-1 )
616627
628+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
617629 @parameterized .product (
618630 batch_size = [128 ],
619631 in_size = [1024 ],
@@ -668,6 +680,7 @@ def test_gmm_activation_weight_quantized_block_larger_than_tile_k(
668680
669681 chex .assert_trees_all_close (actual , expected , atol = 1.2 , rtol = 1.2 )
670682
683+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
671684 @parameterized .product (
672685 batch_size = [128 ],
673686 in_size = [512 , 1024 ],
@@ -720,6 +733,7 @@ def test_gmm_activation_weight_quantized(
720733
721734 chex .assert_trees_all_close (actual , expected , atol = 1.1 , rtol = 1.1 )
722735
736+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
723737 @parameterized .product (
724738 batch_size = [128 , 256 ],
725739 in_size = [255 , 500 ],
@@ -760,6 +774,7 @@ def test_gmm_implicit_padding(self, batch_size, in_size, out_size, num_groups, h
760774 self .assertEqual (actual .shape , (batch_size , out_size ))
761775 assert_arrays_all_close (actual , expected )
762776
777+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
763778 @parameterized .product (
764779 batch_size = [128 ],
765780 in_size = [512 ],
@@ -818,6 +833,7 @@ def test_gmm_weight_quantized_padding(
818833 self .assertEqual (actual .shape , (batch_size , out_size ))
819834 chex .assert_trees_all_close (actual , expected , atol = 3e-1 , rtol = 3e-1 )
820835
836+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
821837 @parameterized .product (
822838 batch_size = [128 ],
823839 in_size = [512 ],
@@ -865,6 +881,7 @@ def test_gmm_nonlocal_groups_produce_zeros(self, batch_size, in_size, out_size,
865881 self .assertEqual (actual .shape , (batch_size , out_size ))
866882 assert_arrays_all_close (actual , expected )
867883
884+ @pytest .mark .skip (reason = "Test takes too long, can run locally to verify changes b/528087469" )
868885 @parameterized .product (
869886 batch_size = [128 ],
870887 in_size = [512 ],
0 commit comments