diff --git a/paddle/fluid/framework/framework.proto b/paddle/fluid/framework/framework.proto index 423fe5e69b4be7beb3a9e46ffe09ba31e2b4a98a..2545e6c6f186b67ef1d22e7b5714d6f3913716ac 100644 --- a/paddle/fluid/framework/framework.proto +++ b/paddle/fluid/framework/framework.proto @@ -25,17 +25,17 @@ message Version { optional int64 version = 1 [ default = 0 ]; } enum AttrType { INT = 0; - LONG = 1; - FLOAT = 2; - STRING = 3; - INTS = 4; - LONGS = 5; - FLOATS = 6; - STRINGS = 7; - BOOLEAN = 8; - BOOLEANS = 9; - BLOCK = 10; - BLOCKS = 11; + FLOAT = 1; + STRING = 2; + INTS = 3; + FLOATS = 4; + STRINGS = 5; + BOOLEAN = 6; + BOOLEANS = 7; + BLOCK = 8; + LONG = 9; + BLOCKS = 10; + LONGS = 11; } // OpDesc describes an instance of a C++ framework::OperatorBase @@ -46,17 +46,17 @@ message OpDesc { required string name = 1; required AttrType type = 2; optional int32 i = 3; - optional int64 l = 4; - optional float f = 5; - optional string s = 6; - repeated int32 ints = 7; - repeated int64 longs = 8; - repeated float floats = 9; - repeated string strings = 10; - optional bool b = 11; - repeated bool bools = 12; - optional int32 block_idx = 13; + optional float f = 4; + optional string s = 5; + repeated int32 ints = 6; + repeated float floats = 7; + repeated string strings = 8; + optional bool b = 10; + repeated bool bools = 11; + optional int32 block_idx = 12; + optional int64 l = 13; repeated int32 blocks_idx = 14; + optional int64 longs = 15; }; message Var { diff --git a/paddle/fluid/framework/type_defs.h b/paddle/fluid/framework/type_defs.h index 1cbf6c32aba52ea4a3cd83e12c95804bac40e0e6..2de6233a9e0d320ec9a06d547db3575eb61925c0 100644 --- a/paddle/fluid/framework/type_defs.h +++ b/paddle/fluid/framework/type_defs.h @@ -33,10 +33,10 @@ using VariableNameMap = std::map>; // The order should be as same as framework.proto using Attribute = - boost::variant, std::vector, std::vector, - std::vector, bool, std::vector, - BlockDesc*, std::vector>; + boost::variant, + std::vector, std::vector, bool, + std::vector, BlockDesc*, int64_t, + std::vector, std::vector>; using AttributeMap = std::unordered_map;