Skip to content

Prepare Jiterator code template for multiple outputs#77902

Closed
SherlockNoMad wants to merge 1 commit intomasterfrom
bahuang/jiterator_multioutput
Closed

Prepare Jiterator code template for multiple outputs#77902
SherlockNoMad wants to merge 1 commit intomasterfrom
bahuang/jiterator_multioutput

Conversation

@SherlockNoMad
Copy link
Contributor

@SherlockNoMad SherlockNoMad commented May 19, 2022

Part 1: make existing jiterator code strings work with multiple outputs code template

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented May 19, 2022

🔗 Helpful links

❌ 2 New Failures

As of commit 0c0b0ae (more details on the Dr. CI page):

Expand to see more
  • 2/2 failures introduced in this PR

🕵️ 2 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages

See GitHub Actions build pull / linux-docs / build-docs (cpp) (1/2)

Step: "Unknown" (full log | diagnosis details | 🔁 rerun)

2022-05-19T22:15:05.6074152Z ##[error]The operation was canceled.
2022-05-19T22:14:17.9524434Z Resolving deltas:  46% (697336/1515843)
2022-05-19T22:14:21.8415384Z Resolving deltas:  46% (702657/1515843)
2022-05-19T22:14:22.6877060Z Resolving deltas:  47% (722691/1515843)
2022-05-19T22:14:22.6957290Z Resolving deltas:  47% (726999/1515843)
2022-05-19T22:14:32.6613612Z Resolving deltas:  48% (727975/1515843)
2022-05-19T22:14:39.3016802Z Resolving deltas:  50% (772940/1515843)
2022-05-19T22:14:42.5524182Z Resolving deltas:  52% (800402/1515843)
2022-05-19T22:14:44.8097179Z Resolving deltas:  53% (814337/1515843)
2022-05-19T22:14:58.1892881Z Resolving deltas:  54% (825360/1515843)
2022-05-19T22:15:03.8364023Z Resolving deltas:  58% (881754/1515843)
2022-05-19T22:15:05.6074152Z ##[error]The operation was canceled.
2022-05-19T22:15:05.6089901Z Prepare all required actions
2022-05-19T22:15:05.6107109Z ##[group]Run ./.github/actions/chown-workspace
2022-05-19T22:15:05.6107312Z env:
2022-05-19T22:15:05.6107468Z   IN_CI: 1
2022-05-19T22:15:05.6107617Z   IS_GHA: 1
2022-05-19T22:15:05.6107781Z ##[endgroup]
2022-05-19T22:15:05.6121378Z ##[group]Run docker run --rm -v "$(pwd)":/v -w /v "${ALPINE_IMAGE}" chown -R "$(id -u):$(id -g)" .
2022-05-19T22:15:05.6121722Z �[36;1mdocker run --rm -v "$(pwd)":/v -w /v "${ALPINE_IMAGE}" chown -R "$(id -u):$(id -g)" .�[0m
2022-05-19T22:15:05.6133379Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2022-05-19T22:15:05.6133604Z env:

See GitHub Actions build pull / linux-docs / build-docs (python) (2/2)

Step: "Build python docs" (full log | diagnosis details | 🔁 rerun)

2022-05-19T22:14:28.6922480Z FileNotFoundError:...rno 2] No such file or directory: 'katex': 'katex'
2022-05-19T22:14:28.6917712Z     nproc=self.app.parallel - 1)
2022-05-19T22:14:28.6918300Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 571, in _write_parallel
2022-05-19T22:14:28.6918740Z     tasks.add_task(write_process, arg)
2022-05-19T22:14:28.6919312Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/util/parallel.py", line 103, in add_task
2022-05-19T22:14:28.6919710Z     self._join_one()
2022-05-19T22:14:28.6920228Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/util/parallel.py", line 127, in _join_one
2022-05-19T22:14:28.6920675Z     raise SphinxParallelError(*result)
2022-05-19T22:14:28.6921312Z sphinx.errors.SphinxParallelError: FileNotFoundError: [Errno 2] No such file or directory: 'katex': 'katex'
2022-05-19T22:14:28.6921874Z 
2022-05-19T22:14:28.6922010Z Sphinx parallel build error:
2022-05-19T22:14:28.6922480Z FileNotFoundError: [Errno 2] No such file or directory: 'katex': 'katex'
2022-05-19T22:14:42.6276769Z make: *** [Makefile:42: html] Error 2
2022-05-19T22:14:42.6306294Z ++ code=2
2022-05-19T22:14:42.6306997Z ++ '[' 2 -ne 0 ']'
2022-05-19T22:14:42.6307317Z ++ set +x
2022-05-19T22:14:42.6307673Z =========================
2022-05-19T22:14:42.6320217Z =========================
2022-05-19T22:14:42.6320712Z Docs build failed. If the failure is not clear, scan back in the log
2022-05-19T22:14:42.6321054Z for any WARNINGS or for the line build finished with problems
2022-05-19T22:14:42.6321312Z (tried to echo the WARNINGS above the ==== line)
2022-05-19T22:14:42.6321515Z =========================

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

Copy link
Collaborator

@ngimel ngimel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@SherlockNoMad
Copy link
Contributor Author

SherlockNoMad commented May 19, 2022

try revert pytorchbot command

@github-actions
Copy link
Contributor

Hey @SherlockNoMad.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@mruberry
Copy link
Collaborator

cc @0x00b1, who was asking about multiple output jiterated kernels

facebook-github-bot pushed a commit that referenced this pull request May 20, 2022
Summary:
Part 1: make existing jiterator code strings work with multiple outputs code template

Pull Request resolved: #77902
Approved by: https://github.com/ngimel

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/82682aab0bb3ca8e5310a8ab0a5f31c840578ff3

Reviewed By: seemethere

Differential Revision: D36537756

Pulled By: SherlockNoMad

fbshipit-source-id: 999b935047c7139af2a7cbc03686a58e4082514e
pytorchmergebot pushed a commit that referenced this pull request May 21, 2022
Part 2 for #77902

Further prepare python jiterator for supporting multiple outputs
Pull Request resolved: #77921
Approved by: https://github.com/ngimel
facebook-github-bot pushed a commit that referenced this pull request May 24, 2022
Summary:
Part 2 for #77902

Further prepare python jiterator for supporting multiple outputs

Pull Request resolved: #77921
Approved by: https://github.com/ngimel

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/c0abd834829ddaf015590dbd0c16b131e292cf36

Reviewed By: seemethere

Differential Revision: D36603024

Pulled By: seemethere

fbshipit-source-id: 190e409f0cb68d675da3b676a6fa658c0e32c107
pytorchmergebot pushed a commit that referenced this pull request May 24, 2022
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
swang392 pushed a commit that referenced this pull request May 25, 2022
Part 2 for #77902

Further prepare python jiterator for supporting multiple outputs
Pull Request resolved: #77921
Approved by: https://github.com/ngimel
facebook-github-bot pushed a commit that referenced this pull request May 26, 2022
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
@github-actions github-actions bot deleted the bahuang/jiterator_multioutput branch February 16, 2024 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants