pytorch/torchgen/executorch
Mengwei Liu 898554a3a3 [torchgen] Add logic in custom ops to return empty tensor (#114143)
Summary: Add two logic:

1. If the custom op is returning a `Tensor` but also doesn't have an out tensor as input, return an empty tensor.
2. If the custom op is returning more than one Tensor and the number of out tensors is not the same as return Tensor, return a tuple of empty tensors.

Test Plan: Rely on new unit tests

Differential Revision: D51471651

Pull Request resolved: https://github.com/pytorch/pytorch/pull/114143
Approved by: https://github.com/cccclai
2023-12-08 17:03:44 +00:00
..
api [torchgen] Add logic in custom ops to return empty tensor (#114143) 2023-12-08 17:03:44 +00:00
__init__.py [torchgen] Introduce Executorch types and signatures (#90781) 2022-12-14 20:13:04 +00:00
model.py [Specialized Kernel] Propagate Specialized Kernel Support through ComputeCodegenUnboxedKernels (#103113) 2023-06-14 10:18:16 +00:00
parse.py [BE] Enable ruff's UP rules and autoformat torchgen/ (#105423) 2023-07-18 06:44:20 +00:00