pytorch/torch/_subclasses
Shangdi Yu f40e013787 Fix aten.to when input is a tensor constant (#146220)
Summary:
Fix aten.to when input is a tensor constant.

In this case, `args_unwrapped` could just be a constant, so not a functional tensor.

Test Plan:
```
buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export  -- -r  tensor_constant_aten_to
```

Differential Revision: D68984244

Pull Request resolved: https://github.com/pytorch/pytorch/pull/146220
Approved by: https://github.com/JacobSzwejbka
2025-02-01 11:07:33 +00:00
..
__init__.py
_fake_tensor_utils.py PEP585 update - torch/_higher_order_ops torch/_subclasses torch/backends torch/compiler torch/cuda torch/masked torch/mtia torch/nested (#145202) 2025-01-20 22:37:26 +00:00
fake_impls.py Add fake_impl for unique_consecutive (#145649) 2025-01-29 22:33:16 +00:00
fake_tensor.py [draft_export] Clear pending unbacked symbols when overriding mismatched fake kernels (#146089) 2025-02-01 03:32:50 +00:00
fake_utils.py PEP585 update - torch/_higher_order_ops torch/_subclasses torch/backends torch/compiler torch/cuda torch/masked torch/mtia torch/nested (#145202) 2025-01-20 22:37:26 +00:00
functional_tensor.py Fix aten.to when input is a tensor constant (#146220) 2025-02-01 11:07:33 +00:00
meta_utils.py pickler for GraphModule (#141659) 2025-01-31 05:34:28 +00:00
schema_check_mode.py Remove unused Python variables in torch/[_-a]* (#133492) 2024-12-12 17:39:14 +00:00