Move Cuda Abs kernel to its own file.#38274
Closed
gchanan wants to merge 6 commits intogh/gchanan/278/basefrom
Closed
Move Cuda Abs kernel to its own file.#38274gchanan wants to merge 6 commits intogh/gchanan/278/basefrom
gchanan wants to merge 6 commits intogh/gchanan/278/basefrom
Conversation
UnarySignKernels is one of the longest files to compile and Abs is not a sign function. [ghstack-poisoned]
This was referenced May 11, 2020
mruberry
reviewed
May 11, 2020
| #include <ATen/Dispatch.h> | ||
| #include <ATen/native/DispatchStub.h> | ||
| #include <ATen/native/TensorIterator.h> | ||
| //#include <ATen/native/cuda/Math.cuh> |
Contributor
Author
There was a problem hiding this comment.
ah ya, I was checking that it wasn't needed, I'll just remove it.
💊 CI failures summary and remediationsAs of commit 72b92f6 (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 15 times. |
UnarySignKernels is one of the longest files to compile and Abs is not a sign function. Differential Revision: [D21511831](https://our.internmc.facebook.com/intern/diff/D21511831) [ghstack-poisoned]
UnarySignKernels is one of the longest files to compile and Abs is not a sign function. Differential Revision: [D21511831](https://our.internmc.facebook.com/intern/diff/D21511831) [ghstack-poisoned]
UnarySignKernels is one of the longest files to compile and Abs is not a sign function. Differential Revision: [D21511831](https://our.internmc.facebook.com/intern/diff/D21511831) [ghstack-poisoned]
UnarySignKernels is one of the longest files to compile and Abs is not a sign function. Differential Revision: [D21511831](https://our.internmc.facebook.com/intern/diff/D21511831) [ghstack-poisoned]
Collaborator
|
@gchanan please check #38380 for the correct/updated implementation of |
UnarySignKernels is one of the longest files to compile and Abs is not a sign function. Differential Revision: [D21511831](https://our.internmc.facebook.com/intern/diff/D21511831) [ghstack-poisoned]
zasdfgbnm
approved these changes
May 13, 2020
|
|
||
| namespace at { namespace native { | ||
|
|
||
| // We manually overload abs because std::abs does not work with thrust::complex types and ROCm. |
Collaborator
There was a problem hiding this comment.
Nit: I forgot to update this in my original PR. Should be:
// We manually overload abs because std::abs does not work with ROCm.
We are no longer using thrust::complex any more
Contributor
Author
|
@zasdfgbnm thanks, I'll put that in a follow up PR. |
Contributor
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: Pull Request resolved: pytorch#38274 UnarySignKernels is one of the longest files to compile and Abs is not a sign function. Test Plan: Imported from OSS Differential Revision: D21511831 Pulled By: gchanan fbshipit-source-id: f8572ab21321a241c984c64f7df83e2cb5e757d5
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.
Stack from ghstack:
UnarySignKernels is one of the longest files to compile and Abs is not a sign function.
Differential Revision: D21511831