Skip to content

Commit 25fbc1e

Browse files
committed
Update on "[ONNX] Enable _jit_pass_onnx_fold_if only when dynamic_axes is None (#50582)"
Fixing pytorch/vision#3251 (PR #49410 triggers the torch vision test build failure, on three tests test_faster_rcnn, test_mask_rcnn, test_keypoint_rcnn. ) The offending PR is fine on pytorch UT, because the torchvision and pytorch test has a gap when we merge them - we are using different test API on two sides, therefore causing some discrepancy. This PR bridge the gap for the above three tests, and disable _jit_pass_onnx_fold_if pass until it gets fixed. Allow _jit_pass_onnx_fold_if only when dynamic_axes is None. [ghstack-poisoned]
2 parents 27cd74b + 41f3b4f commit 25fbc1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torch/csrc/jit/passes/onnx/shape_type_inference.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ Node* CloneNodeToGraph(
265265
int opset_version) {
266266
auto vals_to_params_map =
267267
buildValueToParamsMap(n->owningGraph()->block(), params_dict);
268-
auto clone_node =
269-
n_graph->createClone(n, [&n_graph, &vals_to_params_map, opset_version](Value* v) {
268+
auto clone_node = n_graph->createClone(
269+
n, [&n_graph, &vals_to_params_map, opset_version](Value* v) {
270270
auto v_n = v->node();
271271
switch (v_n->kind()) {
272272
case ::c10::onnx::Constant: {

0 commit comments

Comments
 (0)