AssertionError of test_dtensor_basic_compile
- Dominant language
- Python
- Stars
- 113
- Forks
- 128
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 112
Description
### 🐛 Describe the bug
pytest -v test/inductor/test_compiled_autograd.py -k test_dtensor_basic_compile
pytest -v test/inductor/test_compiled_autograd.py -k test_dtensor_basic_export
```
______________________________________________________________________________ TestDTensorCompileWithCompiledAutograd.test_dtensor_basic_compile ______________________________________________________________________________
Traceback (most recent call last):
File "/home/daisyden/upstream/inductor4/test/distributed/tensor/test_dtensor_compile.py", line 271, in test_dtensor_basic_compile
self.assertExpectedInline(
File "/home/daisyden/miniforge3/envs/inductor4/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 3307, in assertExpectedInline
return super().assertExpectedInline(actual if isinstance(actual, str) else str(actual), expect, skip + 1)
File "/home/daisyden/miniforge3/envs/inductor4/lib/python3.10/site-packages/expecttest/__init__.py", line 413, in assertExpectedInline
assert_expected_inline(
File "/home/daisyden/miniforge3/envs/inductor4/lib/python3.10/site-packages/expecttest/__init__.py", line 378, in assert_expected_inline
assert_eq(expect, actual, msg=help_text)
File "/home/daisyden/miniforge3/envs/inductor4/lib/python3.10/site-packages/expecttest/__init__.py", line 450, in assertMultiLineEqualMaybeCppStack
self.assertMultiLineEqual(expect, actual, *args, **kwargs)
File "/home/daisyden/miniforge3/envs/inductor4/lib/python3.10/unittest/case.py", line 1226, in assertMultiLineEqual
self.fail(self._formatMessage(msg, standardMsg))
File "/home/daisyden/miniforge3/envs/inductor4/lib/python3.10/unittest/case.py", line 675, in fail
raise self.failureException(msg)
AssertionError: 'def [87 chars]ensor, L_mesh_ : torch.distributed.device_mesh[442 chars]al,)' != 'def [87 chars]ensor):\n l_self_buffers_buffer_ = L_self_b[337 chars]al,)'
- def forward(self, L_self_buffers_buffer_ : torch.distributed.tensor.DTensor, L_x_ : torch.Tensor, L_mesh_ : torch.distributed.device_mesh.DeviceMesh):
? ----------------------------------------------------
+ def forward(self, L_self_buffers_buffer_ : torch.distributed.tensor.DTensor, L_x_ : torch.Tensor):
l_self_buffers_buffer_ = L_self_buffers_buffer_
l_x_ = L_x_
+ prim_from_local = torch__dynamo_variables_torch_prim_from_local(l_x_); l_x_ = None
- l_mesh_ = L_mesh_
- from_local = torch.distributed.tensor._api.from_local(l_x_, l_mesh_, [torch.distributed.tensor.placement_types.Shard(dim=0)], run_check = False); l_x_ = l_mesh_ = None
- inter = l_self_buffers_buffer_ + from_local; l_self_buffers_buffer_ = from_local = None
+ inter = l_self_buffers_buffer_ + prim_from_local; l_self_buffers_buffer_ = prim_from_local = None
? +++++ +++++
- to_local = inter.to_local(); inter = None
+ prim_to_local = torch__dynamo_variables_tensor_prim_to_local(inter); inter = None
- return (to_local,)+ return (prim_to_local,)? +++++
: To accept the new output, re-run test with envvar EXPECTTEST_ACCEPT=1 (we recommend staging/committing your changes before doing this)
To execute this test, run the following from the base repo dir:
python test/distributed/tensor/test_dtensor_compile.py TestDTensorCompileWithCompiledAutograd.test_dtensor_basic_compile
This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
---------------------------------------------------------------------------------------------------- Captured stdout call -----------------------------------------------------------------------------------------------------
stats [('calls_captured', 3), ('unique_graphs', 1)]
aot_autograd [('total', 1), ('ok', 1)]
=================================================================================================== short test summary info ===================================================================================================
FAILED [0.4092s] test/inductor/test_compiled_autograd.py::TestDTensorCompileWithCompiledAutograd::test_dtensor_basic_compile - AssertionError: 'def [87 chars]ensor, L_mesh_ : torch.distributed.device_mesh[442 chars]al,)' != 'def [87 chars]ensor):\n l_self_buffers_buffer_ = L_self_b[337 chars]al,)'
```
The upstream PR https://github.com/pytorch/pytorch/pull/169867/changes#diff-f887379a1b7ffa6aff2b79f684d02671fb5ac3498b0613be7b68e84052013aac updated the test/distributed/tensor/test_dtensor_compile.py.
### Versions
#174058
Contributor guide
Assessment
This issue has not been assessed yet.