Python Jiterator supports multiple outputs#78139
Python Jiterator supports multiple outputs#78139SherlockNoMad wants to merge 6 commits intomasterfrom
Conversation
🔗 Helpful links
✅ No Failures (0 Pending)As of commit d4a9002 (more details on the Dr. CI page): Expand to see more💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
66f00b3 to
b1e8fad
Compare
b1e8fad to
1edbfe9
Compare
1edbfe9 to
d4a9002
Compare
|
@pytorchbot merge this. |
|
Hey @SherlockNoMad. |
Summary: This PR is part3. Part1: #77902 Part2: #77921 Python Jiterator now supports returning multiple outputs ``` fn = torch.cuda.jiterator._create_multi_output_jit_fn( """ template <typename T> T binary_2outputs(T i0, T i1, T& out0, T& out1) { out0 = i0 + i1; out1 = i0 - i1; } """, num_outputs=2) x = torch.rand(3, device='cuda') y = torch.rand(3, device='cuda') out0, out1 = fn(x, y) torch.allclose(out0, x+y) torch.allclose(out1, x-y) ``` Pull Request resolved: #78139 Approved by: https://github.com/ngimel Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/6db8440f35831a903a1084aec1a3803af0e1dd10 Reviewed By: mehtanirav Differential Revision: D36668751 Pulled By: SherlockNoMad fbshipit-source-id: 756ad6da1682030d6db8cad390a3a72ef3b44444
This PR is part3.
Part1: #77902
Part2: #77921
Python Jiterator now supports returning multiple outputs