Skip to content
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

[Mosaic GPU] Factor out Mosaic GPU dialect arch-specific tests #26522

Merged
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
10 changes: 10 additions & 0 deletions tests/mosaic/gpu_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ def setUp(self):
self.enter_context(ir.Location.unknown())


class Sm90ATestCase(TestCase, jtu.CudaArchSpecificTest):

def setUp(self):
self.skip_unless_sm90a()
super().setUp()


class TestUtilTest(TestCase):

def test_copy_basic(self):
Expand Down Expand Up @@ -2423,6 +2430,9 @@ def add(

self.assertArraysEqual(jax.jit(kernel)(x, y), x + y + y)


class MosaicGpuDialectSm90ATest(Sm90ATestCase, jtu.JaxTestCase):

# TODO(dasenov): Add a test for kNoSwizzle, i.e. all swizzling modes.
@parameterized.parameters(mgpu_dialect.SwizzlingMode.k32ByteSwizzle,
mgpu_dialect.SwizzlingMode.k64ByteSwizzle,
Expand Down
Loading