pytorch
d63dd07f - Add JIT support for cmath unary ops (#54089)

Commit
5 years ago
Add JIT support for cmath unary ops (#54089) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/54089 **This PR adds:** 1. support for the following [cmath](https://docs.python.org/3/library/cmath.html) functions: - Power and logarithmic functions (`cmath.{exp, log, log10, sqrt}`) - Trigonometric functions (`cmath.{sin, cos, tan, asin, acos, atan}`) - Hyperbolic functions (`cmath.{sinh, cos, tanh, asinh, acosh, atanh}`) - `cmath.phase()` 2. `abs()` **Future work:** 1. support - `cmath.{polar, rect}` - classification functions (`cmath.{isfinite, isnan, isinf, isclose}`) - constants (`cmath.{pi, e, inf, nan, infj, nanj}`) Test Plan: Imported from OSS Reviewed By: ezyang Differential Revision: D27339149 Pulled By: anjali411 fbshipit-source-id: fe1a019c95adbc9f27f7948eb28c0c3b93d8c026
Author
Parents
Loading