Skip to content

Commit 675f868

Browse files
[release/2.8] Fix condition to enable NHWC Batchnorm (#2599)
Incorrect IFU merge avoids NHWC Batchnorm. Condition to enable NHWC Batchnorm fixed.
1 parent 9ea02c4 commit 675f868

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

aten/src/ATen/native/Normalization.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,6 @@ BatchNormBackend _select_batch_norm_backend(
541541
&& weight.defined() && bias.defined()
542542
&& ((running_mean.defined() && running_var.defined())
543543
|| (!running_mean.defined() && !running_var.defined() && training))
544-
&& input.suggest_memory_format() != MemoryFormat::ChannelsLast
545-
&& input.suggest_memory_format() != MemoryFormat::ChannelsLast3d
546544
&& (input.suggest_memory_format() == MemoryFormat::Contiguous
547545
#if (defined(USE_ROCM) && ROCM_VERSION >= 60500)
548546
|| (input.suggest_memory_format() == MemoryFormat::ChannelsLast && PYTORCH_MIOPEN_SUGGEST_NHWC_BATCHNORM)

0 commit comments

Comments
 (0)