Skip to content

[primTorch] support one tensor and two scalars in _prims.where#80146

Closed
Aidyn-A wants to merge 7 commits intopytorch:masterfrom
Aidyn-A:fix_elementwise_meta
Closed

[primTorch] support one tensor and two scalars in _prims.where#80146
Aidyn-A wants to merge 7 commits intopytorch:masterfrom
Aidyn-A:fix_elementwise_meta

Conversation

@Aidyn-A
Copy link
Copy Markdown
Collaborator

@Aidyn-A Aidyn-A commented Jun 23, 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.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Jun 23, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit 59a73ec (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.

Click here to manually regenerate this comment.

Comment thread torch/testing/_internal/common_methods_invocations.py Outdated
@Aidyn-A Aidyn-A marked this pull request as ready for review June 24, 2022 17:17
@Aidyn-A Aidyn-A requested review from mruberry and ngimel as code owners June 24, 2022 17:17
Comment thread torch/_prims/__init__.py
Comment thread torch/testing/_internal/common_methods_invocations.py Outdated
Aidyn-A and others added 2 commits June 24, 2022 17:05
Co-Authored-By: Mike Ruberry <38511765+mruberry@users.noreply.github.com>
@mruberry mruberry added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jun 27, 2022
@Aidyn-A Aidyn-A requested a review from mruberry June 27, 2022 15:20
@Aidyn-A
Copy link
Copy Markdown
Collaborator Author

Aidyn-A commented Jun 29, 2022

Hi @mruberry ,

I have implemented the changes that we are agreed to do.
Could you kindly review the PR?

@Aidyn-A
Copy link
Copy Markdown
Collaborator Author

Aidyn-A commented Jun 29, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge failed due to This PR is too stale; the last push date was more than 3 days ago. Please rebase and try again.
Raised by https://github.com/pytorch/pytorch/actions/runs/2584605277

@IvanYashchuk
Copy link
Copy Markdown
Collaborator

@pytorchbot merge -g

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

@github-actions
Copy link
Copy Markdown
Contributor

Hey @Aidyn-A.
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.

facebook-github-bot pushed a commit 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
pytorchmergebot pushed a commit that referenced this pull request Jul 8, 2022
This PR add primitives and references for `heaviside` and `hypot`.
Depends on #80146
Pull Request resolved: #79526
Approved by: https://github.com/mruberry
facebook-github-bot pushed a commit that referenced this pull request Jul 8, 2022
Summary:
This PR add primitives and references for `heaviside` and `hypot`.
Depends on #80146

Pull Request resolved: #79526
Approved by: https://github.com/mruberry

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

Reviewed By: mehtanirav

Differential Revision: D37719824

Pulled By: mehtanirav

fbshipit-source-id: f5b5f7a2ce0f5141fbc1b4ef4572f96a22d323c1
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
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 25, 2026
This PR add primitives and references for `heaviside` and `hypot`.
Depends on pytorch#80146
Pull Request resolved: pytorch#79526
Approved by: https://github.com/mruberry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants