From 3b71f2e1f2c4cfb651208a938d9080cd0e061e46 Mon Sep 17 00:00:00 2001 From: Lu Fang Date: Wed, 3 Apr 2019 13:08:21 -0700 Subject: [PATCH] Pin onnx ir_version to 4 (#18768) Summary: to make test_operators.py more stable. in future, we will bump this up manually, and I think it's acceptable, since ir_version should be bumped too often. Pull Request resolved: https://github.com/pytorch/pytorch/pull/18768 Reviewed By: zrphercule Differential Revision: D14741514 Pulled By: houseroad fbshipit-source-id: 0369dbc55424e345a113e49fc104a441ea290d58 --- torch/csrc/jit/export.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/torch/csrc/jit/export.cpp b/torch/csrc/jit/export.cpp index 4112aa9..7e2a63f 100644 --- a/torch/csrc/jit/export.cpp +++ b/torch/csrc/jit/export.cpp @@ -189,7 +189,10 @@ EncoderBase::EncoderBase( operator_export_type_(operator_export_type), strip_doc_(strip_doc) { model_proto_.set_producer_name("pytorch"); - model_proto_.set_ir_version(onnx::IR_VERSION); + // we pin IR version to version 4 (01/22/2019) instead of using + // onnx::IR_VERSION. with this change, the test_operators.py will be more + // stable. only bump it when it's necessary + model_proto_.set_ir_version(4); // TODO: set the producer version using appropriate function call model_proto_.set_producer_version("1.1"); } -- 2.7.4