[Resubmit] Migrate AT_DISPATCH_ALL_TYPES_AND_COMPLEX_AND3 to c10::complex#38144
Closed
[Resubmit] Migrate AT_DISPATCH_ALL_TYPES_AND_COMPLEX_AND3 to c10::complex#38144
Conversation
…_AND_COMPLEX_AND3 to c10::complex" This reverts commit 0c936f9.
Closed
Collaborator
Author
|
The solution should be #if defined(CUDA_VERSION) && (CUDA_VERSION < 10000)
#define CUDA92_BUG(x) thrust::complex<T>(x.real(), x.imag())
#else
#define CUDA92_BUG(x) x
#endif
template<typename T>
C10_HOST_DEVICE T abs(const c10::complex<T>& z) {
#if defined(__CUDACC__) || defined(__HIPCC__)
return thrust::abs(static_cast<thrust::complex<T>>(CUDA92_BUG(z)));
#else
return std::abs(static_cast<std::complex<T>>(z));
#endif
}
#undef CUDA92_BUG |
💊 CI failures summary and remediationsAs of commit e5dcdf5 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no 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 3 times. |
…ex-AT_DISPATCH_ALL_TYPES_AND_COMPLEX_AND3
Collaborator
Author
|
@anjali411 This is ready |
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
@anjali411 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
anjali411
approved these changes
May 10, 2020
Contributor
|
@anjali411 merged this pull request in 5077518. |
Collaborator
|
@anjali411 This PR has caused ROCm tests to fail. Still investigating whether we can fix or need to revert. |
|
/cc @xw285cornell |
jeffdaily
added a commit
to ROCm/pytorch
that referenced
this pull request
May 12, 2020
…c10::complex (pytorch#38144)" This reverts commit 5077518. The commit causes significant regressions for ROCm.
jeffdaily
added a commit
to ROCm/pytorch
that referenced
this pull request
May 12, 2020
facebook-github-bot
pushed a commit
that referenced
this pull request
May 13, 2020
Summary: CC ezyang xw285cornell Pull Request resolved: #38363 Differential Revision: D21539778 Pulled By: ezyang fbshipit-source-id: 0f7d3b8e3b30ab4d5992f1c13aa8d48069796a8d
zasdfgbnm
added a commit
to zasdfgbnm/pytorch
that referenced
this pull request
May 13, 2020
This reverts commit c20b008.
Contributor
|
can I merge #38274 before we try to land this again? |
Collaborator
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
…plex (pytorch#38144) Summary: This reverts commit 2820ca7. Pull Request resolved: pytorch#38144 Differential Revision: D21495374 Pulled By: anjali411 fbshipit-source-id: 33249659fba88f087539233c3d297c0280e17208
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: CC ezyang xw285cornell Pull Request resolved: pytorch#38363 Differential Revision: D21539778 Pulled By: ezyang fbshipit-source-id: 0f7d3b8e3b30ab4d5992f1c13aa8d48069796a8d
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
…" (pytorch#38380) Summary: The changes in this file broke ROCm and got reverted in pytorch#38363. This PR brings it back with ROCm fixed. Pull Request resolved: pytorch#38380 Differential Revision: D21549632 Pulled By: ezyang fbshipit-source-id: 68498aba70e651352d58fd0c865e71420dbf900a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reverts commit 0c936f9.