Skip to content

Commit

Permalink
Merge pull request #26509 from andportnoy:aportnoy/pallas-mosaic-gpu-…
Browse files Browse the repository at this point in the history
…test-sm90a

PiperOrigin-RevId: 726624339
  • Loading branch information
Google-ML-Automation committed Feb 13, 2025
2 parents 14afb73 + 54fa1b9 commit f0cd168
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 f0cd168

Please sign in to comment.