From: Harut Movsisyan Date: Thu, 9 Sep 2021 21:35:00 +0000 (-0700) Subject: [Static Runtime] Fix resize_output_check warning coming from prim::VarConcat (#64765) X-Git-Tag: accepted/tizen/8.0/unified/20231005.095509~323 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ad75281f6dc55ed022ad61fca9fc91a3f76f0a8;p=platform%2Fupstream%2Fpytorch.git [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 --- 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); } };