diff options
author | 2017-05-10 19:40:46 -0700 | |
---|---|---|
committer | 2017-05-11 10:52:09 -0700 | |
commit | 947fc02a3bfc9bbddac37be2a252c9b7f1b3598b (patch) | |
tree | 0780a19ead5e41a4e58b13b985b14c9fec7a8f7b /tensorflow/compiler/xla/util.cc | |
parent | 326ee1883f873695540e7a85f07f52b24e5974a4 (diff) |
Fold Pad into ReduceWindow.
PiperOrigin-RevId: 155705565
Diffstat (limited to 'tensorflow/compiler/xla/util.cc')
-rw-r--r-- | tensorflow/compiler/xla/util.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/util.cc b/tensorflow/compiler/xla/util.cc index 2f0f6a426f..d467178cb5 100644 --- a/tensorflow/compiler/xla/util.cc +++ b/tensorflow/compiler/xla/util.cc @@ -206,6 +206,15 @@ PaddingConfig MakeNoPaddingConfig(int64 rank) { return padding_config; } +bool HasInteriorPadding(const PaddingConfig& config) { + for (const auto& dim : config.dimensions()) { + if (dim.interior_padding() != 0) { + return true; + } + } + return false; +} + string HumanReadableNumFlops(double flops, double nanoseconds) { if (nanoseconds == 0) { return "NaN FLOP/s"; |