pytorch
c9bd7387 - adds elementwise opinfos and unary references, extends to out testing

Commit
3 years ago
adds elementwise opinfos and unary references, extends to out testing This PR makes the following changes: Prims: - igamma and igammac are now correctly listed as elementwise binary operations, not elementwise unary operations - elementwise prims now must specify their type promotion kind (this is currently unused) Refs: - complexhalf is now handled by opmath-style type promotion - adds references for: abs, acos, acosh, asin, atan, ceil, cos, cosh, digamma, erf, erfinv, erfc, exp, expm1, isfinite, isnan, lgamma, log, log1p, neg, reciprocal, sign, sin, sinh, sqrt, square, tan, igamma, igammac - adds "complex to float" and "bool to long" type promotion kinds - updates out behavior to warn when resizing a non-empty tensor, consistent with current ops - updates the elementwise unary reference template with type promotion Tests: - fixes torch.pow's OpInfo to correctly specify it only supports one scalar input, not two - fixes elementwise binary reference inputs to not attempt generating certain tensors in complex half (for now, cc @kshitij12345) - adds OpInfos for the following Python references: abs, acos, acosh, asin, atan, ceil, cos, cosh, digamma, erf, erfinv, erfc, exp, expm1, isfinite, isnan, lgamma, log, log1p, neg, reciprocal, round, sign, sin, sinh, sqrt, square, tan, atan2, bitwise_and, bitwise_left_shift, bitwise_or, bitwise_xor, eq, float_power, ge, gt, igamma, igammac, le, lt, maximum, minimum, mul, ne, nextafter, pow, sub, true_divide Pull Request resolved: https://github.com/pytorch/pytorch/pull/76647 Approved by: https://github.com/ngimel
Author
Mike Ruberry
Committer
Parents
Loading