Conversation
|
why do we need |
|
@anjali411 There is a Although I doubt that |
💊 CI failures summary and remediationsAs of commit 275d08a (more details on the Dr. CI page): ✅ None of the CI failures appear to be your fault 💚
🚧 2 fixed upstream failures:These were probably caused by upstream breakages that were already fixed.
Please rebase on the
|
| template<> | ||
| constexpr std::complex<double> real_impl <std::complex<double>> (std::complex<double> z) { | ||
| return std::complex<double>(z.real(), 0.0); | ||
| constexpr c10::complex<double> real_impl <c10::complex<double>> (c10::complex<double> z) { |
There was a problem hiding this comment.
Looks like this is not needed, std::real should work. @anjali411 Please hold on and I will let you know when this is ready.
Edit: No, I think this PR is fine. std::real is not defined for BFloat and Half, so we still need this real_impl trick.
| template<> | ||
| inline std::complex<float> zabs <std::complex<float>> (std::complex<float> z) { | ||
| return std::complex<float>(std::abs(z)); | ||
| inline c10::complex<float> zabs <c10::complex<float>> (c10::complex<float> z) { |
There was a problem hiding this comment.
This should be still needed.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@anjali411 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@anjali411 merged this pull request in bf499cc. |
Summary: There is now a `zmath.h` and `zmath_std.h`, where the latter is the copy-paste of the original `zmath.h` and supporting `std::complex`, and `zmath.h` is for supporting `c10::complex`. `zmath_std.h` will be removed eventually. Pull Request resolved: pytorch#38037 Differential Revision: D21518177 Pulled By: anjali411 fbshipit-source-id: 18552e955dc31f95870f34962d709de0444804f6
There is now a
zmath.handzmath_std.h, where the latter is the copy-paste of the originalzmath.hand supportingstd::complex, andzmath.his for supportingc10::complex.zmath_std.hwill be removed eventually.