pytorch
28bfdbb0 - OpInfo for `nn.functional.batch_norm` (#63218)

Commit
3 years ago
OpInfo for `nn.functional.batch_norm` (#63218) Summary: Addresses https://github.com/facebookresearch/functorch/issues/78 and https://github.com/pytorch/pytorch/issues/54261. * There exists `torch.batch_norm` but it takes an extra arg: `cudnn_enabled` (not there in functional variant). This is passed from the functional variant to `torch.batch_norm` here: https://github.com/pytorch/pytorch/blob/master/torch/nn/functional.py#L2282. `test_variant_consistency_jit` fails with an error: (when passed an alias) ```python File "/home/krshrimali/Documents/Projects/Quansight/pytorch/test/test_ops.py", line 457, in _test_consistency_helper variant_forward = variant(cloned, TypeError: batch_norm() missing 1 required positional arguments: "cudnn_enabled" ``` * I'm not sure of a solution to this, as AFIK - there is no way to pass a lambda wrapper for an alias. Hence, I've skipped adding this as an alias there. * On second thought, is this even an alias? cc: mruberry zou3519 kshitij12345 Pull Request resolved: https://github.com/pytorch/pytorch/pull/63218 Reviewed By: bdhirsh Differential Revision: D31019785 Pulled By: zou3519 fbshipit-source-id: 2a834d05835da975289efc544a7ad7e98c99438f
Author
Parents
Loading