-
Notifications
You must be signed in to change notification settings - Fork 5
[0.6.0-UT] Fix Test Shard #519
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
base: rocm-jaxlib-v0.6.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -276,10 +276,12 @@ def test_invalid_result_type(self): | |
|
|
||
| @jtu.run_on_devices("gpu", "cpu") | ||
| def test_shard_map(self): | ||
| if jtu.is_device_rocm: | ||
| self.skipTest("Skip on ROCm: tests/ffi_test.py::FfiTest::test_shard_map") | ||
| # if jtu.is_device_rocm: | ||
| # self.skipTest("Skip on ROCm: tests/ffi_test.py::FfiTest::test_shard_map") | ||
| mesh = jtu.create_mesh((len(jax.devices()),), ("i",)) | ||
| x = self.rng().randn(8, 4, 5).astype(np.float32) | ||
| n = len(jax.devices()) | ||
| x = x[:(x.shape[0] // n) * n] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This trims the array, however trimming the array could hinder the mathematical correction of this test. Instead of trimming we can also pad the array like I did in #509 to prevent information loss. Could you please explain how this is mathematically correct and we are not losing info? |
||
|
|
||
| @partial(shard_map, mesh=mesh, in_specs=P("i"), out_specs=P("i")) | ||
| def f(x): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove commented lines.