BatchNorm autodiff re-enabled (#57321)
authorjiej <jiej@nvidia.com>
Sat, 21 Aug 2021 16:05:04 +0000 (09:05 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Sat, 21 Aug 2021 16:07:31 +0000 (09:07 -0700)
commite926f75b0bc66c789365cb1c48ba41e8447b97fb
tree180ff950b7152ca56c0805e1e88266e9c3724947
parent37d60c08e547e63cef8a80a9e187c4d5e3b9b418
BatchNorm autodiff re-enabled (#57321)

Summary:
Turns on BN in autodiff:

1. outputs an empty tensor for running stats to by pass autodiff issue on None;
2. fixing BN inference backward in cudnn & miopen, where backward falls back to native batchnorm kernel instead;

Pull Request resolved: https://github.com/pytorch/pytorch/pull/57321

Reviewed By: albanD, ngimel

Differential Revision: D30250419

Pulled By: jansel

fbshipit-source-id: a62553789c20fb50a820003a056f40d9d642dfaa
aten/src/ATen/native/Normalization.cpp
aten/src/ATen/native/cuda/Normalization.cu
aten/src/ATen/native/cudnn/BatchNorm.cpp
aten/src/ATen/native/miopen/BatchNorm_miopen.cpp
test/test_jit.py
torch/csrc/jit/runtime/symbolic_script.cpp
torch/testing/_internal/jit_metaprogramming_utils.py