Skip to content

Commit

Permalink
enable the activation offloading test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenying-liu committed Sep 24, 2024
1 parent 6d35113 commit adaf54a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/memories_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1567,8 +1567,6 @@ def g(ys, _):
self.assertGreater(compiled_stats.host_temp_size_in_bytes, 0)

def test_remat_scan_layout_change_offloadable(self):
if not jtu.test_device_matches(["tpu"]):
self.skipTest("Remat scan does not work on GPU backend.")
mesh = jtu.create_mesh((2,), ("x",))
shape = (256, 128)
np_inp = np.arange(math.prod(shape), dtype=np.float32).reshape(shape)
Expand Down Expand Up @@ -1602,6 +1600,10 @@ def g(ys, _):
self.assertIn('S(5)', compiled_text)
self.assertNotRegex(compiled_text, r"copy-start.*S\(5\)")
self.assertNotRegex(compiled_text, r"copy-done.*S\(5\)")
self.assertRegex(compiled_text, r"dynamic-update-slice-start.*S\(5\)")
self.assertRegex(compiled_text, r"dynamic-update-slice-done.*S\(5\)")
self.assertRegex(compiled_text, r"dynamic-slice-start.*S\(5\)")
self.assertRegex(compiled_text, r"dynamic-slice-done.*S\(5\)")

compiled_stats = compiled_f.memory_analysis()
if compiled_stats is not None:
Expand Down

0 comments on commit adaf54a

Please sign in to comment.