Skip to content

[MPS] Clamp op - fix shape issues (#114)#85673

Closed
kulinseth wants to merge 2 commits intopytorch:masterfrom
kulinseth:clamp_fix
Closed

[MPS] Clamp op - fix shape issues (#114)#85673
kulinseth wants to merge 2 commits intopytorch:masterfrom
kulinseth:clamp_fix

Conversation

@kulinseth
Copy link
Copy Markdown
Collaborator

  • Handle shape mismatch
  • Handle case where 1 occurs in input shape; fix fill_new_shapes
  • Move clamp ops to allowlist

* Handle shape mismatch

* Handle case where 1 occurs in input shape; fix fill_new_shapes

* Move clamp ops to allowlist
@kulinseth kulinseth added the ciflow/mps Run MPS tests (subset of trunk) label Sep 26, 2022
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Sep 26, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/85673

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures, 35 Pending

As of commit 3a5a54a:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added the release notes: mps Release notes category label Sep 26, 2022
@kulinseth
Copy link
Copy Markdown
Collaborator Author

@pytorchbot help

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Sep 26, 2022

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: argument command: invalid choice: 'help' (choose from 'merge', 'revert', 'rebase', 'label')

usage: @pytorchbot [-h] {merge,revert,rebase,label} ...

Try @pytorchbot --help for more info.

@kulinseth
Copy link
Copy Markdown
Collaborator Author

@pytorchbot --help

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Sep 26, 2022

PyTorchBot Help

usage: @pytorchbot [-h] {merge,revert,rebase,label} ...

In order to invoke the bot on your PR, include a line that starts with
@pytorchbot anywhere in a comment. That line will form the command; no
multi-line commands are allowed. 

Example:
    Some extra context, blah blah, wow this PR looks awesome

    @pytorchbot merge

optional arguments:
  -h, --help            Show this help message and exit.

command:
  {merge,revert,rebase,label}
    merge               Merge a PR
    revert              Revert a PR
    rebase              Rebase a PR
    label               Add label to a PR

Merge

usage: @pytorchbot merge [-g | -f MESSAGE | -l | -r [REBASE]]

Merge an accepted PR, subject to the rules in .github/merge_rules.json.
By default, this will wait for all required checks (lint, pull) to succeed before merging.

optional arguments:
  -g, --green           Merge when all status checks running on the PR pass. To add status checks, use labels like `ciflow/trunk`.
  -f MESSAGE, --force MESSAGE
                        Merge without checking anything. This requires a reason for auditting purpose, for example:
                        @pytorchbot merge -f 'Minor update to fix lint. Expecting all PR tests to pass'
  -l, --land-checks     Merge with land time checks. This will create a new branch with your changes rebased on viable/strict and run a majority of trunk tests _before_ landing to increase trunk reliability and decrease risk of revert. The tests added are: pull, Lint and trunk. Note that periodic is excluded. (EXPERIMENTAL)
  -r [REBASE], --rebase [REBASE]
                        Rebase the PR to re run checks before merging.  It will accept a branch name and will default to master if not specified.

Revert

usage: @pytorchbot revert -m MESSAGE -c
                          {nosignal,ignoredsignal,landrace,weird,ghfirst}

Revert a merged PR. This requires that you are a Meta employee.

Example:
  @pytorchbot revert -m="This is breaking tests on trunk. hud.pytorch.org/" -c=nosignal

optional arguments:
  -m MESSAGE, --message MESSAGE
                        The reason you are reverting, will be put in the commit message. Must be longer than 3 words.
  -c {nosignal,ignoredsignal,landrace,weird,ghfirst}, --classification {nosignal,ignoredsignal,landrace,weird,ghfirst}
                        A machine-friendly classification of the revert reason.

Rebase

usage: @pytorchbot rebase [-s | -b BRANCH]

Rebase a PR. Rebasing defaults to the stable viable/strict branch of pytorch.
You, along with any member of the pytorch organization, can rebase your PR.

optional arguments:
  -s, --stable          [DEPRECATED] Rebase onto viable/strict
  -b BRANCH, --branch BRANCH
                        Branch you would like to rebase to

Label

usage: @pytorchbot label labels [labels ...]

Adds label to a PR

positional arguments:
  labels  Labels to add to given Pull Request

Copy link
Copy Markdown
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

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

Fix lints

Comment thread test/test_mps.py Outdated
Comment thread aten/src/ATen/native/mps/operations/TensorCompare.mm Outdated
Comment thread aten/src/ATen/native/mps/operations/TensorCompare.mm Outdated
Comment thread aten/src/ATen/native/mps/operations/TensorCompare.mm Outdated
Comment thread aten/src/ATen/native/mps/operations/TensorCompare.mm Outdated
Comment thread aten/src/ATen/native/mps/operations/TensorCompare.mm Outdated
@malfet
Copy link
Copy Markdown
Contributor

malfet commented Sep 27, 2022

@pytorchbot merge -f "MPS tests are green"

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a merge job. Check the current status here.
The merge job was triggered with the force (-f) flag. This means your change will be merged immediately, bypassing any CI checks (ETA: 1-5 minutes). If this is not the intended behavior, feel free to use some of the other merge options in the wiki.
Please reach out to the PyTorch DevX Team with feedback or questions!

@github-actions
Copy link
Copy Markdown
Contributor

Hey @kulinseth.
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.

mehtanirav pushed a commit that referenced this pull request Oct 4, 2022
* Handle shape mismatch
* Handle case where 1 occurs in input shape; fix fill_new_shapes
* Move clamp ops to allowlist

Pull Request resolved: #85673
Approved by: https://github.com/malfet
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 25, 2026
* Handle shape mismatch
* Handle case where 1 occurs in input shape; fix fill_new_shapes
* Move clamp ops to allowlist

Pull Request resolved: pytorch#85673
Approved by: https://github.com/malfet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/mps Run MPS tests (subset of trunk) cla signed Merged open source release notes: mps Release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants