Skip to content

Conversation

@ifedan
Copy link
Contributor

@ifedan ifedan commented Aug 21, 2019

@pytorchbot pytorchbot added module: cpu CPU specific problem (e.g., perf, algorithm) module: cuda Related to torch.cuda, and CUDA support in general module: internals Related to internal abstractions in c10 and ATen module: operators labels Aug 21, 2019
});
}

static void erfinv_kernel(TensorIterator& iter) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to implement this method to be able to use dispatch. It will implemented when merging with correspondent CPU PR: #24908

@ifedan
Copy link
Contributor Author

ifedan commented Aug 21, 2019

image

@ifedan ifedan requested a review from VitalyFedyunin August 21, 2019 04:30
}

void erfinv_kernel_cuda(TensorIterator& iter) {
AT_DISPATCH_FLOATING_TYPES_AND_HALF(iter.dtype(), "erfinv_cuda", [&]() {
Copy link
Contributor

Choose a reason for hiding this comment

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

_AND_HALF?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently it's generated for FLOAT, DOUBLE and HALF

@ifedan ifedan requested a review from VitalyFedyunin August 22, 2019 22:37
@ifedan
Copy link
Contributor Author

ifedan commented Aug 23, 2019

@pytorchbot retest this please

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ifedan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

/*check_mem_overlap=*/true); \
op##_stub(iter.device_type(), iter); \
return result; \
#define IMPLEMENT_UNARY_OP_CORE(op) \
Copy link
Contributor

Choose a reason for hiding this comment

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

There are many reasons not to use macro (terrible debug experience). Please check #24879 if solution is suitable for you.

Copy link
Contributor

@VitalyFedyunin VitalyFedyunin left a comment

Choose a reason for hiding this comment

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

Overall good,, but I rather wait #24879 to land and use helpers from it.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ifedan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Aug 28, 2019
Summary:
pytorch/pytorch#24560
Pull Request resolved: pytorch/pytorch#24943

Differential Revision: D16996434

Pulled By: ifedan

fbshipit-source-id: 77111a4e47bb2b20f65225d48e7213cd77ddae19
@facebook-github-bot
Copy link
Contributor

@ifedan merged this pull request in afb7a16.

facebook-github-bot pushed a commit that referenced this pull request Sep 10, 2019
…ble (#25337)

Summary:
This best preserves accuracy, while erfinvf() should be used for half and float.

This is also consistent with the implementation before the migration: #24943
Pull Request resolved: #25337

Differential Revision: D17102333

Pulled By: zou3519

fbshipit-source-id: 5178cff534cf5f10d86ab04d4b6c1779ffedf49e
zdevito pushed a commit to zdevito/ATen that referenced this pull request Sep 10, 2019
…ble (#25337)

Summary:
This best preserves accuracy, while erfinvf() should be used for half and float.

This is also consistent with the implementation before the migration: pytorch/pytorch#24943
Pull Request resolved: pytorch/pytorch#25337

Differential Revision: D17102333

Pulled By: zou3519

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

Labels

Merged module: cpu CPU specific problem (e.g., perf, algorithm) module: cuda Related to torch.cuda, and CUDA support in general module: internals Related to internal abstractions in c10 and ATen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants