Skip to content

Disable inplace abs for complex tensors#45069

Closed
anjali411 wants to merge 8 commits intogh/anjali411/56/basefrom
gh/anjali411/56/head
Closed

Disable inplace abs for complex tensors#45069
anjali411 wants to merge 8 commits intogh/anjali411/56/basefrom
gh/anjali411/56/head

Conversation

@anjali411
Copy link
Copy Markdown
Contributor

@anjali411 anjali411 commented Sep 21, 2020

Stack from ghstack:

torch.abs is a C -> R function for complex input. Following the general semantics in torch, the in-place version of abs should be disabled for complex input.

Also added autograd test for torch.abs for complex inputs.
Differential Revision: D23818397

@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented Sep 21, 2020

💊 CI failures summary and remediations

As of commit 93b7696 (more details on the Dr. CI page):


None of the CI failures appear to be your fault 💚



❄️ 1 failure tentatively classified as flaky

but reruns have not yet been triggered to confirm:

See CircleCI build pytorch_macos_10_13_py3_test (1/1)

Step: "Update Homebrew" (full log | diagnosis details | 🔁 rerun) ❄️

fatal: Could not read from remote repository.
Receiving objects:  98% (175/178) Receiving objects:  99% (177/178) Receiving objects: 100% (178/178) Receiving objects: 100% (178/178), 63.89 KiB | 12.78 MiB/s, done. 
Resolving deltas:  96% (89/92) Resolving deltas:  97% (90/92) Resolving deltas: 100% (92/92) Resolving deltas: 100% (92/92), completed with 85 local objects. 
From ssh://github.com/Homebrew/homebrew-cask-versions 
 + 15f6b44...df140a1 master     -> origin/master  (forced update) 
+ git reset --hard origin/master 
HEAD is now at df140a1 Update iterm2-beta from 3.4.0beta8 to 3.4.0beta9 (#9681) 
+ for path in '$(find /usr/local/Homebrew -type d -name .git)' 
+ cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/.git/.. 
+ git fetch --depth=1 origin 
Connection to github.com closed by remote host.  
fatal: Could not read from remote repository. 
 
Please make sure you have the correct access rights 
and the repository exists. 

🚧 1 fixed upstream failure:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

Since your merge base is older than viable/strict, run these commands:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

Check out the recency history of this "viable master" tracking branch.


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 26 times.

anjali411 added a commit that referenced this pull request Sep 21, 2020
ghstack-source-id: 439e2d8
Pull Request resolved: #45069
@anjali411 anjali411 requested review from albanD and ezyang September 21, 2020 16:30
@anjali411 anjali411 added the module: complex Related to complex number support in PyTorch label Sep 21, 2020
Comment thread test/test_autograd.py
Copy link
Copy Markdown
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

lgtm

`torch.abs` is a `C -> R` function for complex input. Following the general semantics in torch, the in-place version of abs should be disabled for complex input.

Differential Revision: [D23818397](https://our.internmc.facebook.com/intern/diff/D23818397)

[ghstack-poisoned]
`torch.abs` is a `C -> R` function for complex input. Following the general semantics in torch, the in-place version of abs should be disabled for complex input.

Differential Revision: [D23818397](https://our.internmc.facebook.com/intern/diff/D23818397)

[ghstack-poisoned]
anjali411 added a commit that referenced this pull request Sep 21, 2020
ghstack-source-id: 3c97b7d
Pull Request resolved: #45069
`torch.abs` is a `C -> R` function for complex input. Following the general semantics in torch, the in-place version of abs should be disabled for complex input.

Differential Revision: [D23818397](https://our.internmc.facebook.com/intern/diff/D23818397)

[ghstack-poisoned]
anjali411 added a commit that referenced this pull request Sep 22, 2020
ghstack-source-id: 635b4a2
Pull Request resolved: #45069
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 22, 2020

Codecov Report

❗ No coverage uploaded for pull request base (gh/anjali411/56/base@efde9c3). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@                   Coverage Diff                   @@
##             gh/anjali411/56/base   #45069   +/-   ##
=======================================================
  Coverage                        ?   68.02%           
=======================================================
  Files                           ?      393           
  Lines                           ?    50820           
  Branches                        ?        0           
=======================================================
  Hits                            ?    34572           
  Misses                          ?    16248           
  Partials                        ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efde9c3...93b7696. Read the comment docs.

`torch.abs` is a `C -> R` function for complex input. Following the general semantics in torch, the in-place version of abs should be disabled for complex input.

Differential Revision: [D23818397](https://our.internmc.facebook.com/intern/diff/D23818397)

[ghstack-poisoned]
anjali411 added a commit that referenced this pull request Sep 23, 2020
ghstack-source-id: 83bf4f2
Pull Request resolved: #45069
`torch.abs` is a `C -> R` function for complex input. Following the general semantics in torch, the in-place version of abs should be disabled for complex input.

Differential Revision: [D23818397](https://our.internmc.facebook.com/intern/diff/D23818397)

[ghstack-poisoned]
anjali411 added a commit that referenced this pull request Sep 28, 2020
ghstack-source-id: a703087
Pull Request resolved: #45069
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@anjali411 merged this pull request in 534f2ae.

@facebook-github-bot facebook-github-bot deleted the gh/anjali411/56/head branch October 2, 2020 14:17
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Pull Request resolved: pytorch#45069

`torch.abs` is a `C -> R` function for complex input. Following the general semantics in torch, the in-place version of abs should be disabled for complex input.

Test Plan: Imported from OSS

Reviewed By: glaringlee, malfet

Differential Revision: D23818397

Pulled By: anjali411

fbshipit-source-id: b23b8d0981c53ba0557018824d42ed37ec13d4e2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

complex_autograd module: complex Related to complex number support in PyTorch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants