Skip to content

Commit

Permalink
[Mosaic GPU] Factor out arch specific Pallas Mosaic GPU tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andportnoy committed Feb 13, 2025
1 parent 3ec7a67 commit 54fa1b9
Show file tree
Hide file tree
Showing 2 changed files with 210 additions and 194 deletions.
13 changes: 13 additions & 0 deletions jax/_src/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,19 @@ def is_cuda_compute_capability_equal(capability: str) -> bool:
current = tuple(int(x) for x in d.compute_capability.split("."))
return current == target


class CudaArchSpecificTest:
"""A mixin with methods allowing to skip arch specific tests."""

def skip_unless_sm90a(self):
if not is_cuda_compute_capability_equal("9.0"):
self.skipTest("Only works on GPU with capability sm90a")

def skip_unless_sm100a(self):
if not is_cuda_compute_capability_equal("10.0"):
self.skipTest("Only works on GPU with capability sm100a")


def _get_device_tags():
"""returns a set of tags defined for the device under test"""
if is_device_rocm():
Expand Down
Loading

0 comments on commit 54fa1b9

Please sign in to comment.