Skip to content

Issue 1770#1774

Merged
naoyam merged 2 commits intodevelfrom
issue_1770
Jun 24, 2022
Merged

Issue 1770#1774
naoyam merged 2 commits intodevelfrom
issue_1770

Conversation

@naoyam
Copy link
Copy Markdown
Collaborator

@naoyam naoyam commented Jun 24, 2022

Fixes #1770

Also adds assertions to avoid segfaults in the future

Copy link
Copy Markdown
Collaborator

@jjsjann123 jjsjann123 left a comment

Choose a reason for hiding this comment

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

LGTM

@naoyam naoyam merged commit 1b65299 into devel Jun 24, 2022
@naoyam naoyam deleted the issue_1770 branch June 24, 2022 17:03
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Jun 29, 2022
Fixes an issue of supporting two scalar arguments for `where` and other functions with similar set of arguments:

```
refs.where(a, 1, 0)
```

I had to skip `test_python_ref_executor` because the test causes a `Segmentation fault` when running with two scalars.
The issue csarofeen#1770 has been fixed csarofeen#1774, so we can lift the skip when its merged to the upstream.
Pull Request resolved: #80146
Approved by: https://github.com/ngimel
facebook-github-bot pushed a commit to pytorch/pytorch that referenced this pull request Jun 30, 2022
… (#80146)

Summary:
Fixes an issue of supporting two scalar arguments for `where` and other functions with similar set of arguments:

```
refs.where(a, 1, 0)
```

I had to skip `test_python_ref_executor` because the test causes a `Segmentation fault` when running with two scalars.
The issue csarofeen#1770 has been fixed csarofeen#1774, so we can lift the skip when its merged to the upstream.

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

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

Reviewed By: b0noI

Differential Revision: D37536899

fbshipit-source-id: eb01318424186cc9205408fbbd61ef23da9e87d5
shmsong pushed a commit to shmsong/pytorch that referenced this pull request Jul 24, 2022
Syncing nvfuser devel branch to upstream master. https://github.com/csarofeen/pytorch/

Code changes includes:

- TransformPropagator refactor: switched to Dijkstra instead of exhaustive enumeration on all possible paths to reduce compilation time on transform propagation;
- Indexing refactor: remove reference tensor creation in all tensor indexing logic (csarofeen#1690)
- (more) generic grouped grid reduction kernel;
- Minor parser/fuser patches:
  1. zero-dim tensor reduction support
  3. no-op binary removal within fused graph
  4. expand supported in fusion

Squashed commits to WAR github API
Commits that's actually in this PR from the devel branch:

```
a054b3e Refactor TransormPropagator to allow specifying a position and propagating to part of the DAG (csarofeen#1775)
d67e1cd Indexing refactor stage 1: remove reference tensor creation in all tensor indexing logic (csarofeen#1690)
1b65299 Issue 1770 (csarofeen#1774)
35b0427 Avoid compilation errors like below: (csarofeen#1773)
452c773 Ignore reductions of zero-dim tensors per PyTorch conventions (csarofeen#1771)
31d6c56 TransformPropagator refactor (csarofeen#1769)
570c5a8 Merge pull request csarofeen#1767 from csarofeen/upstream_merge_0621
9d6c3d8 merging upstream 61305cd
0ed815f New TransformPropagator algorithm (csarofeen#1763)
6c19520 no-op binary removal (csarofeen#1764)
ec7fa41 Proper propagation of IterType (csarofeen#1762)
b263562 Fix dimensionality check (csarofeen#1759)
2d6343f More generic grouped grid reduction kernel (csarofeen#1740)
64e2b56 [nvfuser] prevent spamming warning message (pytorch#77777) (csarofeen#1758)
0c43162 [nvFuser] Improving bitwise ops support (pytorch#77158) (csarofeen#1757)
b93a147 Parser expand (csarofeen#1754)
```

RUN_TORCHBENCH: nvfuser
Pull Request resolved: pytorch#80355
Approved by: https://github.com/davidberard98
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 25, 2026
…ch#80146)

Fixes an issue of supporting two scalar arguments for `where` and other functions with similar set of arguments:

```
refs.where(a, 1, 0)
```

I had to skip `test_python_ref_executor` because the test causes a `Segmentation fault` when running with two scalars.
The issue csarofeen#1770 has been fixed csarofeen#1774, so we can lift the skip when its merged to the upstream.
Pull Request resolved: pytorch#80146
Approved by: https://github.com/ngimel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segmentation fault when calling "where(tensor, scalar, scalar)"

2 participants