File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,11 @@ limitations under the License. */
19
19
namespace paddle {
20
20
namespace framework {
21
21
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
+
22
27
// The program version the current codes generate.
23
28
constexpr int64_t kCurProgramVersion = 0 ;
24
29
@@ -27,8 +32,11 @@ constexpr int64_t kCurProgramVersion = 0;
27
32
constexpr int64_t kSupportedProgramVersion [] = {0 };
28
33
29
34
// Due to historical reasons, tensor version use uint32_t.
35
+ // The tensor version the current codes generate.
30
36
constexpr uint32_t kCurTensorVersion = 0 ;
31
37
38
+ // The tensor version that was generated by previous or current codes
39
+ // and supported by current codes.
32
40
constexpr uint32_t kSupportedTensorVersion [] = {0 };
33
41
34
42
bool IsProgramVersionSupported (int64_t version);
Original file line number Diff line number Diff line change @@ -750,7 +750,6 @@ def load_inference_model(dirname,
750
750
program_desc_str = f .read ()
751
751
752
752
program = Program .parse_from_string (program_desc_str )
753
- # TODO(panyx0718): Link to our version and compatibility guide.
754
753
if not core ._is_program_version_supported (program ._version ()):
755
754
raise ValueError ("Unsupported program version: %d\n " %
756
755
program ._version ())
You can’t perform that action at this time.
0 commit comments