Skip to content

Move Cuda Abs kernel to its own file.#38274

Closed
gchanan wants to merge 6 commits intogh/gchanan/278/basefrom
gh/gchanan/278/head
Closed

Move Cuda Abs kernel to its own file.#38274
gchanan wants to merge 6 commits intogh/gchanan/278/basefrom
gh/gchanan/278/head

Conversation

@gchanan
Copy link
Copy Markdown
Contributor

@gchanan gchanan commented May 11, 2020

Stack from ghstack:

UnarySignKernels is one of the longest files to compile and Abs is not a sign function.

Differential Revision: D21511831

UnarySignKernels is one of the longest files to compile and Abs is not a sign function.

[ghstack-poisoned]
Comment thread aten/src/ATen/native/cuda/AbsKernel.cu Outdated
#include <ATen/Dispatch.h>
#include <ATen/native/DispatchStub.h>
#include <ATen/native/TensorIterator.h>
//#include <ATen/native/cuda/Math.cuh>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Commented out?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ah ya, I was checking that it wasn't needed, I'll just remove it.

Copy link
Copy Markdown
Collaborator

@mruberry mruberry left a comment

Choose a reason for hiding this comment

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

Stamped.

@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented May 11, 2020

💊 CI failures summary and remediations

As 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.

See how this bot performed.

This comment has been revised 15 times.

gchanan added 3 commits May 12, 2020 13:21
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]
@jeffdaily
Copy link
Copy Markdown
Collaborator

@gchanan please check #38380 for the correct/updated implementation of aten/src/ATen/native/cuda/AbsKernel.cu. CC @zasdfgbnm

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]

namespace at { namespace native {

// We manually overload abs because std::abs does not work with thrust::complex types and ROCm.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

@gchanan
Copy link
Copy Markdown
Contributor Author

gchanan commented May 13, 2020

@zasdfgbnm thanks, I'll put that in a follow up PR.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@gchanan merged this pull request in dac9b61.

@facebook-github-bot facebook-github-bot deleted the gh/gchanan/278/head branch May 17, 2020 14:18
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants