-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Improved speed of frobenous norm for non-complex dtype #30871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I think you meant gh-30281 here? Cc @ngoldbaum for this change |
FWIW, here’s the deeplink to the relevant change from #30281: https://github.com/pytorch/pytorch/pull/30281/files#diff-d9318428a98d4f4d86210a8f4a736ebd. Is the output of |
@dylanbespalko Heads up that I will be out of country for three weeks so you'll need to find someone else to merge this PR. |
if (tensor.device().type() != DeviceType::CPU) { | ||
throw TypeError( | ||
"can't convert %s device type tensor to numpy. Use Tensor.cpu() to " | ||
"copy the tensor to host memory first.", tensor.device().type()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, does this really do printf style formatting strings? News to me.
My limited understanding is that Anyways, the backend checks are supposed to migrate into DeviceType, Layout, Dtype checks as described in PyTorch Internals. |
Hopefully you are going on a much needed vacation. Happy holidays. |
@VitalyFedyunin, @cpuhrsch, @gchanan, Hey Guys, @ezyang is away on vacation. Can you forward me to someone that can merge this PR? Pulling changes from master and re-running CI. cc @ MuawizChaudhary |
💊 CircleCI build failures summary and rem 8000 ediationsAs of commit 221bc7d:
Detailed failure analysisOne may explore the probable reasons each build failed interactively on the Dr. CI website. 🕵️ 1 new failure recognized by patternsThe following build failures do not appear to be due to upstream breakage:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
I'm back from my FPGA adventure. I am looking to split my time between the CPU and FPGA for the next while and I plan to improve my CUDA coverage when I get a new PC. Let me know if this PR is too old. |
Nope, this pr is good, just gotta land it. Are you gonna blog about your FPGA adventures? :) |
Yes, I think I can write a good blog. I'll let you know when I post it. |
Summary: In-tree changes to pytorch to support complex numbers are being submitted here. Out-of-tree support for CUDA complex numbers is here: [pytorch-cuda-strided-complex extension](https://gitlab.com/pytorch-complex/pytorch-cuda-strided-complex) Changes: [x] Fixed performance issue raise in pytorch#30704 so that non-complex numbers do not call `conj()` and `real()`. [x] Fixed tensor_to_numpy() conversion likely broken by a `checkBackend()` in pytorch#27064. [x] Fixed some ReduceOps and TensorCompare Ops that recently added a `checkBackend()`. - `checkBackend()` is replaced with a device type check and a layout check. - This ensures the ComplexCPU Type ID is supported. [x] Added AVX support for complex `exp()`, as requested in pytorch#755 Pull Request resolved: pytorch#30871 Differential Revision: D19200726 Pulled By: ezyang fbshipit-source-id: d7e1be0b0a89c5d6e5f4a68ce5fcd2adc5b88277
Summary: In-tree changes to pytorch to support complex numbers are being submitted here. Out-of-tree support for CUDA complex numbers is here: [pytorch-cuda-strided-complex extension](https://gitlab.com/pytorch-complex/pytorch-cuda-strided-complex) Changes: [x] Fixed performance issue raise in pytorch#30704 so that non-complex numbers do not call `conj()` and `real()`. [x] Fixed tensor_to_numpy() conversion likely broken by a `checkBackend()` in pytorch#27064. [x] Fixed some ReduceOps and TensorCompare Ops that recently added a `checkBackend()`. - `checkBackend()` is replaced with a device type check and a layout check. - This ensures the ComplexCPU Type ID is supported. [x] Added AVX support for complex `exp()`, as requested in pytorch#755 Pull Request resolved: pytorch#30871 Differential Revision: D19200726 Pulled By: ezyang fbshipit-source-id: d7e1be0b0a89c5d6e5f4a68ce5fcd2adc5b88277
In-tree changes to pytorch to support complex numbers are being submitted here.
Out-of-tree support for CUDA complex numbers is here: pytorch-cuda-strided-complex extension
Changes:
[x] Fixed performance issue raise in #30704 so that non-complex numbers do not call
conj()
andreal()
.[x] Fixed tensor_to_numpy() conversion likely broken by a
checkBackend()
in #27064.[x] Fixed some ReduceOps and TensorCompare Ops that recently added a
checkBackend()
.-
checkBackend()
is replaced with a device type check and a layout check.- This ensures the ComplexCPU Type ID is supported.
[x] Added AVX support for complex
exp()
, as requested in #755