pytorch
450949c7 - Complex support on GPU for dynamic casting (#29612)

Commit
5 years ago
Complex support on GPU for dynamic casting (#29612) Summary: Currently, the dynamic casting mechanism is implemented assuming no support of complex on GPU. This will no longer be true in the soon future. https://github.com/pytorch/pytorch/pull/29547 could clear some clang warning but the complex support on GPU is still not complete: - fetch is not supported - casting between complex64 and complex128 is not supported - complex scalar types are not tested This PR is what should be done for type promotion in order to add support to complex dtype on GPU, as suggested in https://github.com/pytorch/pytorch/issues/755#issuecomment-552631381 Note that what is newly added here in this PR is not tested due to the lack of basic support of complex dtypes (I can not construct a complex tensor). But his PR shouldn't break any existing part of PyTorch. For the merge this PR, consider two options: - We could merge this PR now so that dylanbespalko could conveniently work based on master, if there is something wrong here not found by code review, dylanbespalko would find when adding complex integration. - Or, we could just leave this PR open, don't merge it. But then dylanbespalko might need to manually apply this to his branch in order to support type promotion of complex. Pull Request resolved: https://github.com/pytorch/pytorch/pull/29612 Differential Revision: D18451061 Pulled By: ezyang fbshipit-source-id: 6d4817e87f0cc2e844dc28c0355a7e53220933a6
Author
Parents
Loading