[StreamExecutor] Allow null batch_mean/batch_var in calls to BatchNormalizationForward.
authorJustin Lebar <jlebar@google.com>
Sun, 17 Dec 2017 17:43:37 +0000 (09:43 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Mon, 18 Dec 2017 19:17:54 +0000 (11:17 -0800)
commit01da208158687c575a9c459cb62e3c5f90968bd2
tree5f22462d43cb590406d00b572a81ad345da467eb
parent6c55eb1c61d645b214cb9deb97d1659001dadf34
[StreamExecutor] Allow null batch_mean/batch_var in calls to BatchNormalizationForward.

cudnn allows these pointers to be null, so we should too.  This lets us
avoid an unnecessary ThenMemZero, and lets callers avoid an unnecessary
allocation.

PiperOrigin-RevId: 179350594
tensorflow/stream_executor/cuda/cuda_dnn.cc