Commit Graph

4 Commits

Author SHA1 Message Date
0fbc0830ba [export] Add device and dtype fields to assert_tensor_metadata (#141071)
Differential Revision: [D66321128](https://our.internmc.facebook.com/intern/diff/D66321128)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/141071
Approved by: https://github.com/yushangdi, https://github.com/zou3519
2024-11-22 20:54:55 +00:00
b3504af56e Enable UFMT on test/scripts and some files (#124137)
Part of: #123062

Ran lintrunner on:

- `test/scripts`
- `test/simulate_nccl_errors.py`
- `test/test_ao_sparsity.py`
- `test/test_autocast.py`
- `test/test_binary_ufuncs.py`
- `test/test_bundled_images.py`
- `test/test_bundled_inputs.py`
- `test/test_comparison_utils.py`
- `test/test_compile_benchmark_util.py`
- `test/test_complex.py`
- `test/test_cpp_api_parity.py`
- `test/test_cpp_extensions_aot.py`
- `test/test_cpp_extensions_jit.py`
- `test/test_cpp_extensions_open_device_registration.py`

Detail:

```bash
$ lintrunner -a --take UFMT --all-files
ok No lint issues.
Successfully applied all patches.
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/124137
Approved by: https://github.com/soulitzer
2024-04-19 22:01:27 +00:00
726fc366a2 Add missing __main__ in two unittests (#97302)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/97302
Approved by: https://github.com/zou3519
2023-03-22 19:09:08 +00:00
cd7408e950 Add aten _assert_tensor_metadata op (#84617)
Example:
```
graph():
    %arg0 : [#users=3] = placeholder[target=arg0]
    %arg_guard_equality_check : [#users=1] = call_function[target=torch._tensor_equal](args = (%arg0, (1, 1, 2), (2, 2, 1), torch.float32), kwargs = {})
    %_assert_true : [#users=0] = call_function[target=torch._assert_true](args = (%arg_guard_equality_check, Guard evaluation failed equality check for arg0), kwargs = {})
    %add : [#users=1] = call_function[target=operator.add](args = (%arg0, 1), kwargs = {})
    return ([arg0, arg0], (add, add))
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/84617
Approved by: https://github.com/jansel
2022-09-19 20:48:09 +00:00