forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AOTInductor] ProxyExecutor supports List[Tensor] return type (pytorc…
…h#110182) Summary: Pull Request resolved: pytorch#110182 Support custom ops returns List[Tensor] type, like `"fn_with_list_output(Tensor[] tensors, int i) -> Tensor[]"` As an example `out5, out6 = torch.ops.fb.fn_with_list_output([out3, out4], 1)` got compiled into ``` AtenTensorHandle buf8_handle; // output buffer AOTI_TORCH_ERROR_CODE_CHECK(aoti_torch_new_uninitialized_tensor(&buf8_handle)); RAIIAtenTensorHandle buf8(buf8_handle); AtenTensorHandle buf9_handle; // output buffer AOTI_TORCH_ERROR_CODE_CHECK(aoti_torch_new_uninitialized_tensor(&buf9_handle)); RAIIAtenTensorHandle buf9(buf9_handle); AtenTensorHandle tensor_args_var_5[] = {buf5.get(), buf6.get(), buf8.get(), buf9.get()}; int64_t int_args_var_6[] = {1}; aoti_torch_proxy_executor_call_function(proxy_executor, 2, 1, int_args_var_6, 4, tensor_args_var_5); ``` Test Plan: Test Differential Revision: D49694691 fbshipit-source-id: 4be9fe4c4786f7099710e8cbe4ce01cd5a3d70b8
- Loading branch information
1 parent
eaf27cb
commit b44b4cd
Showing
2 changed files
with
36 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters