Skip to content

Define +, -, *, / between complex numbers and integers#34506

Closed
xuhdev wants to merge 11 commits intogh/xuhdev/63/basefrom
gh/xuhdev/63/head
Closed

Define +, -, *, / between complex numbers and integers#34506
xuhdev wants to merge 11 commits intogh/xuhdev/63/basefrom
gh/xuhdev/63/head

Conversation

@xuhdev
Copy link
Copy Markdown
Collaborator

@xuhdev xuhdev commented Mar 9, 2020

Stack from ghstack:

Differential Revision: D20559619

@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented Mar 10, 2020

💊 CircleCI build failures summary and remediations

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


💚 💚 Looks good so far! There are no CircleCI failures yet. 💚 💚


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.

This comment has been revised 49 times.

@ezyang
Copy link
Copy Markdown
Contributor

ezyang commented Mar 10, 2020

@anjali411 I'm deferring review to you.

@ezyang ezyang removed their request for review March 10, 2020 23:15
@ngimel ngimel added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Mar 11, 2020
@anjali411 anjali411 added the module: complex Related to complex number support in PyTorch label Mar 12, 2020
Copy link
Copy Markdown
Contributor

@anjali411 anjali411 left a comment

Choose a reason for hiding this comment

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

LGTM thanks for the PR :) is there a place where we can add a test for this? cc. @yf225

@anjali411 anjali411 self-requested a review March 12, 2020 19:29
@anjali411
Copy link
Copy Markdown
Contributor

anjali411 commented Mar 12, 2020

LGTM thanks for the PR :) is there a place where we can add a test for this? cc. @yf225

@xuhdev We can make a new test file aten/src/ATen/test/complex_test.cpp and add the tests there

Comment thread aten/src/ATen/test/complex_test.cpp Outdated
Comment thread aten/src/ATen/test/complex_test.cpp Outdated
Comment thread aten/src/ATen/test/complex_test.cpp Outdated
Comment thread aten/src/ATen/test/complex_test.cpp Outdated
Copy link
Copy Markdown
Contributor

@anjali411 anjali411 left a comment

Choose a reason for hiding this comment

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

It will be fine to land after a few changes mentioned in the comments :D

@xuhdev xuhdev requested a review from anjali411 March 12, 2020 23:59
@anjali411
Copy link
Copy Markdown
Contributor

@xuhdev there are onnx and rocm test failures that seem to be related to this PR. can you take a look?

@xuhdev
Copy link
Copy Markdown
Collaborator Author

xuhdev commented Mar 20, 2020

@anjali411 The ONNX error seems to be gone

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@anjali411 merged this pull request in 451e4d5.

@facebook-github-bot facebook-github-bot deleted the gh/xuhdev/63/head branch March 24, 2020 14:17
Comment on lines +19 to +22
TestBinaryOpsForIntType<T, int8_t>(real, img, i, op);
TestBinaryOpsForIntType<T, int16_t>(real, img, i, op);
TestBinaryOpsForIntType<T, int32_t>(real, img, i, op);
TestBinaryOpsForIntType<T, int64_t>(real, img, i, op);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Where is the op variable coming from? ovrsource tests started failing on this.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Hmm it was probably misadded during modification. I'll remove them. Thanks for the report.

xuhdev added a commit that referenced this pull request May 13, 2020
This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

[ghstack-poisoned]
xuhdev added a commit that referenced this pull request May 13, 2020
This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

[ghstack-poisoned]
xuhdev added a commit that referenced this pull request May 13, 2020
This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

[ghstack-poisoned]
xuhdev added a commit that referenced this pull request May 13, 2020
This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

[ghstack-poisoned]
xuhdev added a commit that referenced this pull request May 13, 2020
This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

[ghstack-poisoned]
xuhdev added a commit that referenced this pull request May 13, 2020
This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

[ghstack-poisoned]
xuhdev added a commit that referenced this pull request May 14, 2020
This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

[ghstack-poisoned]
xuhdev added a commit that referenced this pull request May 14, 2020
This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

[ghstack-poisoned]
xuhdev added a commit that referenced this pull request May 14, 2020
This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

[ghstack-poisoned]
xuhdev added a commit that referenced this pull request May 14, 2020
This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

[ghstack-poisoned]
xuhdev added a commit that referenced this pull request May 14, 2020
This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

[ghstack-poisoned]
xuhdev added a commit that referenced this pull request May 14, 2020
This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

[ghstack-poisoned]
facebook-github-bot pushed a commit that referenced this pull request May 15, 2020
Summary:
Pull Request resolved: #38418

This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back #34506 (which was made for std::complex).

Differential Revision: D21587012

Test Plan: Imported from OSS

Pulled By: malfet

fbshipit-source-id: 6dd10c2f417d6f6d0935c9e1d8b457fd29c163af
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary: Pull Request resolved: pytorch#34506

Test Plan: Imported from OSS

Differential Revision: D20559619

Pulled By: anjali411

fbshipit-source-id: c63cb3c07f694c10328fc17f99d69d7134e5c67a
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Pull Request resolved: pytorch#38418

This is useful in reducing verbosity in c10::complex's general usage, and potentially also offers
performance benefits.

This brings back pytorch#34506 (which was made for std::complex).

Differential Revision: D21587012

Test Plan: Imported from OSS

Pulled By: malfet

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

Labels

merge-this-please Was marked for merge with @pytorchbot merge this please Merged module: complex Related to complex number support in PyTorch 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.

8 participants