diff -pruN 1.4-2/CMakeLists.txt 1.4.1-5.1/CMakeLists.txt
--- 1.4-2/CMakeLists.txt	2021-07-27 05:41:52.000000000 +0000
+++ 1.4.1-5.1/CMakeLists.txt	2021-10-27 14:02:17.000000000 +0000
@@ -15,7 +15,7 @@
 #
 
 cmake_minimum_required(VERSION 3.9)
-project(xir VERSION 1.4.0 LANGUAGES C CXX)
+project(xir VERSION 1.4.1 LANGUAGES C CXX)
 
 include(${CMAKE_SOURCE_DIR}/cmake/VitisCommon.cmake)
 
diff -pruN 1.4-2/debian/changelog 1.4.1-5.1/debian/changelog
--- 1.4-2/debian/changelog	2021-10-21 02:43:54.000000000 +0000
+++ 1.4.1-5.1/debian/changelog	2022-05-22 19:34:37.000000000 +0000
@@ -1,3 +1,50 @@
+xir (1.4.1-5.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Don't build with -Werror. (Closes: #1006582)
+
+ -- Adrian Bunk <bunk@debian.org>  Sun, 22 May 2022 22:34:37 +0300
+
+xir (1.4.1-5) unstable; urgency=medium
+
+  [ Vagrant Cascadian ]
+  * Pass -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON via dh_auto_configure override.
+    (Closes: #1005420)
+
+  [ Punit Agrawal ]
+  * Add a patch to remove build date from the embedded version
+    (Closes: #1005421)
+
+ -- Punit Agrawal <punit@debian.org>  Sun, 13 Feb 2022 16:36:14 +0900
+
+xir (1.4.1-4) unstable; urgency=medium
+
+  * Update d/control.
+    - Change Maintainer and Uploaders. Set team email address to Maintainer.
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Fri, 21 Jan 2022 04:35:15 +0900
+
+xir (1.4.1-3) unstable; urgency=medium
+
+  * Upload to unstable.
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Thu, 20 Jan 2022 10:04:28 +0900
+
+xir (1.4.1-2) experimental; urgency=medium
+
+  * Update d/control:
+      - Add armel to Support architecture.
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Wed, 19 Jan 2022 11:42:49 +0900
+
+xir (1.4.1-1) unstable; urgency=medium
+
+  * New upstream released.
+  * Update d/control
+    - Update Maintainer and Uploaders.
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Wed, 22 Dec 2021 20:45:12 +0900
+
 xir (1.4-2) unstable; urgency=medium
 
   * Update d/control.
diff -pruN 1.4-2/debian/control 1.4.1-5.1/debian/control
--- 1.4-2/debian/control	2021-10-21 02:43:54.000000000 +0000
+++ 1.4.1-5.1/debian/control	2022-02-13 07:32:22.000000000 +0000
@@ -1,8 +1,9 @@
 Source: xir
-Section: libs
+Maintainer: Debian Xilinx Package Maintainers <team+pkg-xilinx@tracker.debian.org>
+Uploaders: Punit Agrawal <punit@debian.org>,
+           Nobuhiro Iwamatsu <iwamatsu@debian.org>
 Priority: optional
-Maintainer: Punit Agrawal <punit@debian.org>
-Uploaders: Nobuhiro Iwamatsu <iwamatsu@debian.org>
+Section: libs
 Build-Depends: cmake, debhelper-compat (= 13),
 	libboost-dev,
 	libprotobuf-dev,
@@ -16,7 +17,7 @@ Vcs-Git: https://salsa.debian.org/xilinx
 Vcs-Browser: https://salsa.debian.org/xilinx-packages-team/vitis-ai/xir
 
 Package: libxir1
-Architecture: amd64 arm64 armhf
+Architecture: amd64 arm64 armhf armel
 Multi-Arch: same
 Depends: ${misc:Depends}, ${shlibs:Depends}
 Description: Xilinx Intermediate Representation (XIR) for deep learning algorithms (runtime)
@@ -53,7 +54,7 @@ Description: Xilinx Intermediate Represe
  This package provides the runtime environment for XIR.
 
 Package: libxir-dev
-Architecture: amd64 arm64 armhf
+Architecture: amd64 arm64 armhf armel
 Section: libdevel
 Multi-Arch: same
 Depends: ${misc:Depends}, ${shlibs:Depends}, libxir1 (= ${binary:Version})
@@ -91,7 +92,7 @@ Description: Xilinx Intermediate Represe
  This package provides the development environment for XIR.
 
 Package: libxir-utils
-Architecture: amd64 arm64 armhf
+Architecture: amd64 arm64 armhf armel
 Section: utils
 Depends: ${misc:Depends}, ${shlibs:Depends}, libxir1 (= ${binary:Version})
 Description: Xilinx Intermediate Representation (XIR) for deep learning algorithms (utils)
diff -pruN 1.4-2/debian/patches/0003-Install-cmake-files-in-multiarch-aware-locations.patch 1.4.1-5.1/debian/patches/0003-Install-cmake-files-in-multiarch-aware-locations.patch
--- 1.4-2/debian/patches/0003-Install-cmake-files-in-multiarch-aware-locations.patch	2021-10-21 02:43:54.000000000 +0000
+++ 1.4.1-5.1/debian/patches/0003-Install-cmake-files-in-multiarch-aware-locations.patch	2022-02-13 07:35:45.000000000 +0000
@@ -8,7 +8,7 @@ Subject: Install cmake files in multiarc
  2 files changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index d6f80ad..5ba5ed1 100644
+index 818f61c..18957e4 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
 @@ -35,7 +35,7 @@ add_subdirectory(src)
diff -pruN 1.4-2/debian/patches/0004-Convert-loop-variables-to-reference-type.patch 1.4.1-5.1/debian/patches/0004-Convert-loop-variables-to-reference-type.patch
--- 1.4-2/debian/patches/0004-Convert-loop-variables-to-reference-type.patch	2021-10-21 02:43:54.000000000 +0000
+++ 1.4.1-5.1/debian/patches/0004-Convert-loop-variables-to-reference-type.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,53 +0,0 @@
-From: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
-Date: Tue, 19 Oct 2021 10:01:34 +0900
-Subject: Convert loop variables to reference type
-MIME-Version: 1.0
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
-Recent versions of the compiler enable "-Werror=range-loop-construct"
-by default which leads to errors such as -
-
-    /src/xir/graph/elf2xir.cpp:403:19: error: loop variable ‘x’ creates a copy from type ‘const std::__cxx11::basic_string<char>’ [-Werror=range-loop-construct]
-      403 |   for (const auto x : v) {
-	  |                   ^
-    /src/xir/graph/elf2xir.cpp:403:19: note: use reference type to prevent copying
-      403 |   for (const auto x : v) {
-	  |                   ^
-	  |                   &
-
-Fix a couple of instances of the same problem by converting the loop
-variable to reference type.
-
-Closes: #996583
----
- src/xir/graph/elf2xir.cpp | 2 +-
- tools/cmd_graph.cpp       | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/xir/graph/elf2xir.cpp b/src/xir/graph/elf2xir.cpp
-index 7ea741f..b4bd084 100644
---- a/src/xir/graph/elf2xir.cpp
-+++ b/src/xir/graph/elf2xir.cpp
-@@ -400,7 +400,7 @@ static inline std::ostream& operator<<(std::ostream& out,
-                                        const std::vector<T>& v) {
-   int c = 0;
-   out << "[";
--  for (const auto x : v) {
-+  for (const auto &x : v) {
-     if (c++ != 0) {
-       out << ",";
-     }
-diff --git a/tools/cmd_graph.cpp b/tools/cmd_graph.cpp
-index 831fe8f..e9e1822 100644
---- a/tools/cmd_graph.cpp
-+++ b/tools/cmd_graph.cpp
-@@ -109,7 +109,7 @@ template <typename K, typename V>
- std::enable_if_t<is_cout_able_v<K> && is_cout_able_v<V>, std::ostream&>
- operator<<(std::ostream& out, const std::map<K, V>& v) {
-   out << "{";
--  for (const auto x : v) {
-+  for (const auto &x : v) {
-     out << "\n\t\"" << x.first << "\" = " << x.second;
-   }
-   out << "\n}";
diff -pruN 1.4-2/debian/patches/0005-cmake-vitis_version.c.in-Remove-the-build-date-from-.patch 1.4.1-5.1/debian/patches/0005-cmake-vitis_version.c.in-Remove-the-build-date-from-.patch
--- 1.4-2/debian/patches/0005-cmake-vitis_version.c.in-Remove-the-build-date-from-.patch	1970-01-01 00:00:00.000000000 +0000
+++ 1.4.1-5.1/debian/patches/0005-cmake-vitis_version.c.in-Remove-the-build-date-from-.patch	2022-02-13 07:35:45.000000000 +0000
@@ -0,0 +1,23 @@
+From: Vagrant Cascadian <vagrant@reproducible-builds.org>
+Date: Sun, 13 Feb 2022 03:48:45 +0000
+Subject: cmake/vitis_version.c.in: Remove the build date from the embedded
+ version.
+
+https://reproducible-builds.org/docs/timestamps/
+---
+ cmake/vitis_version.c.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/vitis_version.c.in b/cmake/vitis_version.c.in
+index fac4055..70ffc70 100644
+--- a/cmake/vitis_version.c.in
++++ b/cmake/vitis_version.c.in
+@@ -17,7 +17,7 @@ const char* xilinx_@PROJECT_NAME@_version() {
+     return "@PROJECT_NAME@-@GIT_VERSION@@VERSION_SUFFIX@"; 
+ }
+ 
+-static char @PROJECT_NAME@_version[] = "Xilinx @PROJECT_NAME@ Version: @PROJECT_NAME@-@GIT_VERSION@@VERSION_SUFFIX@ @BUILD_DATE@";
++static char @PROJECT_NAME@_version[] = "Xilinx @PROJECT_NAME@ Version: @PROJECT_NAME@-@GIT_VERSION@@VERSION_SUFFIX@";
+ const char* xilinx_version() {
+   return @PROJECT_NAME@_version;
+ }
diff -pruN 1.4-2/debian/patches/0006-No-Werror.patch 1.4.1-5.1/debian/patches/0006-No-Werror.patch
--- 1.4-2/debian/patches/0006-No-Werror.patch	1970-01-01 00:00:00.000000000 +0000
+++ 1.4.1-5.1/debian/patches/0006-No-Werror.patch	2022-05-22 19:34:37.000000000 +0000
@@ -0,0 +1,24 @@
+Description: Don't build with -Werror
+ Thie frequently breaks when new gcc or OpenSSL versions bring new warnings.
+Author: Adrian Bunk <bunk@debian.org>
+Bug-Debian: https://bugs.debian.org/1006582
+
+--- xir-1.4.1.orig/cmake/VitisCommon.cmake
++++ xir-1.4.1/cmake/VitisCommon.cmake
+@@ -16,11 +16,11 @@
+ 
+ set (CMAKE_CXX_STANDARD 14)
+ set (CMAKE_C_STANDARD 99)
+-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Werror -ggdb -O0 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-inline")
+-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -Wall -Werror")
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 -Wall -Werror")
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
+-set(CMAKE_EXE "${CMAKE_C_FLAGS} -Wall -Werror")
++set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -ggdb -O0 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-inline")
++set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -Wall")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 -Wall")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
++set(CMAKE_EXE "${CMAKE_C_FLAGS} -Wall")
+ set(CMAKE_SHARED_LINKER_FLAGS  "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
+ 
+ set(CMAKE_MACOSX_RPATH 1)
diff -pruN 1.4-2/debian/patches/Fix-FTBFS-with-Werror-range-loop-construct-Closes-99.patch 1.4.1-5.1/debian/patches/Fix-FTBFS-with-Werror-range-loop-construct-Closes-99.patch
--- 1.4-2/debian/patches/Fix-FTBFS-with-Werror-range-loop-construct-Closes-99.patch	2021-10-21 02:43:54.000000000 +0000
+++ 1.4.1-5.1/debian/patches/Fix-FTBFS-with-Werror-range-loop-construct-Closes-99.patch	2022-02-13 07:35:45.000000000 +0000
@@ -1,4 +1,3 @@
-From 488f0aaba5bb0b71feee801d82000d9e6a20144a Mon Sep 17 00:00:00 2001
 From: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
 Date: Tue, 19 Oct 2021 10:44:56 +0900
 Subject: [PATCH] Fix FTBFS with '-Werror=range-loop-construct' (Closes:
@@ -36,6 +35,3 @@ index 831fe8f..e9e1822 100644
      out << "\n\t\"" << x.first << "\" = " << x.second;
    }
    out << "\n}";
--- 
-2.33.0
-
diff -pruN 1.4-2/debian/patches/series 1.4.1-5.1/debian/patches/series
--- 1.4-2/debian/patches/series	2021-10-21 02:43:54.000000000 +0000
+++ 1.4.1-5.1/debian/patches/series	2022-05-22 19:34:37.000000000 +0000
@@ -2,3 +2,5 @@
 0002-Drop-dependency-on-source-repository-hash.patch
 0003-Install-cmake-files-in-multiarch-aware-locations.patch
 Fix-FTBFS-with-Werror-range-loop-construct-Closes-99.patch
+0005-cmake-vitis_version.c.in-Remove-the-build-date-from-.patch
+0006-No-Werror.patch
diff -pruN 1.4-2/debian/rules 1.4.1-5.1/debian/rules
--- 1.4-2/debian/rules	2021-10-21 02:43:54.000000000 +0000
+++ 1.4.1-5.1/debian/rules	2022-02-13 07:32:41.000000000 +0000
@@ -5,7 +5,9 @@ export DEB_BUILD_MAINT_OPTIONS = hardeni
 export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
-CONFIGURE_ARGS = -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG=""
+CONFIGURE_ARGS = -DCMAKE_BUILD_TYPE=Debug \
+                 -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON \
+                 -DCMAKE_CXX_FLAGS_DEBUG="-std=c++17"
 
 %:
 	dh $@
diff -pruN 1.4-2/src/xir/op/built_in_ops.cpp 1.4.1-5.1/src/xir/op/built_in_ops.cpp
--- 1.4-2/src/xir/op/built_in_ops.cpp	2021-07-27 05:41:52.000000000 +0000
+++ 1.4.1-5.1/src/xir/op/built_in_ops.cpp	2021-10-27 14:02:17.000000000 +0000
@@ -13,39 +13,32 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "xir/op/built_in_ops.hpp"
-
 #include <functional>
 
+#include "xir/op/built_in_ops.hpp"
 #include "xir/op/shape_inference.hpp"
 
 using namespace xir;
 
 #define XIR_REGISTER_BUILT_IN_OP(OP)                                           \
-  static BuiltInOPsRegisterer BUILT_IN_OPDEFS_##OP(OP);
+  static BuiltInOPsRegister BUILT_IN_OPDEFS_##OP(OP);
 
-class BuiltInOPsRegistry {
+class BuiltInOPsRegister {
  public:
-  static std::vector<xir::OpDef> BUILT_IN_OPS_;
-  BuiltInOPsRegistry() = default;
+  BuiltInOPsRegister(const xir::OpDef& def) { add_op_def(def); }
+
   static void add_op_def(const xir::OpDef& def) {
     BUILT_IN_OPS_.push_back(std::move(def));
   }
-};
-
-std::vector<xir::OpDef> BuiltInOPsRegistry::BUILT_IN_OPS_ =
-    std::vector<xir::OpDef>{};
 
-class BuiltInOPsRegisterer {
- public:
-  BuiltInOPsRegisterer(const xir::OpDef& def) {
-    BuiltInOPsRegistry::add_op_def(def);
-  }
+  static std::vector<xir::OpDef> BUILT_IN_OPS_;
 };
 
+std::vector<xir::OpDef> BuiltInOPsRegister::BUILT_IN_OPS_ = {};
+
 void register_built_in_ops(xir::OpDefFactory* self) {
-  std::for_each(BuiltInOPsRegistry::BUILT_IN_OPS_.begin(),
-                BuiltInOPsRegistry::BUILT_IN_OPS_.end(),
+  std::for_each(BuiltInOPsRegister::BUILT_IN_OPS_.begin(),
+                BuiltInOPsRegister::BUILT_IN_OPS_.end(),
                 [self](const xir::OpDef& def) { self->register_h(def); });
 }
 
@@ -401,9 +394,7 @@ std::function<void(xir::OpDef&)> FixedCo
         "The padding sizes of input feature maps. "
         "The value must be `{left, right, top, bottom}`.\n\n"
         "For transposed convolutions, the padding here denotes the "
-        "`{kernel_size - 1 - actual_padding}`."
-        "This is an optional attribute, when the pad_mode is SAME or VALID, "
-        "you don't need to specify this attribute.",
+        "`{kernel_size - 1 - actual_padding}`.",
         {0, 0, 0, 0});
     auto nonlinear = xir::AttrDefBuilder<std::string>::build(
         "nonlinear", AttrDef::OPTIONAL,
@@ -514,9 +505,7 @@ std::function<void(xir::OpDef&)> Pool2dO
         "pad", AttrDef::OPTIONAL, 4,
         "`Datatype`: `vector<int>`\n\n"
         "The padding sizes of input feature maps. "
-        "The value must be `{left, right, top, bottom}`. "
-        "This is an optional attribute, when the pad_mode is SAME or VALID, "
-        "you don't need to specify this attribute.",
+        "The value must be `{left, right, top, bottom}`.",
         {0, 0, 0, 0});
     auto global = xir::AttrDefBuilder<bool>::build(
         "global", AttrDef::OPTIONAL,
@@ -1442,22 +1431,23 @@ std::function<void(xir::OpDef&)> PadOpDe
   };
 }
 
-auto pad =
-    xir::OpDef("pad")
-        .inherit_from(PadOpDefGenerator(xir::DataType::FLOAT))
-        .add_attr(xir::AttrDefBuilder<std::vector<float>>::build(
-            "constant_values", AttrDef::REQUIRED, 0,
-            "`Datatype`: `vector<float>`\n\n"
-            "the value set into the padded locations, 2 * len(paddings)"))
-        .set_shape_infer(xir::shape_infer_pad);
+auto pad = xir::OpDef("pad")
+               .inherit_from(PadOpDefGenerator(xir::DataType::FLOAT))
+               .add_attr(xir::AttrDefBuilder<std::vector<float>>::build(
+                   "constant_values", AttrDef::OPTIONAL, 0,
+                   "`Datatype`: `vector<float>`\n\n"
+                   "the value set into the padded locations, 2 * len(paddings)",
+                   {}))
+               .set_shape_infer(xir::shape_infer_pad);
 
 auto pad_fix =
     xir::OpDef("pad-fix")
         .inherit_from(PadOpDefGenerator(xir::DataType::XINT))
         .add_attr(xir::AttrDefBuilder<std::vector<char>>::build(
-            "constant_values", AttrDef::REQUIRED, 0,
+            "constant_values", AttrDef::OPTIONAL, 0,
             "`Datatype`: `vector<char>`\n\n"
-            "the value set into the padded locations, 2 * len(paddings)"))
+            "the value set into the padded locations, 2 * len(paddings)",
+            {}))
         .set_shape_infer(xir::shape_infer_pad_fix);
 
 XIR_REGISTER_BUILT_IN_OP(pad);
diff -pruN 1.4-2/src/xir/op/built_in_ops.hpp 1.4.1-5.1/src/xir/op/built_in_ops.hpp
--- 1.4-2/src/xir/op/built_in_ops.hpp	2021-07-27 05:41:52.000000000 +0000
+++ 1.4.1-5.1/src/xir/op/built_in_ops.hpp	2021-10-27 14:02:17.000000000 +0000
@@ -19,6 +19,6 @@
 
 #include "xir/op/op_def.hpp"
 
-class BuiltInOPsRegisterer;
+class BuiltInOPsRegister;
 
 void register_built_in_ops(xir::OpDefFactory* self);
diff -pruN 1.4-2/src/xir/op/op_def_factory_imp.cpp 1.4.1-5.1/src/xir/op/op_def_factory_imp.cpp
--- 1.4-2/src/xir/op/op_def_factory_imp.cpp	2021-07-27 05:41:52.000000000 +0000
+++ 1.4.1-5.1/src/xir/op/op_def_factory_imp.cpp	2021-10-27 14:02:17.000000000 +0000
@@ -14,17 +14,17 @@
  * limitations under the License.
  */
 
-#include "xir/op/op_def_factory_imp.hpp"
-#include "xir/attrs/attrs.hpp"
-#include "xir/op/built_in_ops.hpp"
-
-#include "UniLog/UniLog.hpp"
-
 #include <dlfcn.h>
 #include <iostream>
 #include <iterator>
+#include <mutex>
 #include <sstream>
 
+#include "UniLog/UniLog.hpp"
+#include "xir/attrs/attrs.hpp"
+#include "xir/op/built_in_ops.hpp"
+#include "xir/op/op_def_factory_imp.hpp"
+
 namespace xir {
 
 static vector<string> str_split(const string& str) {
@@ -52,7 +52,9 @@ static void load_ops_library(OpDefFactor
   reg_func(self);
 }
 
+std::mutex factory_mutex;
 const OpDefFactoryImp* op_def_factory() {
+  std::lock_guard<std::mutex> gaurd(factory_mutex);
   static unique_ptr<OpDefFactoryImp> self;
   if (!self) {
     self = make_unique<OpDefFactoryImp>();
diff -pruN 1.4-2/src/xir/op/shape_inference.cpp 1.4.1-5.1/src/xir/op/shape_inference.cpp
--- 1.4-2/src/xir/op/shape_inference.cpp	2021-07-27 05:41:52.000000000 +0000
+++ 1.4.1-5.1/src/xir/op/shape_inference.cpp	2021-10-27 14:02:17.000000000 +0000
@@ -1627,13 +1627,15 @@ void shape_infer_conv2d_fix(xir::Op* cur
     std::transform(tmp.begin(), tmp.end(), padding.begin(),
                    [](auto i) { return i; });
   }
-  oh = std::ceil((in_shape[1] + padding[2] + padding[3] -
-                  (kernel[1] - 1) * dilation[1] - 1) /
-                 stride[1]) +
-       1;
-  ow = std::ceil((in_shape[2] + padding[0] + padding[1] -
-                  (kernel[0] - 1) * dilation[0] - 1) /
-                 stride[0]) +
+  oh = std::floor(1.0f *
+                  (in_shape[1] + padding[2] + padding[3] -
+                   (kernel[1] - 1) * dilation[1] - 1) /
+                  stride[1]) +
+       1;
+  ow = std::floor(1.0f *
+                  (in_shape[2] + padding[0] + padding[1] -
+                   (kernel[0] - 1) * dilation[0] - 1) /
+                  stride[0]) +
        1;
   oc = w_shape[0];
   std::vector<std::int32_t> new_out_shape = {in->get_shape().at(0), oh, ow, oc};
@@ -1672,13 +1674,15 @@ void shape_infer_depthwise_conv2d_fix(xi
     std::transform(tmp.begin(), tmp.end(), padding.begin(),
                    [](auto i) { return i; });
   }
-  oh = std::ceil((in_shape[1] + padding[2] + padding[3] -
-                  (kernel[1] - 1) * dilation[1] - 1) /
-                 stride[1]) +
-       1;
-  ow = std::ceil((in_shape[2] + padding[0] + padding[1] -
-                  (kernel[0] - 1) * dilation[0] - 1) /
-                 stride[0]) +
+  oh = std::floor(1.0f *
+                  (in_shape[1] + padding[2] + padding[3] -
+                   (kernel[1] - 1) * dilation[1] - 1) /
+                  stride[1]) +
+       1;
+  ow = std::floor(1.0f *
+                  (in_shape[2] + padding[0] + padding[1] -
+                   (kernel[0] - 1) * dilation[0] - 1) /
+                  stride[0]) +
        1;
   oc = w_shape[0] * w_shape[3];
   std::vector<std::int32_t> new_out_shape = {in->get_shape().at(0), oh, ow, oc};
@@ -1799,11 +1803,11 @@ void shape_infer_pool_fix(xir::Op* cur)
     std::transform(tmp.begin(), tmp.end(), padding.begin(),
                    [](auto i) { return i; });
   }
-  oh = std::ceil((in_shape[1] + padding[2] + padding[3] - kernel[1]) /
-                 stride[1]) +
+  oh = std::floor(1.0f * (in_shape[1] + padding[2] + padding[3] - kernel[1]) /
+                  stride[1]) +
        1;
-  ow = std::ceil((in_shape[2] + padding[0] + padding[1] - kernel[0]) /
-                 stride[0]) +
+  ow = std::floor(1.0f * (in_shape[2] + padding[0] + padding[1] - kernel[0]) /
+                  stride[0]) +
        1;
   oc = in_shape[3];
   std::vector<std::int32_t> new_out_shape = {in->get_shape().at(0), oh, ow, oc};
