From 9b7c3f9615a3a35d4bde29e4f7154b45e5de7786 Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Tue, 28 Aug 2018 09:42:34 +0800 Subject: [PATCH] refine --- paddle/fluid/framework/version.h | 8 ++++++++ python/paddle/fluid/io.py | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/framework/version.h b/paddle/fluid/framework/version.h index bf07fc288..3a1a49270 100644 --- a/paddle/fluid/framework/version.h +++ b/paddle/fluid/framework/version.h @@ -19,6 +19,11 @@ limitations under the License. */ namespace paddle { namespace framework { +// Note: +// Program and Tensor that pass the IsXXXVersionSupported should +// be supported by the current codes. Otherwise, it's a compatibility +// bug. + // The program version the current codes generate. constexpr int64_t kCurProgramVersion = 0; @@ -27,8 +32,11 @@ constexpr int64_t kCurProgramVersion = 0; constexpr int64_t kSupportedProgramVersion[] = {0}; // Due to historical reasons, tensor version use uint32_t. +// The tensor version the current codes generate. constexpr uint32_t kCurTensorVersion = 0; +// The tensor version that was generated by previous or current codes +// and supported by current codes. constexpr uint32_t kSupportedTensorVersion[] = {0}; bool IsProgramVersionSupported(int64_t version); diff --git a/python/paddle/fluid/io.py b/python/paddle/fluid/io.py index 3e02e1416..656fafa0c 100644 --- a/python/paddle/fluid/io.py +++ b/python/paddle/fluid/io.py @@ -750,7 +750,6 @@ def load_inference_model(dirname, program_desc_str = f.read() program = Program.parse_from_string(program_desc_str) - # TODO(panyx0718): Link to our version and compatibility guide. if not core._is_program_version_supported(program._version()): raise ValueError("Unsupported program version: %d\n" % program._version()) -- GitLab