pytorch/torchgen/executorch/api
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
..
types [torchgen] Rename executorch's RuntimeContext to KernelRuntimeContext (#104892) 2023-07-14 21:15:50 +00:00
__init__.py [torchgen] Introduce Executorch types and signatures (#90781) 2022-12-14 20:13:04 +00:00
custom_ops.py [torchgen] Add logic in custom ops to return empty tensor (#114143) 2023-12-08 17:03:44 +00:00
et_cpp.py Fix typo under torchgen directory (#111154) 2023-10-13 16:43:46 +00:00
unboxing.py [torchgen] Move Executorch unboxing logic into torchgen (#90098) 2022-12-19 21:58:43 +00:00