diff --git a/paddle/fluid/framework/version.h b/paddle/fluid/framework/version.h index bf07fc288d827ee560c54ef3edc7cd39c9594d95..3a1a492701b56d75c123a231844ccbbacc1d611c 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 3e02e14167331f15aeb4ffa1845ba756b4f42b77..656fafa0cb54d70e0eba8ec2bef21488c50d8d94 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())