pytorch
6d54c5dd - Missing host device (#29547)

Commit
5 years ago
Missing host device (#29547) Summary: Missing `__device__` and `__host__` annotations in the complex case. Make it less UB. Note that this still rather unsavory code: `std::real` is only `constexpr` from C++14 on onwards ( https://en.cppreference.com/w/cpp/numeric/complex/real2 ) which is the requirement for `__device__`. What I am trying to say is: this particular piece of code should not have passed review and not been merged, IMHO, as it tries to codify UB. Also note that the benchmarks referenced in source were CPU and CUDA-only. Pull Request resolved: https://github.com/pytorch/pytorch/pull/29547 Differential Revision: D18428156 Pulled By: bddppq fbshipit-source-id: 855ced903ef91bd7f82fcd3a2167ae59bdd30d8b
Author
Parents
Loading