@@ -324,6 +324,38 @@ def test_dtensor_columnwise_parallel(self, jit_fn):
324324 assert len (tmodel ._backend .subgraph_infos [0 ].thunder_compiled_fns ) == 1
325325 assert len (tmodel ._backend .subgraph_infos [0 ].split_reasons ) == 0
326326
327+ def test_dtensor_redistribute_with_positional_args (self ):
328+ num_devices = self .world_size
329+ mesh = DeviceMesh ("cuda" , list (range (num_devices )))
330+ dim_size = 16
331+
332+ # Test redistribute with positional args: redistribute(mesh, placements, async_op=True)
333+ def fn_positional (x ):
334+ dt = DTensor .from_local (x , mesh , [Shard (0 )])
335+ return dt .redistribute (mesh , [Replicate ()], async_op = True )
336+
337+ # Test redistribute with keyword args: redistribute(placements=..., async_op=True)
338+ def fn_keyword (x ):
339+ dt = DTensor .from_local (x , mesh , [Shard (0 )])
340+ return dt .redistribute (placements = [Replicate ()], async_op = True )
341+
342+ local_tensor = torch .randn (dim_size , dim_size , device = "cuda" )
343+
344+ # Both should work and produce the same result
345+ tmodel_positional = thunderfx (fn_positional )
346+ tmodel_keyword = thunderfx (fn_keyword )
347+
348+ result_positional = tmodel_positional (local_tensor )
349+ result_keyword = tmodel_keyword (local_tensor )
350+
351+ torch .testing .assert_close (result_positional , result_keyword )
352+
353+ # Verify no graph splits occurred (redistribute is supported)
354+ assert len (tmodel_positional ._backend .subgraph_infos ) == 1
355+ assert len (tmodel_positional ._backend .subgraph_infos [0 ].split_reasons ) == 0
356+ assert len (tmodel_keyword ._backend .subgraph_infos ) == 1
357+ assert len (tmodel_keyword ._backend .subgraph_infos [0 ].split_reasons ) == 0
358+
327359 @common_utils .parametrize ("executor" , tuple (executors_map .keys ()))
328360 @common_utils .parametrize (
329361 "input_shardings" ,
0 commit comments