Skip to content

Commit 9b7c3f9

Browse files
committed
refine
1 parent ff47eaf commit 9b7c3f9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

paddle/fluid/framework/version.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ limitations under the License. */
1919
namespace paddle {
2020
namespace framework {
2121

22+
// Note:
23+
// Program and Tensor that pass the IsXXXVersionSupported should
24+
// be supported by the current codes. Otherwise, it's a compatibility
25+
// bug.
26+
2227
// The program version the current codes generate.
2328
constexpr int64_t kCurProgramVersion = 0;
2429

@@ -27,8 +32,11 @@ constexpr int64_t kCurProgramVersion = 0;
2732
constexpr int64_t kSupportedProgramVersion[] = {0};
2833

2934
// Due to historical reasons, tensor version use uint32_t.
35+
// The tensor version the current codes generate.
3036
constexpr uint32_t kCurTensorVersion = 0;
3137

38+
// The tensor version that was generated by previous or current codes
39+
// and supported by current codes.
3240
constexpr uint32_t kSupportedTensorVersion[] = {0};
3341

3442
bool IsProgramVersionSupported(int64_t version);

python/paddle/fluid/io.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,6 @@ def load_inference_model(dirname,
750750
program_desc_str = f.read()
751751

752752
program = Program.parse_from_string(program_desc_str)
753-
# TODO(panyx0718): Link to our version and compatibility guide.
754753
if not core._is_program_version_supported(program._version()):
755754
raise ValueError("Unsupported program version: %d\n" %
756755
program._version())

0 commit comments

Comments
 (0)