Skip to content

Commit 63c914a

Browse files
wz337facebook-github-bot
authored andcommitted
@parametrize DTensor clipping to test clipping with inf norm, L1, and L2 norm (#3220)
Summary: Pull Request resolved: #3220 Reviewed By: tsunghsienlee Differential Revision: D78706038 fbshipit-source-id: 32196c738e46bd67a67fe47f7d144f18f5a6d5f0
1 parent 1b8004a commit 63c914a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchrec/optim/tests/test_clipping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def _get_params_to_pg(
251251
return {param: [param.device_mesh.get_group()] for param in params}
252252

253253
@with_comms
254-
@parametrize("norm_type", ("inf",))
254+
@parametrize("norm_type", ("inf", 1, 2))
255255
def test_dtensor_clip_all_gradients_norm(
256256
self, norm_type: Union[float, str]
257257
) -> None:

0 commit comments

Comments
 (0)