From 9ad75281f6dc55ed022ad61fca9fc91a3f76f0a8 Mon Sep 17 00:00:00 2001 From: Harut Movsisyan Date: Thu, 9 Sep 2021 14:35:00 -0700 Subject: [PATCH] [Static Runtime] Fix resize_output_check warning coming from prim::VarConcat (#64765) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/64765 Test Plan: Tested the fix with BR v1 model predictor-replayer setup. Reviewed By: ajyu Differential Revision: D30846506 fbshipit-source-id: 3ef3c93f11285c7cd1e2b188ca298a7ab4fba579 --- torch/csrc/jit/runtime/static/ops.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/torch/csrc/jit/runtime/static/ops.cpp b/torch/csrc/jit/runtime/static/ops.cpp index 62f5bb2..b09cede 100644 --- a/torch/csrc/jit/runtime/static/ops.cpp +++ b/torch/csrc/jit/runtime/static/ops.cpp @@ -1833,6 +1833,7 @@ REGISTER_OPERATOR_FUNCTOR( check_cat_no_zero_dim(inputs); dim = legacy_cat_wrap_dim(dim, inputs); auto& out_t = p_node->Output(0).toTensor(); + fastResizeToZero(out_t); at::native::_cat_out_cpu(inputs, dim, out_t); } }; -- 2.7.4