diff --git a/src/common/types.cpp b/src/common/types.cpp index b166abf15301b0c2dcbffb03cc7bd879d185c97a..18b143a974d7bee7a79b9b14233b30a497882b94 100644 --- a/src/common/types.cpp +++ b/src/common/types.cpp @@ -15,7 +15,6 @@ limitations under the License. */ #include "common/types.h" #include - namespace paddle_mobile { const char *G_OP_TYPE_CONV = "conv2d"; @@ -117,7 +116,6 @@ std::unordered_map< {G_OP_TYPE_SHAPE, {{"Input"}, {"Out"}}}, {G_OP_TYPE_CONV_TRANSPOSE, {{"Input"}, {"Output"}}}, {G_OP_TYPE_QUANTIZE, {{"X"}, {"Out", "OutScale"}}}, - {G_OP_TYPE_DEQUANTIZE, {{"X", "Scale"}, {"Out"}}} - }; + {G_OP_TYPE_DEQUANTIZE, {{"X", "Scale"}, {"Out"}}}}; } // namespace paddle_mobile diff --git a/src/common/util.h b/src/common/util.h index 3525edfe8475d3a8a68250f7f4c57a492ad56b14..e4646c43f769583aace9d14c68e0e57ffa76f27d 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -14,8 +14,8 @@ limitations under the License. */ #pragma once -#include "common/enforce.h" #include +#include "common/enforce.h" namespace paddle_mobile { diff --git a/src/framework/framework.pb-c.c b/src/framework/framework.pb-c.c index 80d655e422c7fbcbb50642115bdb1c9902dfc31f..b426041c659401d961aea5e0f088c78098f62e75 100644 --- a/src/framework/framework.pb-c.c +++ b/src/framework/framework.pb-c.c @@ -7,1747 +7,1582 @@ #endif #include "framework.pb-c.h" -void paddle_mobile__framework__proto__version__init - (PaddleMobile__Framework__Proto__Version *message) -{ - static const PaddleMobile__Framework__Proto__Version init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VERSION__INIT; +void paddle_mobile__framework__proto__version__init( + PaddleMobile__Framework__Proto__Version *message) { + static const PaddleMobile__Framework__Proto__Version init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__VERSION__INIT; *message = init_value; } -size_t paddle_mobile__framework__proto__version__get_packed_size - (const PaddleMobile__Framework__Proto__Version *message) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__version__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +size_t paddle_mobile__framework__proto__version__get_packed_size( + const PaddleMobile__Framework__Proto__Version *message) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__version__descriptor); + return protobuf_c_message_get_packed_size( + (const ProtobufCMessage *)(message)); } -size_t paddle_mobile__framework__proto__version__pack - (const PaddleMobile__Framework__Proto__Version *message, - uint8_t *out) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__version__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +size_t paddle_mobile__framework__proto__version__pack( + const PaddleMobile__Framework__Proto__Version *message, uint8_t *out) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__version__descriptor); + return protobuf_c_message_pack((const ProtobufCMessage *)message, out); } -size_t paddle_mobile__framework__proto__version__pack_to_buffer - (const PaddleMobile__Framework__Proto__Version *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__version__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +size_t paddle_mobile__framework__proto__version__pack_to_buffer( + const PaddleMobile__Framework__Proto__Version *message, + ProtobufCBuffer *buffer) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__version__descriptor); + return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, + buffer); } PaddleMobile__Framework__Proto__Version * - paddle_mobile__framework__proto__version__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (PaddleMobile__Framework__Proto__Version *) - protobuf_c_message_unpack (&paddle_mobile__framework__proto__version__descriptor, - allocator, len, data); +paddle_mobile__framework__proto__version__unpack(ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) { + return (PaddleMobile__Framework__Proto__Version *)protobuf_c_message_unpack( + &paddle_mobile__framework__proto__version__descriptor, allocator, len, + data); } -void paddle_mobile__framework__proto__version__free_unpacked - (PaddleMobile__Framework__Proto__Version *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &paddle_mobile__framework__proto__version__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +void paddle_mobile__framework__proto__version__free_unpacked( + PaddleMobile__Framework__Proto__Version *message, + ProtobufCAllocator *allocator) { + if (!message) return; + assert(message->base.descriptor == + &paddle_mobile__framework__proto__version__descriptor); + protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator); } -void paddle_mobile__framework__proto__op_desc__attr__init - (PaddleMobile__Framework__Proto__OpDesc__Attr *message) -{ - static const PaddleMobile__Framework__Proto__OpDesc__Attr init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__ATTR__INIT; +void paddle_mobile__framework__proto__op_desc__attr__init( + PaddleMobile__Framework__Proto__OpDesc__Attr *message) { + static const PaddleMobile__Framework__Proto__OpDesc__Attr init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__ATTR__INIT; *message = init_value; } -void paddle_mobile__framework__proto__op_desc__var__init - (PaddleMobile__Framework__Proto__OpDesc__Var *message) -{ - static const PaddleMobile__Framework__Proto__OpDesc__Var init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__VAR__INIT; +void paddle_mobile__framework__proto__op_desc__var__init( + PaddleMobile__Framework__Proto__OpDesc__Var *message) { + static const PaddleMobile__Framework__Proto__OpDesc__Var init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__VAR__INIT; *message = init_value; } -void paddle_mobile__framework__proto__op_desc__init - (PaddleMobile__Framework__Proto__OpDesc *message) -{ - static const PaddleMobile__Framework__Proto__OpDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__INIT; +void paddle_mobile__framework__proto__op_desc__init( + PaddleMobile__Framework__Proto__OpDesc *message) { + static const PaddleMobile__Framework__Proto__OpDesc init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__INIT; *message = init_value; } -size_t paddle_mobile__framework__proto__op_desc__get_packed_size - (const PaddleMobile__Framework__Proto__OpDesc *message) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__op_desc__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +size_t paddle_mobile__framework__proto__op_desc__get_packed_size( + const PaddleMobile__Framework__Proto__OpDesc *message) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__op_desc__descriptor); + return protobuf_c_message_get_packed_size( + (const ProtobufCMessage *)(message)); } -size_t paddle_mobile__framework__proto__op_desc__pack - (const PaddleMobile__Framework__Proto__OpDesc *message, - uint8_t *out) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__op_desc__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +size_t paddle_mobile__framework__proto__op_desc__pack( + const PaddleMobile__Framework__Proto__OpDesc *message, uint8_t *out) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__op_desc__descriptor); + return protobuf_c_message_pack((const ProtobufCMessage *)message, out); } -size_t paddle_mobile__framework__proto__op_desc__pack_to_buffer - (const PaddleMobile__Framework__Proto__OpDesc *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__op_desc__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +size_t paddle_mobile__framework__proto__op_desc__pack_to_buffer( + const PaddleMobile__Framework__Proto__OpDesc *message, + ProtobufCBuffer *buffer) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__op_desc__descriptor); + return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, + buffer); } PaddleMobile__Framework__Proto__OpDesc * - paddle_mobile__framework__proto__op_desc__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (PaddleMobile__Framework__Proto__OpDesc *) - protobuf_c_message_unpack (&paddle_mobile__framework__proto__op_desc__descriptor, - allocator, len, data); +paddle_mobile__framework__proto__op_desc__unpack(ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) { + return (PaddleMobile__Framework__Proto__OpDesc *)protobuf_c_message_unpack( + &paddle_mobile__framework__proto__op_desc__descriptor, allocator, len, + data); } -void paddle_mobile__framework__proto__op_desc__free_unpacked - (PaddleMobile__Framework__Proto__OpDesc *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &paddle_mobile__framework__proto__op_desc__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +void paddle_mobile__framework__proto__op_desc__free_unpacked( + PaddleMobile__Framework__Proto__OpDesc *message, + ProtobufCAllocator *allocator) { + if (!message) return; + assert(message->base.descriptor == + &paddle_mobile__framework__proto__op_desc__descriptor); + protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator); } -void paddle_mobile__framework__proto__op_proto__var__init - (PaddleMobile__Framework__Proto__OpProto__Var *message) -{ - static const PaddleMobile__Framework__Proto__OpProto__Var init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__VAR__INIT; +void paddle_mobile__framework__proto__op_proto__var__init( + PaddleMobile__Framework__Proto__OpProto__Var *message) { + static const PaddleMobile__Framework__Proto__OpProto__Var init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__VAR__INIT; *message = init_value; } -void paddle_mobile__framework__proto__op_proto__attr__init - (PaddleMobile__Framework__Proto__OpProto__Attr *message) -{ - static const PaddleMobile__Framework__Proto__OpProto__Attr init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__ATTR__INIT; +void paddle_mobile__framework__proto__op_proto__attr__init( + PaddleMobile__Framework__Proto__OpProto__Attr *message) { + static const PaddleMobile__Framework__Proto__OpProto__Attr init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__ATTR__INIT; *message = init_value; } -void paddle_mobile__framework__proto__op_proto__init - (PaddleMobile__Framework__Proto__OpProto *message) -{ - static const PaddleMobile__Framework__Proto__OpProto init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__INIT; +void paddle_mobile__framework__proto__op_proto__init( + PaddleMobile__Framework__Proto__OpProto *message) { + static const PaddleMobile__Framework__Proto__OpProto init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__INIT; *message = init_value; } -size_t paddle_mobile__framework__proto__op_proto__get_packed_size - (const PaddleMobile__Framework__Proto__OpProto *message) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__op_proto__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +size_t paddle_mobile__framework__proto__op_proto__get_packed_size( + const PaddleMobile__Framework__Proto__OpProto *message) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__op_proto__descriptor); + return protobuf_c_message_get_packed_size( + (const ProtobufCMessage *)(message)); } -size_t paddle_mobile__framework__proto__op_proto__pack - (const PaddleMobile__Framework__Proto__OpProto *message, - uint8_t *out) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__op_proto__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +size_t paddle_mobile__framework__proto__op_proto__pack( + const PaddleMobile__Framework__Proto__OpProto *message, uint8_t *out) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__op_proto__descriptor); + return protobuf_c_message_pack((const ProtobufCMessage *)message, out); } -size_t paddle_mobile__framework__proto__op_proto__pack_to_buffer - (const PaddleMobile__Framework__Proto__OpProto *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__op_proto__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +size_t paddle_mobile__framework__proto__op_proto__pack_to_buffer( + const PaddleMobile__Framework__Proto__OpProto *message, + ProtobufCBuffer *buffer) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__op_proto__descriptor); + return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, + buffer); } PaddleMobile__Framework__Proto__OpProto * - paddle_mobile__framework__proto__op_proto__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (PaddleMobile__Framework__Proto__OpProto *) - protobuf_c_message_unpack (&paddle_mobile__framework__proto__op_proto__descriptor, - allocator, len, data); +paddle_mobile__framework__proto__op_proto__unpack(ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) { + return (PaddleMobile__Framework__Proto__OpProto *)protobuf_c_message_unpack( + &paddle_mobile__framework__proto__op_proto__descriptor, allocator, len, + data); } -void paddle_mobile__framework__proto__op_proto__free_unpacked - (PaddleMobile__Framework__Proto__OpProto *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &paddle_mobile__framework__proto__op_proto__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +void paddle_mobile__framework__proto__op_proto__free_unpacked( + PaddleMobile__Framework__Proto__OpProto *message, + ProtobufCAllocator *allocator) { + if (!message) return; + assert(message->base.descriptor == + &paddle_mobile__framework__proto__op_proto__descriptor); + protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator); } -void paddle_mobile__framework__proto__var_type__tensor_desc__init - (PaddleMobile__Framework__Proto__VarType__TensorDesc *message) -{ - static const PaddleMobile__Framework__Proto__VarType__TensorDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TENSOR_DESC__INIT; +void paddle_mobile__framework__proto__var_type__tensor_desc__init( + PaddleMobile__Framework__Proto__VarType__TensorDesc *message) { + static const PaddleMobile__Framework__Proto__VarType__TensorDesc init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TENSOR_DESC__INIT; *message = init_value; } -void paddle_mobile__framework__proto__var_type__lo_dtensor_desc__init - (PaddleMobile__Framework__Proto__VarType__LoDTensorDesc *message) -{ - static const PaddleMobile__Framework__Proto__VarType__LoDTensorDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_DESC__INIT; +void paddle_mobile__framework__proto__var_type__lo_dtensor_desc__init( + PaddleMobile__Framework__Proto__VarType__LoDTensorDesc *message) { + static const PaddleMobile__Framework__Proto__VarType__LoDTensorDesc + init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_DESC__INIT; *message = init_value; } -void paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__init - (PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc *message) -{ - static const PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_ARRAY_DESC__INIT; +void paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__init( + PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc *message) { + static const PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc + init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_ARRAY_DESC__INIT; *message = init_value; } -void paddle_mobile__framework__proto__var_type__reader_desc__init - (PaddleMobile__Framework__Proto__VarType__ReaderDesc *message) -{ - static const PaddleMobile__Framework__Proto__VarType__ReaderDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__READER_DESC__INIT; +void paddle_mobile__framework__proto__var_type__reader_desc__init( + PaddleMobile__Framework__Proto__VarType__ReaderDesc *message) { + static const PaddleMobile__Framework__Proto__VarType__ReaderDesc init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__READER_DESC__INIT; *message = init_value; } -void paddle_mobile__framework__proto__var_type__channel_desc__init - (PaddleMobile__Framework__Proto__VarType__ChannelDesc *message) -{ - static const PaddleMobile__Framework__Proto__VarType__ChannelDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__CHANNEL_DESC__INIT; +void paddle_mobile__framework__proto__var_type__channel_desc__init( + PaddleMobile__Framework__Proto__VarType__ChannelDesc *message) { + static const PaddleMobile__Framework__Proto__VarType__ChannelDesc init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__CHANNEL_DESC__INIT; *message = init_value; } -void paddle_mobile__framework__proto__var_type__tuple__init - (PaddleMobile__Framework__Proto__VarType__Tuple *message) -{ - static const PaddleMobile__Framework__Proto__VarType__Tuple init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TUPLE__INIT; +void paddle_mobile__framework__proto__var_type__tuple__init( + PaddleMobile__Framework__Proto__VarType__Tuple *message) { + static const PaddleMobile__Framework__Proto__VarType__Tuple init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TUPLE__INIT; *message = init_value; } -void paddle_mobile__framework__proto__var_type__init - (PaddleMobile__Framework__Proto__VarType *message) -{ - static const PaddleMobile__Framework__Proto__VarType init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__INIT; +void paddle_mobile__framework__proto__var_type__init( + PaddleMobile__Framework__Proto__VarType *message) { + static const PaddleMobile__Framework__Proto__VarType init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__INIT; *message = init_value; } -size_t paddle_mobile__framework__proto__var_type__get_packed_size - (const PaddleMobile__Framework__Proto__VarType *message) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__var_type__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +size_t paddle_mobile__framework__proto__var_type__get_packed_size( + const PaddleMobile__Framework__Proto__VarType *message) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__var_type__descriptor); + return protobuf_c_message_get_packed_size( + (const ProtobufCMessage *)(message)); } -size_t paddle_mobile__framework__proto__var_type__pack - (const PaddleMobile__Framework__Proto__VarType *message, - uint8_t *out) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__var_type__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +size_t paddle_mobile__framework__proto__var_type__pack( + const PaddleMobile__Framework__Proto__VarType *message, uint8_t *out) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__var_type__descriptor); + return protobuf_c_message_pack((const ProtobufCMessage *)message, out); } -size_t paddle_mobile__framework__proto__var_type__pack_to_buffer - (const PaddleMobile__Framework__Proto__VarType *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__var_type__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +size_t paddle_mobile__framework__proto__var_type__pack_to_buffer( + const PaddleMobile__Framework__Proto__VarType *message, + ProtobufCBuffer *buffer) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__var_type__descriptor); + return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, + buffer); } PaddleMobile__Framework__Proto__VarType * - paddle_mobile__framework__proto__var_type__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (PaddleMobile__Framework__Proto__VarType *) - protobuf_c_message_unpack (&paddle_mobile__framework__proto__var_type__descriptor, - allocator, len, data); +paddle_mobile__framework__proto__var_type__unpack(ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) { + return (PaddleMobile__Framework__Proto__VarType *)protobuf_c_message_unpack( + &paddle_mobile__framework__proto__var_type__descriptor, allocator, len, + data); } -void paddle_mobile__framework__proto__var_type__free_unpacked - (PaddleMobile__Framework__Proto__VarType *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &paddle_mobile__framework__proto__var_type__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +void paddle_mobile__framework__proto__var_type__free_unpacked( + PaddleMobile__Framework__Proto__VarType *message, + ProtobufCAllocator *allocator) { + if (!message) return; + assert(message->base.descriptor == + &paddle_mobile__framework__proto__var_type__descriptor); + protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator); } -void paddle_mobile__framework__proto__var_desc__init - (PaddleMobile__Framework__Proto__VarDesc *message) -{ - static const PaddleMobile__Framework__Proto__VarDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_DESC__INIT; +void paddle_mobile__framework__proto__var_desc__init( + PaddleMobile__Framework__Proto__VarDesc *message) { + static const PaddleMobile__Framework__Proto__VarDesc init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_DESC__INIT; *message = init_value; } -size_t paddle_mobile__framework__proto__var_desc__get_packed_size - (const PaddleMobile__Framework__Proto__VarDesc *message) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__var_desc__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +size_t paddle_mobile__framework__proto__var_desc__get_packed_size( + const PaddleMobile__Framework__Proto__VarDesc *message) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__var_desc__descriptor); + return protobuf_c_message_get_packed_size( + (const ProtobufCMessage *)(message)); } -size_t paddle_mobile__framework__proto__var_desc__pack - (const PaddleMobile__Framework__Proto__VarDesc *message, - uint8_t *out) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__var_desc__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +size_t paddle_mobile__framework__proto__var_desc__pack( + const PaddleMobile__Framework__Proto__VarDesc *message, uint8_t *out) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__var_desc__descriptor); + return protobuf_c_message_pack((const ProtobufCMessage *)message, out); } -size_t paddle_mobile__framework__proto__var_desc__pack_to_buffer - (const PaddleMobile__Framework__Proto__VarDesc *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__var_desc__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +size_t paddle_mobile__framework__proto__var_desc__pack_to_buffer( + const PaddleMobile__Framework__Proto__VarDesc *message, + ProtobufCBuffer *buffer) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__var_desc__descriptor); + return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, + buffer); } PaddleMobile__Framework__Proto__VarDesc * - paddle_mobile__framework__proto__var_desc__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (PaddleMobile__Framework__Proto__VarDesc *) - protobuf_c_message_unpack (&paddle_mobile__framework__proto__var_desc__descriptor, - allocator, len, data); +paddle_mobile__framework__proto__var_desc__unpack(ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) { + return (PaddleMobile__Framework__Proto__VarDesc *)protobuf_c_message_unpack( + &paddle_mobile__framework__proto__var_desc__descriptor, allocator, len, + data); } -void paddle_mobile__framework__proto__var_desc__free_unpacked - (PaddleMobile__Framework__Proto__VarDesc *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &paddle_mobile__framework__proto__var_desc__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +void paddle_mobile__framework__proto__var_desc__free_unpacked( + PaddleMobile__Framework__Proto__VarDesc *message, + ProtobufCAllocator *allocator) { + if (!message) return; + assert(message->base.descriptor == + &paddle_mobile__framework__proto__var_desc__descriptor); + protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator); } -void paddle_mobile__framework__proto__block_desc__init - (PaddleMobile__Framework__Proto__BlockDesc *message) -{ - static const PaddleMobile__Framework__Proto__BlockDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__BLOCK_DESC__INIT; +void paddle_mobile__framework__proto__block_desc__init( + PaddleMobile__Framework__Proto__BlockDesc *message) { + static const PaddleMobile__Framework__Proto__BlockDesc init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__BLOCK_DESC__INIT; *message = init_value; } -size_t paddle_mobile__framework__proto__block_desc__get_packed_size - (const PaddleMobile__Framework__Proto__BlockDesc *message) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__block_desc__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +size_t paddle_mobile__framework__proto__block_desc__get_packed_size( + const PaddleMobile__Framework__Proto__BlockDesc *message) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__block_desc__descriptor); + return protobuf_c_message_get_packed_size( + (const ProtobufCMessage *)(message)); } -size_t paddle_mobile__framework__proto__block_desc__pack - (const PaddleMobile__Framework__Proto__BlockDesc *message, - uint8_t *out) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__block_desc__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +size_t paddle_mobile__framework__proto__block_desc__pack( + const PaddleMobile__Framework__Proto__BlockDesc *message, uint8_t *out) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__block_desc__descriptor); + return protobuf_c_message_pack((const ProtobufCMessage *)message, out); } -size_t paddle_mobile__framework__proto__block_desc__pack_to_buffer - (const PaddleMobile__Framework__Proto__BlockDesc *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__block_desc__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +size_t paddle_mobile__framework__proto__block_desc__pack_to_buffer( + const PaddleMobile__Framework__Proto__BlockDesc *message, + ProtobufCBuffer *buffer) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__block_desc__descriptor); + return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, + buffer); } PaddleMobile__Framework__Proto__BlockDesc * - paddle_mobile__framework__proto__block_desc__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (PaddleMobile__Framework__Proto__BlockDesc *) - protobuf_c_message_unpack (&paddle_mobile__framework__proto__block_desc__descriptor, - allocator, len, data); +paddle_mobile__framework__proto__block_desc__unpack( + ProtobufCAllocator *allocator, size_t len, const uint8_t *data) { + return (PaddleMobile__Framework__Proto__BlockDesc *)protobuf_c_message_unpack( + &paddle_mobile__framework__proto__block_desc__descriptor, allocator, len, + data); } -void paddle_mobile__framework__proto__block_desc__free_unpacked - (PaddleMobile__Framework__Proto__BlockDesc *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &paddle_mobile__framework__proto__block_desc__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +void paddle_mobile__framework__proto__block_desc__free_unpacked( + PaddleMobile__Framework__Proto__BlockDesc *message, + ProtobufCAllocator *allocator) { + if (!message) return; + assert(message->base.descriptor == + &paddle_mobile__framework__proto__block_desc__descriptor); + protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator); } -void paddle_mobile__framework__proto__program_desc__init - (PaddleMobile__Framework__Proto__ProgramDesc *message) -{ - static const PaddleMobile__Framework__Proto__ProgramDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__PROGRAM_DESC__INIT; +void paddle_mobile__framework__proto__program_desc__init( + PaddleMobile__Framework__Proto__ProgramDesc *message) { + static const PaddleMobile__Framework__Proto__ProgramDesc init_value = + PADDLE_MOBILE__FRAMEWORK__PROTO__PROGRAM_DESC__INIT; *message = init_value; } -size_t paddle_mobile__framework__proto__program_desc__get_packed_size - (const PaddleMobile__Framework__Proto__ProgramDesc *message) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__program_desc__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +size_t paddle_mobile__framework__proto__program_desc__get_packed_size( + const PaddleMobile__Framework__Proto__ProgramDesc *message) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__program_desc__descriptor); + return protobuf_c_message_get_packed_size( + (const ProtobufCMessage *)(message)); } -size_t paddle_mobile__framework__proto__program_desc__pack - (const PaddleMobile__Framework__Proto__ProgramDesc *message, - uint8_t *out) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__program_desc__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +size_t paddle_mobile__framework__proto__program_desc__pack( + const PaddleMobile__Framework__Proto__ProgramDesc *message, uint8_t *out) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__program_desc__descriptor); + return protobuf_c_message_pack((const ProtobufCMessage *)message, out); } -size_t paddle_mobile__framework__proto__program_desc__pack_to_buffer - (const PaddleMobile__Framework__Proto__ProgramDesc *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &paddle_mobile__framework__proto__program_desc__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +size_t paddle_mobile__framework__proto__program_desc__pack_to_buffer( + const PaddleMobile__Framework__Proto__ProgramDesc *message, + ProtobufCBuffer *buffer) { + assert(message->base.descriptor == + &paddle_mobile__framework__proto__program_desc__descriptor); + return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, + buffer); } PaddleMobile__Framework__Proto__ProgramDesc * - paddle_mobile__framework__proto__program_desc__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ +paddle_mobile__framework__proto__program_desc__unpack( + ProtobufCAllocator *allocator, size_t len, const uint8_t *data) { return (PaddleMobile__Framework__Proto__ProgramDesc *) - protobuf_c_message_unpack (&paddle_mobile__framework__proto__program_desc__descriptor, - allocator, len, data); + protobuf_c_message_unpack( + &paddle_mobile__framework__proto__program_desc__descriptor, allocator, + len, data); } -void paddle_mobile__framework__proto__program_desc__free_unpacked - (PaddleMobile__Framework__Proto__ProgramDesc *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &paddle_mobile__framework__proto__program_desc__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +void paddle_mobile__framework__proto__program_desc__free_unpacked( + PaddleMobile__Framework__Proto__ProgramDesc *message, + ProtobufCAllocator *allocator) { + if (!message) return; + assert(message->base.descriptor == + &paddle_mobile__framework__proto__program_desc__descriptor); + protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator); } -static const int64_t paddle_mobile__framework__proto__version__version__default_value = 0ll; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__version__field_descriptors[1] = -{ - { - "version", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT64, - offsetof(PaddleMobile__Framework__Proto__Version, has_version), - offsetof(PaddleMobile__Framework__Proto__Version, version), - NULL, - &paddle_mobile__framework__proto__version__version__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__version__field_indices_by_name[] = { - 0, /* field[0] = version */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__version__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 1 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__version__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.Version", - "Version", - "PaddleMobile__Framework__Proto__Version", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__Version), - 1, - paddle_mobile__framework__proto__version__field_descriptors, - paddle_mobile__framework__proto__version__field_indices_by_name, - 1, paddle_mobile__framework__proto__version__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__version__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__op_desc__attr__field_descriptors[13] = -{ - { - "name", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, name), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "type", - 2, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_ENUM, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, type), - &paddle_mobile__framework__proto__attr_type__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "i", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_i), - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, i), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "f", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_FLOAT, - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_f), - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, f), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "s", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, s), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "ints", - 6, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_INT32, - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_ints), - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, ints), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "floats", - 7, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_FLOAT, - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_floats), - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, floats), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "strings", - 8, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_STRING, - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_strings), - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, strings), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "b", - 10, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_b), - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, b), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "bools", - 11, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_BOOL, - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_bools), - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, bools), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "block_idx", - 12, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_block_idx), - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, block_idx), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "l", - 13, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT64, - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_l), - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, l), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "blocks_idx", - 14, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_INT32, - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_blocks_idx), - offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, blocks_idx), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__op_desc__attr__field_indices_by_name[] = { - 8, /* field[8] = b */ - 10, /* field[10] = block_idx */ - 12, /* field[12] = blocks_idx */ - 9, /* field[9] = bools */ - 3, /* field[3] = f */ - 6, /* field[6] = floats */ - 2, /* field[2] = i */ - 5, /* field[5] = ints */ - 11, /* field[11] = l */ - 0, /* field[0] = name */ - 4, /* field[4] = s */ - 7, /* field[7] = strings */ - 1, /* field[1] = type */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__op_desc__attr__number_ranges[2 + 1] = -{ - { 1, 0 }, - { 10, 8 }, - { 0, 13 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__attr__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.OpDesc.Attr", - "Attr", - "PaddleMobile__Framework__Proto__OpDesc__Attr", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__OpDesc__Attr), - 13, - paddle_mobile__framework__proto__op_desc__attr__field_descriptors, - paddle_mobile__framework__proto__op_desc__attr__field_indices_by_name, - 2, paddle_mobile__framework__proto__op_desc__attr__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__op_desc__attr__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__op_desc__var__field_descriptors[2] = -{ - { - "parameter", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpDesc__Var, parameter), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "arguments", - 2, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_STRING, - offsetof(PaddleMobile__Framework__Proto__OpDesc__Var, n_arguments), - offsetof(PaddleMobile__Framework__Proto__OpDesc__Var, arguments), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__op_desc__var__field_indices_by_name[] = { - 1, /* field[1] = arguments */ - 0, /* field[0] = parameter */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__op_desc__var__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__var__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.OpDesc.Var", - "Var", - "PaddleMobile__Framework__Proto__OpDesc__Var", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__OpDesc__Var), - 2, - paddle_mobile__framework__proto__op_desc__var__field_descriptors, - paddle_mobile__framework__proto__op_desc__var__field_indices_by_name, - 1, paddle_mobile__framework__proto__op_desc__var__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__op_desc__var__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const protobuf_c_boolean paddle_mobile__framework__proto__op_desc__is_target__default_value = 0; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__op_desc__field_descriptors[5] = -{ - { - "inputs", - 1, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(PaddleMobile__Framework__Proto__OpDesc, n_inputs), - offsetof(PaddleMobile__Framework__Proto__OpDesc, inputs), - &paddle_mobile__framework__proto__op_desc__var__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "outputs", - 2, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(PaddleMobile__Framework__Proto__OpDesc, n_outputs), - offsetof(PaddleMobile__Framework__Proto__OpDesc, outputs), - &paddle_mobile__framework__proto__op_desc__var__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "type", - 3, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpDesc, type), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "attrs", - 4, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(PaddleMobile__Framework__Proto__OpDesc, n_attrs), - offsetof(PaddleMobile__Framework__Proto__OpDesc, attrs), - &paddle_mobile__framework__proto__op_desc__attr__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "is_target", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(PaddleMobile__Framework__Proto__OpDesc, has_is_target), - offsetof(PaddleMobile__Framework__Proto__OpDesc, is_target), - NULL, - &paddle_mobile__framework__proto__op_desc__is_target__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__op_desc__field_indices_by_name[] = { - 3, /* field[3] = attrs */ - 0, /* field[0] = inputs */ - 4, /* field[4] = is_target */ - 1, /* field[1] = outputs */ - 2, /* field[2] = type */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__op_desc__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 5 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.OpDesc", - "OpDesc", - "PaddleMobile__Framework__Proto__OpDesc", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__OpDesc), - 5, - paddle_mobile__framework__proto__op_desc__field_descriptors, - paddle_mobile__framework__proto__op_desc__field_indices_by_name, - 1, paddle_mobile__framework__proto__op_desc__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__op_desc__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const protobuf_c_boolean paddle_mobile__framework__proto__op_proto__var__duplicable__default_value = 0; -static const protobuf_c_boolean paddle_mobile__framework__proto__op_proto__var__intermediate__default_value = 0; -static const protobuf_c_boolean paddle_mobile__framework__proto__op_proto__var__dispensable__default_value = 0; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__op_proto__var__field_descriptors[6] = -{ - { - "name", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpProto__Var, name), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "comment", - 2, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpProto__Var, comment), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "duplicable", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(PaddleMobile__Framework__Proto__OpProto__Var, has_duplicable), - offsetof(PaddleMobile__Framework__Proto__OpProto__Var, duplicable), - NULL, - &paddle_mobile__framework__proto__op_proto__var__duplicable__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "intermediate", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(PaddleMobile__Framework__Proto__OpProto__Var, has_intermediate), - offsetof(PaddleMobile__Framework__Proto__OpProto__Var, intermediate), - NULL, - &paddle_mobile__framework__proto__op_proto__var__intermediate__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "dispensable", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(PaddleMobile__Framework__Proto__OpProto__Var, has_dispensable), - offsetof(PaddleMobile__Framework__Proto__OpProto__Var, dispensable), - NULL, - &paddle_mobile__framework__proto__op_proto__var__dispensable__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "reuse", - 6, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpProto__Var, reuse), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__op_proto__var__field_indices_by_name[] = { - 1, /* field[1] = comment */ - 4, /* field[4] = dispensable */ - 2, /* field[2] = duplicable */ - 3, /* field[3] = intermediate */ - 0, /* field[0] = name */ - 5, /* field[5] = reuse */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__op_proto__var__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 6 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__var__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.OpProto.Var", - "Var", - "PaddleMobile__Framework__Proto__OpProto__Var", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__OpProto__Var), - 6, - paddle_mobile__framework__proto__op_proto__var__field_descriptors, - paddle_mobile__framework__proto__op_proto__var__field_indices_by_name, - 1, paddle_mobile__framework__proto__op_proto__var__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__op_proto__var__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const protobuf_c_boolean paddle_mobile__framework__proto__op_proto__attr__generated__default_value = 0; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__op_proto__attr__field_descriptors[4] = -{ - { - "name", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, name), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "type", - 2, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_ENUM, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, type), - &paddle_mobile__framework__proto__attr_type__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "comment", - 3, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, comment), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "generated", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, has_generated), - offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, generated), - NULL, - &paddle_mobile__framework__proto__op_proto__attr__generated__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__op_proto__attr__field_indices_by_name[] = { - 2, /* field[2] = comment */ - 3, /* field[3] = generated */ - 0, /* field[0] = name */ - 1, /* field[1] = type */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__op_proto__attr__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 4 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__attr__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.OpProto.Attr", - "Attr", - "PaddleMobile__Framework__Proto__OpProto__Attr", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__OpProto__Attr), - 4, - paddle_mobile__framework__proto__op_proto__attr__field_descriptors, - paddle_mobile__framework__proto__op_proto__attr__field_indices_by_name, - 1, paddle_mobile__framework__proto__op_proto__attr__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__op_proto__attr__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__op_proto__field_descriptors[5] = -{ - { - "type", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpProto, type), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "inputs", - 2, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(PaddleMobile__Framework__Proto__OpProto, n_inputs), - offsetof(PaddleMobile__Framework__Proto__OpProto, inputs), - &paddle_mobile__framework__proto__op_proto__var__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "outputs", - 3, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(PaddleMobile__Framework__Proto__OpProto, n_outputs), - offsetof(PaddleMobile__Framework__Proto__OpProto, outputs), - &paddle_mobile__framework__proto__op_proto__var__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "attrs", - 4, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(PaddleMobile__Framework__Proto__OpProto, n_attrs), - offsetof(PaddleMobile__Framework__Proto__OpProto, attrs), - &paddle_mobile__framework__proto__op_proto__attr__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "comment", - 5, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__OpProto, comment), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__op_proto__field_indices_by_name[] = { - 3, /* field[3] = attrs */ - 4, /* field[4] = comment */ - 1, /* field[1] = inputs */ - 2, /* field[2] = outputs */ - 0, /* field[0] = type */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__op_proto__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 5 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.OpProto", - "OpProto", - "PaddleMobile__Framework__Proto__OpProto", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__OpProto), - 5, - paddle_mobile__framework__proto__op_proto__field_descriptors, - paddle_mobile__framework__proto__op_proto__field_indices_by_name, - 1, paddle_mobile__framework__proto__op_proto__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__op_proto__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__var_type__tensor_desc__field_descriptors[2] = -{ - { - "data_type", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_ENUM, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarType__TensorDesc, data_type), - &paddle_mobile__framework__proto__var_type__type__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "dims", - 2, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_INT64, - offsetof(PaddleMobile__Framework__Proto__VarType__TensorDesc, n_dims), - offsetof(PaddleMobile__Framework__Proto__VarType__TensorDesc, dims), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__var_type__tensor_desc__field_indices_by_name[] = { - 0, /* field[0] = data_type */ - 1, /* field[1] = dims */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__tensor_desc__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__tensor_desc__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.VarType.TensorDesc", - "TensorDesc", - "PaddleMobile__Framework__Proto__VarType__TensorDesc", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__VarType__TensorDesc), - 2, - paddle_mobile__framework__proto__var_type__tensor_desc__field_descriptors, - paddle_mobile__framework__proto__var_type__tensor_desc__field_indices_by_name, - 1, paddle_mobile__framework__proto__var_type__tensor_desc__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__var_type__tensor_desc__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const int32_t paddle_mobile__framework__proto__var_type__lo_dtensor_desc__lod_level__default_value = 0; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_descriptors[2] = -{ - { - "tensor", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc, tensor), - &paddle_mobile__framework__proto__var_type__tensor_desc__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "lod_level", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc, has_lod_level), - offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc, lod_level), - NULL, - &paddle_mobile__framework__proto__var_type__lo_dtensor_desc__lod_level__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_indices_by_name[] = { - 1, /* field[1] = lod_level */ - 0, /* field[0] = tensor */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__lo_dtensor_desc__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.VarType.LoDTensorDesc", - "LoDTensorDesc", - "PaddleMobile__Framework__Proto__VarType__LoDTensorDesc", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc), - 2, - paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_descriptors, - paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_indices_by_name, - 1, paddle_mobile__framework__proto__var_type__lo_dtensor_desc__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__var_type__lo_dtensor_desc__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const int32_t paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__lod_level__default_value = 0; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__field_descriptors[2] = -{ - { - "tensor", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc, tensor), - &paddle_mobile__framework__proto__var_type__tensor_desc__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "lod_level", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc, has_lod_level), - offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc, lod_level), - NULL, - &paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__lod_level__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__field_indices_by_name[] = { - 1, /* field[1] = lod_level */ - 0, /* field[0] = tensor */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc", - "LoDTensorArrayDesc", - "PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc), - 2, - paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__field_descriptors, - paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__field_indices_by_name, - 1, paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__var_type__reader_desc__field_descriptors[1] = -{ - { - "lod_tensor", - 1, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(PaddleMobile__Framework__Proto__VarType__ReaderDesc, n_lod_tensor), - offsetof(PaddleMobile__Framework__Proto__VarType__ReaderDesc, lod_tensor), - &paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__var_type__reader_desc__field_indices_by_name[] = { - 0, /* field[0] = lod_tensor */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__reader_desc__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 1 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__reader_desc__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.VarType.ReaderDesc", - "ReaderDesc", - "PaddleMobile__Framework__Proto__VarType__ReaderDesc", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__VarType__ReaderDesc), - 1, - paddle_mobile__framework__proto__var_type__reader_desc__field_descriptors, - paddle_mobile__framework__proto__var_type__reader_desc__field_indices_by_name, - 1, paddle_mobile__framework__proto__var_type__reader_desc__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__var_type__reader_desc__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__var_type__channel_desc__field_descriptors[2] = -{ - { - "data_type", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_ENUM, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarType__ChannelDesc, data_type), - &paddle_mobile__framework__proto__var_type__type__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "capacity", - 2, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_INT64, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarType__ChannelDesc, capacity), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__var_type__channel_desc__field_indices_by_name[] = { - 1, /* field[1] = capacity */ - 0, /* field[0] = data_type */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__channel_desc__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__channel_desc__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.VarType.ChannelDesc", - "ChannelDesc", - "PaddleMobile__Framework__Proto__VarType__ChannelDesc", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__VarType__ChannelDesc), - 2, - paddle_mobile__framework__proto__var_type__channel_desc__field_descriptors, - paddle_mobile__framework__proto__var_type__channel_desc__field_indices_by_name, - 1, paddle_mobile__framework__proto__var_type__channel_desc__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__var_type__channel_desc__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__var_type__tuple__field_descriptors[1] = -{ - { - "element_type", - 1, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_ENUM, - offsetof(PaddleMobile__Framework__Proto__VarType__Tuple, n_element_type), - offsetof(PaddleMobile__Framework__Proto__VarType__Tuple, element_type), - &paddle_mobile__framework__proto__var_type__type__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__var_type__tuple__field_indices_by_name[] = { - 0, /* field[0] = element_type */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__tuple__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 1 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__tuple__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.VarType.Tuple", - "Tuple", - "PaddleMobile__Framework__Proto__VarType__Tuple", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__VarType__Tuple), - 1, - paddle_mobile__framework__proto__var_type__tuple__field_descriptors, - paddle_mobile__framework__proto__var_type__tuple__field_indices_by_name, - 1, paddle_mobile__framework__proto__var_type__tuple__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__var_type__tuple__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCEnumValue paddle_mobile__framework__proto__var_type__type__enum_values_by_number[22] = -{ - { "BOOL", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__BOOL", 0 }, - { "INT16", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__INT16", 1 }, - { "INT32", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__INT32", 2 }, - { "INT64", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__INT64", 3 }, - { "FP16", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__FP16", 4 }, - { "FP32", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__FP32", 5 }, - { "FP64", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__FP64", 6 }, - { "LOD_TENSOR", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__LOD_TENSOR", 7 }, - { "SELECTED_ROWS", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__SELECTED_ROWS", 8 }, - { "FEED_MINIBATCH", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__FEED_MINIBATCH", 9 }, - { "FETCH_LIST", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__FETCH_LIST", 10 }, - { "STEP_SCOPES", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__STEP_SCOPES", 11 }, - { "LOD_RANK_TABLE", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__LOD_RANK_TABLE", 12 }, - { "LOD_TENSOR_ARRAY", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__LOD_TENSOR_ARRAY", 13 }, - { "PLACE_LIST", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__PLACE_LIST", 14 }, - { "READER", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__READER", 15 }, - { "CHANNEL", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__CHANNEL", 16 }, - { "RAW", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__RAW", 17 }, - { "TUPLE", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__TUPLE", 18 }, - { "SIZE_T", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__SIZE_T", 19 }, - { "UINT8", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__UINT8", 20 }, - { "INT8", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__INT8", 21 }, -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__type__value_ranges[] = { -{0, 0},{0, 22} -}; -static const ProtobufCEnumValueIndex paddle_mobile__framework__proto__var_type__type__enum_values_by_name[22] = -{ - { "BOOL", 0 }, - { "CHANNEL", 16 }, - { "FEED_MINIBATCH", 9 }, - { "FETCH_LIST", 10 }, - { "FP16", 4 }, - { "FP32", 5 }, - { "FP64", 6 }, - { "INT16", 1 }, - { "INT32", 2 }, - { "INT64", 3 }, - { "INT8", 21 }, - { "LOD_RANK_TABLE", 12 }, - { "LOD_TENSOR", 7 }, - { "LOD_TENSOR_ARRAY", 13 }, - { "PLACE_LIST", 14 }, - { "RAW", 17 }, - { "READER", 15 }, - { "SELECTED_ROWS", 8 }, - { "SIZE_T", 19 }, - { "STEP_SCOPES", 11 }, - { "TUPLE", 18 }, - { "UINT8", 20 }, -}; -const ProtobufCEnumDescriptor paddle_mobile__framework__proto__var_type__type__descriptor = -{ - PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.VarType.Type", - "Type", - "PaddleMobile__Framework__Proto__VarType__Type", - "paddle_mobile.framework.proto", - 22, - paddle_mobile__framework__proto__var_type__type__enum_values_by_number, - 22, - paddle_mobile__framework__proto__var_type__type__enum_values_by_name, - 1, - paddle_mobile__framework__proto__var_type__type__value_ranges, - NULL,NULL,NULL,NULL /* reserved[1234] */ -}; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__var_type__field_descriptors[7] = -{ - { - "type", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_ENUM, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarType, type), - &paddle_mobile__framework__proto__var_type__type__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "selected_rows", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarType, selected_rows), - &paddle_mobile__framework__proto__var_type__tensor_desc__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "lod_tensor", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarType, lod_tensor), - &paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "tensor_array", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarType, tensor_array), - &paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "reader", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarType, reader), - &paddle_mobile__framework__proto__var_type__reader_desc__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "channel", - 6, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarType, channel), - &paddle_mobile__framework__proto__var_type__channel_desc__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "tuple", - 7, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarType, tuple), - &paddle_mobile__framework__proto__var_type__tuple__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__var_type__field_indices_by_name[] = { - 5, /* field[5] = channel */ - 2, /* field[2] = lod_tensor */ - 4, /* field[4] = reader */ - 1, /* field[1] = selected_rows */ - 3, /* field[3] = tensor_array */ - 6, /* field[6] = tuple */ - 0, /* field[0] = type */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 7 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.VarType", - "VarType", - "PaddleMobile__Framework__Proto__VarType", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__VarType), - 7, - paddle_mobile__framework__proto__var_type__field_descriptors, - paddle_mobile__framework__proto__var_type__field_indices_by_name, - 1, paddle_mobile__framework__proto__var_type__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__var_type__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const protobuf_c_boolean paddle_mobile__framework__proto__var_desc__persistable__default_value = 0; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__var_desc__field_descriptors[3] = -{ - { - "name", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarDesc, name), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "type", - 2, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__VarDesc, type), - &paddle_mobile__framework__proto__var_type__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "persistable", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(PaddleMobile__Framework__Proto__VarDesc, has_persistable), - offsetof(PaddleMobile__Framework__Proto__VarDesc, persistable), - NULL, - &paddle_mobile__framework__proto__var_desc__persistable__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__var_desc__field_indices_by_name[] = { - 0, /* field[0] = name */ - 2, /* field[2] = persistable */ - 1, /* field[1] = type */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__var_desc__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 3 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_desc__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.VarDesc", - "VarDesc", - "PaddleMobile__Framework__Proto__VarDesc", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__VarDesc), - 3, - paddle_mobile__framework__proto__var_desc__field_descriptors, - paddle_mobile__framework__proto__var_desc__field_indices_by_name, - 1, paddle_mobile__framework__proto__var_desc__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__var_desc__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const int32_t paddle_mobile__framework__proto__block_desc__forward_block_idx__default_value = -1; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__block_desc__field_descriptors[5] = -{ - { - "idx", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_INT32, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__BlockDesc, idx), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "parent_idx", - 2, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_INT32, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__BlockDesc, parent_idx), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "vars", - 3, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(PaddleMobile__Framework__Proto__BlockDesc, n_vars), - offsetof(PaddleMobile__Framework__Proto__BlockDesc, vars), - &paddle_mobile__framework__proto__var_desc__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "ops", - 4, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(PaddleMobile__Framework__Proto__BlockDesc, n_ops), - offsetof(PaddleMobile__Framework__Proto__BlockDesc, ops), - &paddle_mobile__framework__proto__op_desc__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "forward_block_idx", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(PaddleMobile__Framework__Proto__BlockDesc, has_forward_block_idx), - offsetof(PaddleMobile__Framework__Proto__BlockDesc, forward_block_idx), - NULL, - &paddle_mobile__framework__proto__block_desc__forward_block_idx__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__block_desc__field_indices_by_name[] = { - 4, /* field[4] = forward_block_idx */ - 0, /* field[0] = idx */ - 3, /* field[3] = ops */ - 1, /* field[1] = parent_idx */ - 2, /* field[2] = vars */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__block_desc__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 5 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__block_desc__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.BlockDesc", - "BlockDesc", - "PaddleMobile__Framework__Proto__BlockDesc", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__BlockDesc), - 5, - paddle_mobile__framework__proto__block_desc__field_descriptors, - paddle_mobile__framework__proto__block_desc__field_indices_by_name, - 1, paddle_mobile__framework__proto__block_desc__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__block_desc__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__program_desc__field_descriptors[2] = -{ - { - "blocks", - 1, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(PaddleMobile__Framework__Proto__ProgramDesc, n_blocks), - offsetof(PaddleMobile__Framework__Proto__ProgramDesc, blocks), - &paddle_mobile__framework__proto__block_desc__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "version", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - offsetof(PaddleMobile__Framework__Proto__ProgramDesc, version), - &paddle_mobile__framework__proto__version__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned paddle_mobile__framework__proto__program_desc__field_indices_by_name[] = { - 0, /* field[0] = blocks */ - 1, /* field[1] = version */ -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__program_desc__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor paddle_mobile__framework__proto__program_desc__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.ProgramDesc", - "ProgramDesc", - "PaddleMobile__Framework__Proto__ProgramDesc", - "paddle_mobile.framework.proto", - sizeof(PaddleMobile__Framework__Proto__ProgramDesc), - 2, - paddle_mobile__framework__proto__program_desc__field_descriptors, - paddle_mobile__framework__proto__program_desc__field_indices_by_name, - 1, paddle_mobile__framework__proto__program_desc__number_ranges, - (ProtobufCMessageInit) paddle_mobile__framework__proto__program_desc__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCEnumValue paddle_mobile__framework__proto__attr_type__enum_values_by_number[11] = -{ - { "INT", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INT", 0 }, - { "FLOAT", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__FLOAT", 1 }, - { "STRING", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__STRING", 2 }, - { "INTS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INTS", 3 }, - { "FLOATS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__FLOATS", 4 }, - { "STRINGS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__STRINGS", 5 }, - { "BOOLEAN", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BOOLEAN", 6 }, - { "BOOLEANS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BOOLEANS", 7 }, - { "BLOCK", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCK", 8 }, - { "LONG", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__LONG", 9 }, - { "BLOCKS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCKS", 10 }, -}; -static const ProtobufCIntRange paddle_mobile__framework__proto__attr_type__value_ranges[] = { -{0, 0},{0, 11} -}; -static const ProtobufCEnumValueIndex paddle_mobile__framework__proto__attr_type__enum_values_by_name[11] = -{ - { "BLOCK", 8 }, - { "BLOCKS", 10 }, - { "BOOLEAN", 6 }, - { "BOOLEANS", 7 }, - { "FLOAT", 1 }, - { "FLOATS", 4 }, - { "INT", 0 }, - { "INTS", 3 }, - { "LONG", 9 }, - { "STRING", 2 }, - { "STRINGS", 5 }, -}; -const ProtobufCEnumDescriptor paddle_mobile__framework__proto__attr_type__descriptor = -{ - PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, - "paddle_mobile.framework.proto.AttrType", - "AttrType", - "PaddleMobile__Framework__Proto__AttrType", - "paddle_mobile.framework.proto", - 11, - paddle_mobile__framework__proto__attr_type__enum_values_by_number, - 11, - paddle_mobile__framework__proto__attr_type__enum_values_by_name, - 1, - paddle_mobile__framework__proto__attr_type__value_ranges, - NULL,NULL,NULL,NULL /* reserved[1234] */ +static const int64_t + paddle_mobile__framework__proto__version__version__default_value = 0ll; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__version__field_descriptors[1] = { + { + "version", 1, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT64, + offsetof(PaddleMobile__Framework__Proto__Version, has_version), + offsetof(PaddleMobile__Framework__Proto__Version, version), NULL, + &paddle_mobile__framework__proto__version__version__default_value, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__version__field_indices_by_name[] = { + 0, /* field[0] = version */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__version__number_ranges[1 + 1] = {{1, 0}, + {0, 1}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__version__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.Version", + "Version", + "PaddleMobile__Framework__Proto__Version", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__Version), + 1, + paddle_mobile__framework__proto__version__field_descriptors, + paddle_mobile__framework__proto__version__field_indices_by_name, + 1, + paddle_mobile__framework__proto__version__number_ranges, + (ProtobufCMessageInit)paddle_mobile__framework__proto__version__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__op_desc__attr__field_descriptors[13] = { + { + "name", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, name), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "type", 2, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, type), + &paddle_mobile__framework__proto__attr_type__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "i", 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_i), + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, i), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "f", 4, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_FLOAT, + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_f), + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, f), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "s", 5, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, s), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "ints", 6, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_INT32, + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_ints), + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, ints), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "floats", 7, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_FLOAT, + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_floats), + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, floats), + NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "strings", 8, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_STRING, + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_strings), + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, strings), + NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "b", 10, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_b), + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, b), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "bools", 11, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_BOOL, + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_bools), + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, bools), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "block_idx", 12, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, + has_block_idx), + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, block_idx), + NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "l", 13, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT64, + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_l), + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, l), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "blocks_idx", 14, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_INT32, + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, + n_blocks_idx), + offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, blocks_idx), + NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__op_desc__attr__field_indices_by_name[] = { + 8, /* field[8] = b */ + 10, /* field[10] = block_idx */ + 12, /* field[12] = blocks_idx */ + 9, /* field[9] = bools */ + 3, /* field[3] = f */ + 6, /* field[6] = floats */ + 2, /* field[2] = i */ + 5, /* field[5] = ints */ + 11, /* field[11] = l */ + 0, /* field[0] = name */ + 4, /* field[4] = s */ + 7, /* field[7] = strings */ + 1, /* field[1] = type */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__op_desc__attr__number_ranges[2 + 1] = { + {1, 0}, {10, 8}, {0, 13}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__op_desc__attr__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.OpDesc.Attr", + "Attr", + "PaddleMobile__Framework__Proto__OpDesc__Attr", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__OpDesc__Attr), + 13, + paddle_mobile__framework__proto__op_desc__attr__field_descriptors, + paddle_mobile__framework__proto__op_desc__attr__field_indices_by_name, + 2, + paddle_mobile__framework__proto__op_desc__attr__number_ranges, + (ProtobufCMessageInit) + paddle_mobile__framework__proto__op_desc__attr__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__op_desc__var__field_descriptors[2] = { + { + "parameter", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpDesc__Var, parameter), + NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "arguments", 2, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_STRING, + offsetof(PaddleMobile__Framework__Proto__OpDesc__Var, n_arguments), + offsetof(PaddleMobile__Framework__Proto__OpDesc__Var, arguments), + NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__op_desc__var__field_indices_by_name[] = { + 1, /* field[1] = arguments */ + 0, /* field[0] = parameter */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__op_desc__var__number_ranges[1 + 1] = { + {1, 0}, {0, 2}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__op_desc__var__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.OpDesc.Var", + "Var", + "PaddleMobile__Framework__Proto__OpDesc__Var", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__OpDesc__Var), + 2, + paddle_mobile__framework__proto__op_desc__var__field_descriptors, + paddle_mobile__framework__proto__op_desc__var__field_indices_by_name, + 1, + paddle_mobile__framework__proto__op_desc__var__number_ranges, + (ProtobufCMessageInit) + paddle_mobile__framework__proto__op_desc__var__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const protobuf_c_boolean + paddle_mobile__framework__proto__op_desc__is_target__default_value = 0; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__op_desc__field_descriptors[5] = { + { + "inputs", 1, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(PaddleMobile__Framework__Proto__OpDesc, n_inputs), + offsetof(PaddleMobile__Framework__Proto__OpDesc, inputs), + &paddle_mobile__framework__proto__op_desc__var__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "outputs", 2, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(PaddleMobile__Framework__Proto__OpDesc, n_outputs), + offsetof(PaddleMobile__Framework__Proto__OpDesc, outputs), + &paddle_mobile__framework__proto__op_desc__var__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "type", 3, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpDesc, type), NULL, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "attrs", 4, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(PaddleMobile__Framework__Proto__OpDesc, n_attrs), + offsetof(PaddleMobile__Framework__Proto__OpDesc, attrs), + &paddle_mobile__framework__proto__op_desc__attr__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "is_target", 5, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, + offsetof(PaddleMobile__Framework__Proto__OpDesc, has_is_target), + offsetof(PaddleMobile__Framework__Proto__OpDesc, is_target), NULL, + &paddle_mobile__framework__proto__op_desc__is_target__default_value, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__op_desc__field_indices_by_name[] = { + 3, /* field[3] = attrs */ + 0, /* field[0] = inputs */ + 4, /* field[4] = is_target */ + 1, /* field[1] = outputs */ + 2, /* field[2] = type */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__op_desc__number_ranges[1 + 1] = {{1, 0}, + {0, 5}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__op_desc__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.OpDesc", + "OpDesc", + "PaddleMobile__Framework__Proto__OpDesc", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__OpDesc), + 5, + paddle_mobile__framework__proto__op_desc__field_descriptors, + paddle_mobile__framework__proto__op_desc__field_indices_by_name, + 1, + paddle_mobile__framework__proto__op_desc__number_ranges, + (ProtobufCMessageInit)paddle_mobile__framework__proto__op_desc__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const protobuf_c_boolean + paddle_mobile__framework__proto__op_proto__var__duplicable__default_value = + 0; +static const protobuf_c_boolean + paddle_mobile__framework__proto__op_proto__var__intermediate__default_value = + 0; +static const protobuf_c_boolean + paddle_mobile__framework__proto__op_proto__var__dispensable__default_value = + 0; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__op_proto__var__field_descriptors[6] = { + { + "name", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpProto__Var, name), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "comment", 2, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpProto__Var, comment), + NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "duplicable", 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, + offsetof(PaddleMobile__Framework__Proto__OpProto__Var, + has_duplicable), + offsetof(PaddleMobile__Framework__Proto__OpProto__Var, duplicable), + NULL, + &paddle_mobile__framework__proto__op_proto__var__duplicable__default_value, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "intermediate", 4, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, + offsetof(PaddleMobile__Framework__Proto__OpProto__Var, + has_intermediate), + offsetof(PaddleMobile__Framework__Proto__OpProto__Var, + intermediate), + NULL, + &paddle_mobile__framework__proto__op_proto__var__intermediate__default_value, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "dispensable", 5, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, + offsetof(PaddleMobile__Framework__Proto__OpProto__Var, + has_dispensable), + offsetof(PaddleMobile__Framework__Proto__OpProto__Var, dispensable), + NULL, + &paddle_mobile__framework__proto__op_proto__var__dispensable__default_value, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "reuse", 6, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpProto__Var, reuse), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__op_proto__var__field_indices_by_name[] = { + 1, /* field[1] = comment */ + 4, /* field[4] = dispensable */ + 2, /* field[2] = duplicable */ + 3, /* field[3] = intermediate */ + 0, /* field[0] = name */ + 5, /* field[5] = reuse */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__op_proto__var__number_ranges[1 + 1] = { + {1, 0}, {0, 6}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__op_proto__var__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.OpProto.Var", + "Var", + "PaddleMobile__Framework__Proto__OpProto__Var", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__OpProto__Var), + 6, + paddle_mobile__framework__proto__op_proto__var__field_descriptors, + paddle_mobile__framework__proto__op_proto__var__field_indices_by_name, + 1, + paddle_mobile__framework__proto__op_proto__var__number_ranges, + (ProtobufCMessageInit) + paddle_mobile__framework__proto__op_proto__var__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const protobuf_c_boolean + paddle_mobile__framework__proto__op_proto__attr__generated__default_value = + 0; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__op_proto__attr__field_descriptors[4] = { + { + "name", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, name), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "type", 2, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, type), + &paddle_mobile__framework__proto__attr_type__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "comment", 3, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, comment), + NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "generated", 4, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, + offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, + has_generated), + offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, generated), + NULL, + &paddle_mobile__framework__proto__op_proto__attr__generated__default_value, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__op_proto__attr__field_indices_by_name[] = { + 2, /* field[2] = comment */ + 3, /* field[3] = generated */ + 0, /* field[0] = name */ + 1, /* field[1] = type */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__op_proto__attr__number_ranges[1 + 1] = { + {1, 0}, {0, 4}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__op_proto__attr__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.OpProto.Attr", + "Attr", + "PaddleMobile__Framework__Proto__OpProto__Attr", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__OpProto__Attr), + 4, + paddle_mobile__framework__proto__op_proto__attr__field_descriptors, + paddle_mobile__framework__proto__op_proto__attr__field_indices_by_name, + 1, + paddle_mobile__framework__proto__op_proto__attr__number_ranges, + (ProtobufCMessageInit) + paddle_mobile__framework__proto__op_proto__attr__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__op_proto__field_descriptors[5] = { + { + "type", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpProto, type), NULL, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "inputs", 2, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(PaddleMobile__Framework__Proto__OpProto, n_inputs), + offsetof(PaddleMobile__Framework__Proto__OpProto, inputs), + &paddle_mobile__framework__proto__op_proto__var__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "outputs", 3, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(PaddleMobile__Framework__Proto__OpProto, n_outputs), + offsetof(PaddleMobile__Framework__Proto__OpProto, outputs), + &paddle_mobile__framework__proto__op_proto__var__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "attrs", 4, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(PaddleMobile__Framework__Proto__OpProto, n_attrs), + offsetof(PaddleMobile__Framework__Proto__OpProto, attrs), + &paddle_mobile__framework__proto__op_proto__attr__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "comment", 5, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__OpProto, comment), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__op_proto__field_indices_by_name[] = { + 3, /* field[3] = attrs */ + 4, /* field[4] = comment */ + 1, /* field[1] = inputs */ + 2, /* field[2] = outputs */ + 0, /* field[0] = type */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__op_proto__number_ranges[1 + 1] = {{1, 0}, + {0, 5}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__op_proto__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.OpProto", + "OpProto", + "PaddleMobile__Framework__Proto__OpProto", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__OpProto), + 5, + paddle_mobile__framework__proto__op_proto__field_descriptors, + paddle_mobile__framework__proto__op_proto__field_indices_by_name, + 1, + paddle_mobile__framework__proto__op_proto__number_ranges, + (ProtobufCMessageInit)paddle_mobile__framework__proto__op_proto__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__var_type__tensor_desc__field_descriptors + [2] = { + { + "data_type", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarType__TensorDesc, + data_type), + &paddle_mobile__framework__proto__var_type__type__descriptor, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "dims", 2, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_INT64, + offsetof(PaddleMobile__Framework__Proto__VarType__TensorDesc, + n_dims), + offsetof(PaddleMobile__Framework__Proto__VarType__TensorDesc, + dims), + NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__var_type__tensor_desc__field_indices_by_name + [] = { + 0, /* field[0] = data_type */ + 1, /* field[1] = dims */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__var_type__tensor_desc__number_ranges[1 + + 1] = { + {1, 0}, {0, 2}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__tensor_desc__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.VarType.TensorDesc", + "TensorDesc", + "PaddleMobile__Framework__Proto__VarType__TensorDesc", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__VarType__TensorDesc), + 2, + paddle_mobile__framework__proto__var_type__tensor_desc__field_descriptors, + paddle_mobile__framework__proto__var_type__tensor_desc__field_indices_by_name, + 1, + paddle_mobile__framework__proto__var_type__tensor_desc__number_ranges, + (ProtobufCMessageInit) + paddle_mobile__framework__proto__var_type__tensor_desc__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const int32_t + paddle_mobile__framework__proto__var_type__lo_dtensor_desc__lod_level__default_value = + 0; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_descriptors + [2] = { + { + "tensor", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc, + tensor), + &paddle_mobile__framework__proto__var_type__tensor_desc__descriptor, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "lod_level", 2, PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc, + has_lod_level), + offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc, + lod_level), + NULL, + &paddle_mobile__framework__proto__var_type__lo_dtensor_desc__lod_level__default_value, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_indices_by_name + [] = { + 1, /* field[1] = lod_level */ + 0, /* field[0] = tensor */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__var_type__lo_dtensor_desc__number_ranges + [1 + 1] = {{1, 0}, {0, 2}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.VarType.LoDTensorDesc", + "LoDTensorDesc", + "PaddleMobile__Framework__Proto__VarType__LoDTensorDesc", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc), + 2, + paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_descriptors, + paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_indices_by_name, + 1, + paddle_mobile__framework__proto__var_type__lo_dtensor_desc__number_ranges, + (ProtobufCMessageInit) + paddle_mobile__framework__proto__var_type__lo_dtensor_desc__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const int32_t + paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__lod_level__default_value = + 0; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__field_descriptors + [2] = { + { + "tensor", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof( + PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc, + tensor), + &paddle_mobile__framework__proto__var_type__tensor_desc__descriptor, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "lod_level", 2, PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof( + PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc, + has_lod_level), + offsetof( + PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc, + lod_level), + NULL, + &paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__lod_level__default_value, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__field_indices_by_name + [] = { + 1, /* field[1] = lod_level */ + 0, /* field[0] = tensor */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__number_ranges + [1 + 1] = {{1, 0}, {0, 2}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc", + "LoDTensorArrayDesc", + "PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc), + 2, + paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__field_descriptors, + paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__field_indices_by_name, + 1, + paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__number_ranges, + (ProtobufCMessageInit) + paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__var_type__reader_desc__field_descriptors[1] = { + { + "lod_tensor", 1, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(PaddleMobile__Framework__Proto__VarType__ReaderDesc, + n_lod_tensor), + offsetof(PaddleMobile__Framework__Proto__VarType__ReaderDesc, + lod_tensor), + &paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__var_type__reader_desc__field_indices_by_name + [] = { + 0, /* field[0] = lod_tensor */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__var_type__reader_desc__number_ranges[1 + + 1] = { + {1, 0}, {0, 1}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__reader_desc__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.VarType.ReaderDesc", + "ReaderDesc", + "PaddleMobile__Framework__Proto__VarType__ReaderDesc", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__VarType__ReaderDesc), + 1, + paddle_mobile__framework__proto__var_type__reader_desc__field_descriptors, + paddle_mobile__framework__proto__var_type__reader_desc__field_indices_by_name, + 1, + paddle_mobile__framework__proto__var_type__reader_desc__number_ranges, + (ProtobufCMessageInit) + paddle_mobile__framework__proto__var_type__reader_desc__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__var_type__channel_desc__field_descriptors + [2] = { + { + "data_type", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarType__ChannelDesc, + data_type), + &paddle_mobile__framework__proto__var_type__type__descriptor, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "capacity", 2, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarType__ChannelDesc, + capacity), + NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__var_type__channel_desc__field_indices_by_name + [] = { + 1, /* field[1] = capacity */ + 0, /* field[0] = data_type */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__var_type__channel_desc__number_ranges[1 + + 1] = + {{1, 0}, {0, 2}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__channel_desc__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.VarType.ChannelDesc", + "ChannelDesc", + "PaddleMobile__Framework__Proto__VarType__ChannelDesc", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__VarType__ChannelDesc), + 2, + paddle_mobile__framework__proto__var_type__channel_desc__field_descriptors, + paddle_mobile__framework__proto__var_type__channel_desc__field_indices_by_name, + 1, + paddle_mobile__framework__proto__var_type__channel_desc__number_ranges, + (ProtobufCMessageInit) + paddle_mobile__framework__proto__var_type__channel_desc__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__var_type__tuple__field_descriptors[1] = { + { + "element_type", 1, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_ENUM, + offsetof(PaddleMobile__Framework__Proto__VarType__Tuple, + n_element_type), + offsetof(PaddleMobile__Framework__Proto__VarType__Tuple, + element_type), + &paddle_mobile__framework__proto__var_type__type__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__var_type__tuple__field_indices_by_name[] = + { + 0, /* field[0] = element_type */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__var_type__tuple__number_ranges[1 + 1] = { + {1, 0}, {0, 1}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__tuple__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.VarType.Tuple", + "Tuple", + "PaddleMobile__Framework__Proto__VarType__Tuple", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__VarType__Tuple), + 1, + paddle_mobile__framework__proto__var_type__tuple__field_descriptors, + paddle_mobile__framework__proto__var_type__tuple__field_indices_by_name, + 1, + paddle_mobile__framework__proto__var_type__tuple__number_ranges, + (ProtobufCMessageInit) + paddle_mobile__framework__proto__var_type__tuple__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue + paddle_mobile__framework__proto__var_type__type__enum_values_by_number[22] = + { + {"BOOL", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__BOOL", + 0}, + {"INT16", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__INT16", + 1}, + {"INT32", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__INT32", + 2}, + {"INT64", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__INT64", + 3}, + {"FP16", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__FP16", + 4}, + {"FP32", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__FP32", + 5}, + {"FP64", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__FP64", + 6}, + {"LOD_TENSOR", + "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__LOD_TENSOR", 7}, + {"SELECTED_ROWS", + "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__SELECTED_ROWS", + 8}, + {"FEED_MINIBATCH", + "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__FEED_MINIBATCH", + 9}, + {"FETCH_LIST", + "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__FETCH_LIST", 10}, + {"STEP_SCOPES", + "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__STEP_SCOPES", + 11}, + {"LOD_RANK_TABLE", + "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__LOD_RANK_TABLE", + 12}, + {"LOD_TENSOR_ARRAY", + "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__LOD_TENSOR_" + "ARRAY", + 13}, + {"PLACE_LIST", + "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__PLACE_LIST", 14}, + {"READER", + "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__READER", 15}, + {"CHANNEL", + "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__CHANNEL", 16}, + {"RAW", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__RAW", 17}, + {"TUPLE", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__TUPLE", + 18}, + {"SIZE_T", + "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__SIZE_T", 19}, + {"UINT8", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__UINT8", + 20}, + {"INT8", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__INT8", + 21}, +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__var_type__type__value_ranges[] = {{0, 0}, + {0, 22}}; +static const ProtobufCEnumValueIndex + paddle_mobile__framework__proto__var_type__type__enum_values_by_name[22] = { + {"BOOL", 0}, {"CHANNEL", 16}, + {"FEED_MINIBATCH", 9}, {"FETCH_LIST", 10}, + {"FP16", 4}, {"FP32", 5}, + {"FP64", 6}, {"INT16", 1}, + {"INT32", 2}, {"INT64", 3}, + {"INT8", 21}, {"LOD_RANK_TABLE", 12}, + {"LOD_TENSOR", 7}, {"LOD_TENSOR_ARRAY", 13}, + {"PLACE_LIST", 14}, {"RAW", 17}, + {"READER", 15}, {"SELECTED_ROWS", 8}, + {"SIZE_T", 19}, {"STEP_SCOPES", 11}, + {"TUPLE", 18}, {"UINT8", 20}, +}; +const ProtobufCEnumDescriptor + paddle_mobile__framework__proto__var_type__type__descriptor = { + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.VarType.Type", + "Type", + "PaddleMobile__Framework__Proto__VarType__Type", + "paddle_mobile.framework.proto", + 22, + paddle_mobile__framework__proto__var_type__type__enum_values_by_number, + 22, + paddle_mobile__framework__proto__var_type__type__enum_values_by_name, + 1, + paddle_mobile__framework__proto__var_type__type__value_ranges, + NULL, + NULL, + NULL, + NULL /* reserved[1234] */ +}; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__var_type__field_descriptors[7] = { + { + "type", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarType, type), + &paddle_mobile__framework__proto__var_type__type__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "selected_rows", 2, PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarType, selected_rows), + &paddle_mobile__framework__proto__var_type__tensor_desc__descriptor, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "lod_tensor", 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarType, lod_tensor), + &paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "tensor_array", 4, PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarType, tensor_array), + &paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "reader", 5, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarType, reader), + &paddle_mobile__framework__proto__var_type__reader_desc__descriptor, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "channel", 6, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarType, channel), + &paddle_mobile__framework__proto__var_type__channel_desc__descriptor, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "tuple", 7, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarType, tuple), + &paddle_mobile__framework__proto__var_type__tuple__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__var_type__field_indices_by_name[] = { + 5, /* field[5] = channel */ + 2, /* field[2] = lod_tensor */ + 4, /* field[4] = reader */ + 1, /* field[1] = selected_rows */ + 3, /* field[3] = tensor_array */ + 6, /* field[6] = tuple */ + 0, /* field[0] = type */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__var_type__number_ranges[1 + 1] = {{1, 0}, + {0, 7}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.VarType", + "VarType", + "PaddleMobile__Framework__Proto__VarType", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__VarType), + 7, + paddle_mobile__framework__proto__var_type__field_descriptors, + paddle_mobile__framework__proto__var_type__field_indices_by_name, + 1, + paddle_mobile__framework__proto__var_type__number_ranges, + (ProtobufCMessageInit)paddle_mobile__framework__proto__var_type__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const protobuf_c_boolean + paddle_mobile__framework__proto__var_desc__persistable__default_value = 0; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__var_desc__field_descriptors[3] = { + { + "name", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarDesc, name), NULL, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "type", 2, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__VarDesc, type), + &paddle_mobile__framework__proto__var_type__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "persistable", 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, + offsetof(PaddleMobile__Framework__Proto__VarDesc, has_persistable), + offsetof(PaddleMobile__Framework__Proto__VarDesc, persistable), + NULL, + &paddle_mobile__framework__proto__var_desc__persistable__default_value, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__var_desc__field_indices_by_name[] = { + 0, /* field[0] = name */ + 2, /* field[2] = persistable */ + 1, /* field[1] = type */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__var_desc__number_ranges[1 + 1] = {{1, 0}, + {0, 3}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_desc__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.VarDesc", + "VarDesc", + "PaddleMobile__Framework__Proto__VarDesc", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__VarDesc), + 3, + paddle_mobile__framework__proto__var_desc__field_descriptors, + paddle_mobile__framework__proto__var_desc__field_indices_by_name, + 1, + paddle_mobile__framework__proto__var_desc__number_ranges, + (ProtobufCMessageInit)paddle_mobile__framework__proto__var_desc__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const int32_t + paddle_mobile__framework__proto__block_desc__forward_block_idx__default_value = + -1; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__block_desc__field_descriptors[5] = { + { + "idx", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__BlockDesc, idx), NULL, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "parent_idx", 2, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__BlockDesc, parent_idx), + NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "vars", 3, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(PaddleMobile__Framework__Proto__BlockDesc, n_vars), + offsetof(PaddleMobile__Framework__Proto__BlockDesc, vars), + &paddle_mobile__framework__proto__var_desc__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "ops", 4, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(PaddleMobile__Framework__Proto__BlockDesc, n_ops), + offsetof(PaddleMobile__Framework__Proto__BlockDesc, ops), + &paddle_mobile__framework__proto__op_desc__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "forward_block_idx", 5, PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(PaddleMobile__Framework__Proto__BlockDesc, + has_forward_block_idx), + offsetof(PaddleMobile__Framework__Proto__BlockDesc, + forward_block_idx), + NULL, + &paddle_mobile__framework__proto__block_desc__forward_block_idx__default_value, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__block_desc__field_indices_by_name[] = { + 4, /* field[4] = forward_block_idx */ + 0, /* field[0] = idx */ + 3, /* field[3] = ops */ + 1, /* field[1] = parent_idx */ + 2, /* field[2] = vars */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__block_desc__number_ranges[1 + 1] = { + {1, 0}, {0, 5}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__block_desc__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.BlockDesc", + "BlockDesc", + "PaddleMobile__Framework__Proto__BlockDesc", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__BlockDesc), + 5, + paddle_mobile__framework__proto__block_desc__field_descriptors, + paddle_mobile__framework__proto__block_desc__field_indices_by_name, + 1, + paddle_mobile__framework__proto__block_desc__number_ranges, + (ProtobufCMessageInit)paddle_mobile__framework__proto__block_desc__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor + paddle_mobile__framework__proto__program_desc__field_descriptors[2] = { + { + "blocks", 1, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(PaddleMobile__Framework__Proto__ProgramDesc, n_blocks), + offsetof(PaddleMobile__Framework__Proto__ProgramDesc, blocks), + &paddle_mobile__framework__proto__block_desc__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "version", 2, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(PaddleMobile__Framework__Proto__ProgramDesc, version), + &paddle_mobile__framework__proto__version__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned + paddle_mobile__framework__proto__program_desc__field_indices_by_name[] = { + 0, /* field[0] = blocks */ + 1, /* field[1] = version */ +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__program_desc__number_ranges[1 + 1] = { + {1, 0}, {0, 2}}; +const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__program_desc__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.ProgramDesc", + "ProgramDesc", + "PaddleMobile__Framework__Proto__ProgramDesc", + "paddle_mobile.framework.proto", + sizeof(PaddleMobile__Framework__Proto__ProgramDesc), + 2, + paddle_mobile__framework__proto__program_desc__field_descriptors, + paddle_mobile__framework__proto__program_desc__field_indices_by_name, + 1, + paddle_mobile__framework__proto__program_desc__number_ranges, + (ProtobufCMessageInit) + paddle_mobile__framework__proto__program_desc__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue + paddle_mobile__framework__proto__attr_type__enum_values_by_number[11] = { + {"INT", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INT", 0}, + {"FLOAT", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__FLOAT", 1}, + {"STRING", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__STRING", 2}, + {"INTS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INTS", 3}, + {"FLOATS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__FLOATS", 4}, + {"STRINGS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__STRINGS", 5}, + {"BOOLEAN", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BOOLEAN", 6}, + {"BOOLEANS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BOOLEANS", 7}, + {"BLOCK", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCK", 8}, + {"LONG", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__LONG", 9}, + {"BLOCKS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCKS", 10}, +}; +static const ProtobufCIntRange + paddle_mobile__framework__proto__attr_type__value_ranges[] = {{0, 0}, + {0, 11}}; +static const ProtobufCEnumValueIndex + paddle_mobile__framework__proto__attr_type__enum_values_by_name[11] = { + {"BLOCK", 8}, {"BLOCKS", 10}, {"BOOLEAN", 6}, {"BOOLEANS", 7}, + {"FLOAT", 1}, {"FLOATS", 4}, {"INT", 0}, {"INTS", 3}, + {"LONG", 9}, {"STRING", 2}, {"STRINGS", 5}, +}; +const ProtobufCEnumDescriptor + paddle_mobile__framework__proto__attr_type__descriptor = { + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "paddle_mobile.framework.proto.AttrType", + "AttrType", + "PaddleMobile__Framework__Proto__AttrType", + "paddle_mobile.framework.proto", + 11, + paddle_mobile__framework__proto__attr_type__enum_values_by_number, + 11, + paddle_mobile__framework__proto__attr_type__enum_values_by_name, + 1, + paddle_mobile__framework__proto__attr_type__value_ranges, + NULL, + NULL, + NULL, + NULL /* reserved[1234] */ }; diff --git a/src/framework/framework.pb-c.h b/src/framework/framework.pb-c.h index 4044ecbc8897161ecdce488a468783b6a3d34e2f..12e2c2db55215457b085d5146827d523fdcea213 100644 --- a/src/framework/framework.pb-c.h +++ b/src/framework/framework.pb-c.h @@ -14,25 +14,40 @@ PROTOBUF_C__BEGIN_DECLS # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. #endif - -typedef struct _PaddleMobile__Framework__Proto__Version PaddleMobile__Framework__Proto__Version; -typedef struct _PaddleMobile__Framework__Proto__OpDesc PaddleMobile__Framework__Proto__OpDesc; -typedef struct _PaddleMobile__Framework__Proto__OpDesc__Attr PaddleMobile__Framework__Proto__OpDesc__Attr; -typedef struct _PaddleMobile__Framework__Proto__OpDesc__Var PaddleMobile__Framework__Proto__OpDesc__Var; -typedef struct _PaddleMobile__Framework__Proto__OpProto PaddleMobile__Framework__Proto__OpProto; -typedef struct _PaddleMobile__Framework__Proto__OpProto__Var PaddleMobile__Framework__Proto__OpProto__Var; -typedef struct _PaddleMobile__Framework__Proto__OpProto__Attr PaddleMobile__Framework__Proto__OpProto__Attr; -typedef struct _PaddleMobile__Framework__Proto__VarType PaddleMobile__Framework__Proto__VarType; -typedef struct _PaddleMobile__Framework__Proto__VarType__TensorDesc PaddleMobile__Framework__Proto__VarType__TensorDesc; -typedef struct _PaddleMobile__Framework__Proto__VarType__LoDTensorDesc PaddleMobile__Framework__Proto__VarType__LoDTensorDesc; -typedef struct _PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc; -typedef struct _PaddleMobile__Framework__Proto__VarType__ReaderDesc PaddleMobile__Framework__Proto__VarType__ReaderDesc; -typedef struct _PaddleMobile__Framework__Proto__VarType__ChannelDesc PaddleMobile__Framework__Proto__VarType__ChannelDesc; -typedef struct _PaddleMobile__Framework__Proto__VarType__Tuple PaddleMobile__Framework__Proto__VarType__Tuple; -typedef struct _PaddleMobile__Framework__Proto__VarDesc PaddleMobile__Framework__Proto__VarDesc; -typedef struct _PaddleMobile__Framework__Proto__BlockDesc PaddleMobile__Framework__Proto__BlockDesc; -typedef struct _PaddleMobile__Framework__Proto__ProgramDesc PaddleMobile__Framework__Proto__ProgramDesc; - +typedef struct _PaddleMobile__Framework__Proto__Version + PaddleMobile__Framework__Proto__Version; +typedef struct _PaddleMobile__Framework__Proto__OpDesc + PaddleMobile__Framework__Proto__OpDesc; +typedef struct _PaddleMobile__Framework__Proto__OpDesc__Attr + PaddleMobile__Framework__Proto__OpDesc__Attr; +typedef struct _PaddleMobile__Framework__Proto__OpDesc__Var + PaddleMobile__Framework__Proto__OpDesc__Var; +typedef struct _PaddleMobile__Framework__Proto__OpProto + PaddleMobile__Framework__Proto__OpProto; +typedef struct _PaddleMobile__Framework__Proto__OpProto__Var + PaddleMobile__Framework__Proto__OpProto__Var; +typedef struct _PaddleMobile__Framework__Proto__OpProto__Attr + PaddleMobile__Framework__Proto__OpProto__Attr; +typedef struct _PaddleMobile__Framework__Proto__VarType + PaddleMobile__Framework__Proto__VarType; +typedef struct _PaddleMobile__Framework__Proto__VarType__TensorDesc + PaddleMobile__Framework__Proto__VarType__TensorDesc; +typedef struct _PaddleMobile__Framework__Proto__VarType__LoDTensorDesc + PaddleMobile__Framework__Proto__VarType__LoDTensorDesc; +typedef struct _PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc + PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc; +typedef struct _PaddleMobile__Framework__Proto__VarType__ReaderDesc + PaddleMobile__Framework__Proto__VarType__ReaderDesc; +typedef struct _PaddleMobile__Framework__Proto__VarType__ChannelDesc + PaddleMobile__Framework__Proto__VarType__ChannelDesc; +typedef struct _PaddleMobile__Framework__Proto__VarType__Tuple + PaddleMobile__Framework__Proto__VarType__Tuple; +typedef struct _PaddleMobile__Framework__Proto__VarDesc + PaddleMobile__Framework__Proto__VarDesc; +typedef struct _PaddleMobile__Framework__Proto__BlockDesc + PaddleMobile__Framework__Proto__BlockDesc; +typedef struct _PaddleMobile__Framework__Proto__ProgramDesc + PaddleMobile__Framework__Proto__ProgramDesc; /* --- enums --- */ @@ -72,8 +87,9 @@ typedef enum _PaddleMobile__Framework__Proto__VarType__Type { * in operators like nccl_op */ PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__RAW = 17, - PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__TUPLE = 18 - PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE) + PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__TUPLE = + 18 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE( + PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE) } PaddleMobile__Framework__Proto__VarType__Type; typedef enum _PaddleMobile__Framework__Proto__AttrType { PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INT = 0, @@ -86,8 +102,9 @@ typedef enum _PaddleMobile__Framework__Proto__AttrType { PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BOOLEANS = 7, PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCK = 8, PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__LONG = 9, - PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCKS = 10 - PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE) + PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCKS = + 10 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE( + PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE) } PaddleMobile__Framework__Proto__AttrType; /* --- messages --- */ @@ -98,19 +115,19 @@ typedef enum _PaddleMobile__Framework__Proto__AttrType { * Serailization and Deserialization codes should be modified in a way * that supports old versions following the version and compatibility policy. */ -struct _PaddleMobile__Framework__Proto__Version -{ +struct _PaddleMobile__Framework__Proto__Version { ProtobufCMessage base; protobuf_c_boolean has_version; int64_t version; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__VERSION__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__version__descriptor) \ - , 0, 0ll } - - -struct _PaddleMobile__Framework__Proto__OpDesc__Attr -{ +#define PADDLE_MOBILE__FRAMEWORK__PROTO__VERSION__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__version__descriptor) \ + , 0, 0ll \ + } + +struct _PaddleMobile__Framework__Proto__OpDesc__Attr { ProtobufCMessage base; char *name; PaddleMobile__Framework__Proto__AttrType type; @@ -136,29 +153,32 @@ struct _PaddleMobile__Framework__Proto__OpDesc__Attr size_t n_blocks_idx; int32_t *blocks_idx; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__ATTR__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__op_desc__attr__descriptor) \ - , NULL, PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INT, 0, 0, 0, 0, NULL, 0,NULL, 0,NULL, 0,NULL, 0, 0, 0,NULL, 0, 0, 0, 0, 0,NULL } - - -struct _PaddleMobile__Framework__Proto__OpDesc__Var -{ +#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__ATTR__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__op_desc__attr__descriptor) \ + , NULL, PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INT, 0, 0, 0, 0, NULL, \ + 0, NULL, 0, NULL, 0, NULL, 0, 0, 0, NULL, 0, 0, 0, 0, 0, NULL \ + } + +struct _PaddleMobile__Framework__Proto__OpDesc__Var { ProtobufCMessage base; char *parameter; size_t n_arguments; char **arguments; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__VAR__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__op_desc__var__descriptor) \ - , NULL, 0,NULL } - +#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__VAR__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__op_desc__var__descriptor) \ + , NULL, 0, NULL \ + } /* * OpDesc describes an instance of a C++ framework::OperatorBase * derived class type. */ -struct _PaddleMobile__Framework__Proto__OpDesc -{ +struct _PaddleMobile__Framework__Proto__OpDesc { ProtobufCMessage base; char *type; size_t n_inputs; @@ -170,16 +190,17 @@ struct _PaddleMobile__Framework__Proto__OpDesc protobuf_c_boolean has_is_target; protobuf_c_boolean is_target; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__op_desc__descriptor) \ - , NULL, 0,NULL, 0,NULL, 0,NULL, 0, 0 } - +#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__op_desc__descriptor) \ + , NULL, 0, NULL, 0, NULL, 0, NULL, 0, 0 \ + } /* * VarProto describes the C++ type framework::Variable. */ -struct _PaddleMobile__Framework__Proto__OpProto__Var -{ +struct _PaddleMobile__Framework__Proto__OpProto__Var { ProtobufCMessage base; char *name; char *comment; @@ -191,16 +212,17 @@ struct _PaddleMobile__Framework__Proto__OpProto__Var protobuf_c_boolean dispensable; char *reuse; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__VAR__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__op_proto__var__descriptor) \ - , NULL, NULL, 0, 0, 0, 0, 0, 0, NULL } - +#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__VAR__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__op_proto__var__descriptor) \ + , NULL, NULL, 0, 0, 0, 0, 0, 0, NULL \ + } /* * AttrProto describes the C++ type Attribute. */ -struct _PaddleMobile__Framework__Proto__OpProto__Attr -{ +struct _PaddleMobile__Framework__Proto__OpProto__Attr { ProtobufCMessage base; char *name; PaddleMobile__Framework__Proto__AttrType type; @@ -213,16 +235,17 @@ struct _PaddleMobile__Framework__Proto__OpProto__Attr protobuf_c_boolean has_generated; protobuf_c_boolean generated; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__ATTR__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__op_proto__attr__descriptor) \ - , NULL, PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INT, NULL, 0, 0 } - +#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__ATTR__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__op_proto__attr__descriptor) \ + , NULL, PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INT, NULL, 0, 0 \ + } /* * OpProto describes a C++ framework::OperatorBase derived class. */ -struct _PaddleMobile__Framework__Proto__OpProto -{ +struct _PaddleMobile__Framework__Proto__OpProto { ProtobufCMessage base; char *type; size_t n_inputs; @@ -233,13 +256,14 @@ struct _PaddleMobile__Framework__Proto__OpProto PaddleMobile__Framework__Proto__OpProto__Attr **attrs; char *comment; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__op_proto__descriptor) \ - , NULL, 0,NULL, 0,NULL, 0,NULL, NULL } - - -struct _PaddleMobile__Framework__Proto__VarType__TensorDesc -{ +#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__op_proto__descriptor) \ + , NULL, 0, NULL, 0, NULL, 0, NULL, NULL \ + } + +struct _PaddleMobile__Framework__Proto__VarType__TensorDesc { ProtobufCMessage base; /* * Should only be PODType. Is enforced in C++ @@ -251,70 +275,76 @@ struct _PaddleMobile__Framework__Proto__VarType__TensorDesc size_t n_dims; int64_t *dims; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TENSOR_DESC__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__var_type__tensor_desc__descriptor) \ - , PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__BOOL, 0,NULL } - - -struct _PaddleMobile__Framework__Proto__VarType__LoDTensorDesc -{ +#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TENSOR_DESC__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__var_type__tensor_desc__descriptor) \ + , PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__BOOL, 0, NULL \ + } + +struct _PaddleMobile__Framework__Proto__VarType__LoDTensorDesc { ProtobufCMessage base; PaddleMobile__Framework__Proto__VarType__TensorDesc *tensor; protobuf_c_boolean has_lod_level; int32_t lod_level; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_DESC__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor) \ - , NULL, 0, 0 } - - -struct _PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc -{ +#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_DESC__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor) \ + , NULL, 0, 0 \ + } + +struct _PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc { ProtobufCMessage base; PaddleMobile__Framework__Proto__VarType__TensorDesc *tensor; protobuf_c_boolean has_lod_level; int32_t lod_level; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_ARRAY_DESC__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor) \ - , NULL, 0, 0 } - - -struct _PaddleMobile__Framework__Proto__VarType__ReaderDesc -{ +#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_ARRAY_DESC__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor) \ + , NULL, 0, 0 \ + } + +struct _PaddleMobile__Framework__Proto__VarType__ReaderDesc { ProtobufCMessage base; size_t n_lod_tensor; PaddleMobile__Framework__Proto__VarType__LoDTensorDesc **lod_tensor; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__READER_DESC__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__var_type__reader_desc__descriptor) \ - , 0,NULL } - - -struct _PaddleMobile__Framework__Proto__VarType__ChannelDesc -{ +#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__READER_DESC__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__var_type__reader_desc__descriptor) \ + , 0, NULL \ + } + +struct _PaddleMobile__Framework__Proto__VarType__ChannelDesc { ProtobufCMessage base; PaddleMobile__Framework__Proto__VarType__Type data_type; int64_t capacity; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__CHANNEL_DESC__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__var_type__channel_desc__descriptor) \ - , PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__BOOL, 0 } - - -struct _PaddleMobile__Framework__Proto__VarType__Tuple -{ +#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__CHANNEL_DESC__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__var_type__channel_desc__descriptor) \ + , PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__BOOL, 0 \ + } + +struct _PaddleMobile__Framework__Proto__VarType__Tuple { ProtobufCMessage base; size_t n_element_type; PaddleMobile__Framework__Proto__VarType__Type *element_type; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TUPLE__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__var_type__tuple__descriptor) \ - , 0,NULL } - - -struct _PaddleMobile__Framework__Proto__VarType -{ +#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TUPLE__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__var_type__tuple__descriptor) \ + , 0, NULL \ + } + +struct _PaddleMobile__Framework__Proto__VarType { ProtobufCMessage base; PaddleMobile__Framework__Proto__VarType__Type type; PaddleMobile__Framework__Proto__VarType__TensorDesc *selected_rows; @@ -324,26 +354,29 @@ struct _PaddleMobile__Framework__Proto__VarType PaddleMobile__Framework__Proto__VarType__ChannelDesc *channel; PaddleMobile__Framework__Proto__VarType__Tuple *tuple; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__var_type__descriptor) \ - , PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__BOOL, NULL, NULL, NULL, NULL, NULL, NULL } - - -struct _PaddleMobile__Framework__Proto__VarDesc -{ +#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__var_type__descriptor) \ + , PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__BOOL, NULL, NULL, NULL, \ + NULL, NULL, NULL \ + } + +struct _PaddleMobile__Framework__Proto__VarDesc { ProtobufCMessage base; char *name; PaddleMobile__Framework__Proto__VarType *type; protobuf_c_boolean has_persistable; protobuf_c_boolean persistable; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_DESC__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__var_desc__descriptor) \ - , NULL, NULL, 0, 0 } - - -struct _PaddleMobile__Framework__Proto__BlockDesc -{ +#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_DESC__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__var_desc__descriptor) \ + , NULL, NULL, 0, 0 \ + } + +struct _PaddleMobile__Framework__Proto__BlockDesc { ProtobufCMessage base; int32_t idx; int32_t parent_idx; @@ -354,10 +387,12 @@ struct _PaddleMobile__Framework__Proto__BlockDesc protobuf_c_boolean has_forward_block_idx; int32_t forward_block_idx; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__BLOCK_DESC__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__block_desc__descriptor) \ - , 0, 0, 0,NULL, 0,NULL, 0, -1 } - +#define PADDLE_MOBILE__FRAMEWORK__PROTO__BLOCK_DESC__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__block_desc__descriptor) \ + , 0, 0, 0, NULL, 0, NULL, 0, -1 \ + } /* * Please refer to @@ -366,261 +401,259 @@ struct _PaddleMobile__Framework__Proto__BlockDesc * TODO(panyx0718): A model can have multiple programs. Need a * way to distinguish them. Maybe ID or name? */ -struct _PaddleMobile__Framework__Proto__ProgramDesc -{ +struct _PaddleMobile__Framework__Proto__ProgramDesc { ProtobufCMessage base; size_t n_blocks; PaddleMobile__Framework__Proto__BlockDesc **blocks; PaddleMobile__Framework__Proto__Version *version; }; -#define PADDLE_MOBILE__FRAMEWORK__PROTO__PROGRAM_DESC__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__program_desc__descriptor) \ - , 0,NULL, NULL } - +#define PADDLE_MOBILE__FRAMEWORK__PROTO__PROGRAM_DESC__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT( \ + &paddle_mobile__framework__proto__program_desc__descriptor) \ + , 0, NULL, NULL \ + } /* PaddleMobile__Framework__Proto__Version methods */ -void paddle_mobile__framework__proto__version__init - (PaddleMobile__Framework__Proto__Version *message); -size_t paddle_mobile__framework__proto__version__get_packed_size - (const PaddleMobile__Framework__Proto__Version *message); -size_t paddle_mobile__framework__proto__version__pack - (const PaddleMobile__Framework__Proto__Version *message, - uint8_t *out); -size_t paddle_mobile__framework__proto__version__pack_to_buffer - (const PaddleMobile__Framework__Proto__Version *message, - ProtobufCBuffer *buffer); +void paddle_mobile__framework__proto__version__init( + PaddleMobile__Framework__Proto__Version *message); +size_t paddle_mobile__framework__proto__version__get_packed_size( + const PaddleMobile__Framework__Proto__Version *message); +size_t paddle_mobile__framework__proto__version__pack( + const PaddleMobile__Framework__Proto__Version *message, uint8_t *out); +size_t paddle_mobile__framework__proto__version__pack_to_buffer( + const PaddleMobile__Framework__Proto__Version *message, + ProtobufCBuffer *buffer); PaddleMobile__Framework__Proto__Version * - paddle_mobile__framework__proto__version__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void paddle_mobile__framework__proto__version__free_unpacked - (PaddleMobile__Framework__Proto__Version *message, - ProtobufCAllocator *allocator); +paddle_mobile__framework__proto__version__unpack(ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void paddle_mobile__framework__proto__version__free_unpacked( + PaddleMobile__Framework__Proto__Version *message, + ProtobufCAllocator *allocator); /* PaddleMobile__Framework__Proto__OpDesc__Attr methods */ -void paddle_mobile__framework__proto__op_desc__attr__init - (PaddleMobile__Framework__Proto__OpDesc__Attr *message); +void paddle_mobile__framework__proto__op_desc__attr__init( + PaddleMobile__Framework__Proto__OpDesc__Attr *message); /* PaddleMobile__Framework__Proto__OpDesc__Var methods */ -void paddle_mobile__framework__proto__op_desc__var__init - (PaddleMobile__Framework__Proto__OpDesc__Var *message); +void paddle_mobile__framework__proto__op_desc__var__init( + PaddleMobile__Framework__Proto__OpDesc__Var *message); /* PaddleMobile__Framework__Proto__OpDesc methods */ -void paddle_mobile__framework__proto__op_desc__init - (PaddleMobile__Framework__Proto__OpDesc *message); -size_t paddle_mobile__framework__proto__op_desc__get_packed_size - (const PaddleMobile__Framework__Proto__OpDesc *message); -size_t paddle_mobile__framework__proto__op_desc__pack - (const PaddleMobile__Framework__Proto__OpDesc *message, - uint8_t *out); -size_t paddle_mobile__framework__proto__op_desc__pack_to_buffer - (const PaddleMobile__Framework__Proto__OpDesc *message, - ProtobufCBuffer *buffer); +void paddle_mobile__framework__proto__op_desc__init( + PaddleMobile__Framework__Proto__OpDesc *message); +size_t paddle_mobile__framework__proto__op_desc__get_packed_size( + const PaddleMobile__Framework__Proto__OpDesc *message); +size_t paddle_mobile__framework__proto__op_desc__pack( + const PaddleMobile__Framework__Proto__OpDesc *message, uint8_t *out); +size_t paddle_mobile__framework__proto__op_desc__pack_to_buffer( + const PaddleMobile__Framework__Proto__OpDesc *message, + ProtobufCBuffer *buffer); PaddleMobile__Framework__Proto__OpDesc * - paddle_mobile__framework__proto__op_desc__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void paddle_mobile__framework__proto__op_desc__free_unpacked - (PaddleMobile__Framework__Proto__OpDesc *message, - ProtobufCAllocator *allocator); +paddle_mobile__framework__proto__op_desc__unpack(ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void paddle_mobile__framework__proto__op_desc__free_unpacked( + PaddleMobile__Framework__Proto__OpDesc *message, + ProtobufCAllocator *allocator); /* PaddleMobile__Framework__Proto__OpProto__Var methods */ -void paddle_mobile__framework__proto__op_proto__var__init - (PaddleMobile__Framework__Proto__OpProto__Var *message); +void paddle_mobile__framework__proto__op_proto__var__init( + PaddleMobile__Framework__Proto__OpProto__Var *message); /* PaddleMobile__Framework__Proto__OpProto__Attr methods */ -void paddle_mobile__framework__proto__op_proto__attr__init - (PaddleMobile__Framework__Proto__OpProto__Attr *message); +void paddle_mobile__framework__proto__op_proto__attr__init( + PaddleMobile__Framework__Proto__OpProto__Attr *message); /* PaddleMobile__Framework__Proto__OpProto methods */ -void paddle_mobile__framework__proto__op_proto__init - (PaddleMobile__Framework__Proto__OpProto *message); -size_t paddle_mobile__framework__proto__op_proto__get_packed_size - (const PaddleMobile__Framework__Proto__OpProto *message); -size_t paddle_mobile__framework__proto__op_proto__pack - (const PaddleMobile__Framework__Proto__OpProto *message, - uint8_t *out); -size_t paddle_mobile__framework__proto__op_proto__pack_to_buffer - (const PaddleMobile__Framework__Proto__OpProto *message, - ProtobufCBuffer *buffer); +void paddle_mobile__framework__proto__op_proto__init( + PaddleMobile__Framework__Proto__OpProto *message); +size_t paddle_mobile__framework__proto__op_proto__get_packed_size( + const PaddleMobile__Framework__Proto__OpProto *message); +size_t paddle_mobile__framework__proto__op_proto__pack( + const PaddleMobile__Framework__Proto__OpProto *message, uint8_t *out); +size_t paddle_mobile__framework__proto__op_proto__pack_to_buffer( + const PaddleMobile__Framework__Proto__OpProto *message, + ProtobufCBuffer *buffer); PaddleMobile__Framework__Proto__OpProto * - paddle_mobile__framework__proto__op_proto__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void paddle_mobile__framework__proto__op_proto__free_unpacked - (PaddleMobile__Framework__Proto__OpProto *message, - ProtobufCAllocator *allocator); +paddle_mobile__framework__proto__op_proto__unpack(ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void paddle_mobile__framework__proto__op_proto__free_unpacked( + PaddleMobile__Framework__Proto__OpProto *message, + ProtobufCAllocator *allocator); /* PaddleMobile__Framework__Proto__VarType__TensorDesc methods */ -void paddle_mobile__framework__proto__var_type__tensor_desc__init - (PaddleMobile__Framework__Proto__VarType__TensorDesc *message); +void paddle_mobile__framework__proto__var_type__tensor_desc__init( + PaddleMobile__Framework__Proto__VarType__TensorDesc *message); /* PaddleMobile__Framework__Proto__VarType__LoDTensorDesc methods */ -void paddle_mobile__framework__proto__var_type__lo_dtensor_desc__init - (PaddleMobile__Framework__Proto__VarType__LoDTensorDesc *message); +void paddle_mobile__framework__proto__var_type__lo_dtensor_desc__init( + PaddleMobile__Framework__Proto__VarType__LoDTensorDesc *message); /* PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc methods */ -void paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__init - (PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc *message); +void paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__init( + PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc *message); /* PaddleMobile__Framework__Proto__VarType__ReaderDesc methods */ -void paddle_mobile__framework__proto__var_type__reader_desc__init - (PaddleMobile__Framework__Proto__VarType__ReaderDesc *message); +void paddle_mobile__framework__proto__var_type__reader_desc__init( + PaddleMobile__Framework__Proto__VarType__ReaderDesc *message); /* PaddleMobile__Framework__Proto__VarType__ChannelDesc methods */ -void paddle_mobile__framework__proto__var_type__channel_desc__init - (PaddleMobile__Framework__Proto__VarType__ChannelDesc *message); +void paddle_mobile__framework__proto__var_type__channel_desc__init( + PaddleMobile__Framework__Proto__VarType__ChannelDesc *message); /* PaddleMobile__Framework__Proto__VarType__Tuple methods */ -void paddle_mobile__framework__proto__var_type__tuple__init - (PaddleMobile__Framework__Proto__VarType__Tuple *message); +void paddle_mobile__framework__proto__var_type__tuple__init( + PaddleMobile__Framework__Proto__VarType__Tuple *message); /* PaddleMobile__Framework__Proto__VarType methods */ -void paddle_mobile__framework__proto__var_type__init - (PaddleMobile__Framework__Proto__VarType *message); -size_t paddle_mobile__framework__proto__var_type__get_packed_size - (const PaddleMobile__Framework__Proto__VarType *message); -size_t paddle_mobile__framework__proto__var_type__pack - (const PaddleMobile__Framework__Proto__VarType *message, - uint8_t *out); -size_t paddle_mobile__framework__proto__var_type__pack_to_buffer - (const PaddleMobile__Framework__Proto__VarType *message, - ProtobufCBuffer *buffer); +void paddle_mobile__framework__proto__var_type__init( + PaddleMobile__Framework__Proto__VarType *message); +size_t paddle_mobile__framework__proto__var_type__get_packed_size( + const PaddleMobile__Framework__Proto__VarType *message); +size_t paddle_mobile__framework__proto__var_type__pack( + const PaddleMobile__Framework__Proto__VarType *message, uint8_t *out); +size_t paddle_mobile__framework__proto__var_type__pack_to_buffer( + const PaddleMobile__Framework__Proto__VarType *message, + ProtobufCBuffer *buffer); PaddleMobile__Framework__Proto__VarType * - paddle_mobile__framework__proto__var_type__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void paddle_mobile__framework__proto__var_type__free_unpacked - (PaddleMobile__Framework__Proto__VarType *message, - ProtobufCAllocator *allocator); +paddle_mobile__framework__proto__var_type__unpack(ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void paddle_mobile__framework__proto__var_type__free_unpacked( + PaddleMobile__Framework__Proto__VarType *message, + ProtobufCAllocator *allocator); /* PaddleMobile__Framework__Proto__VarDesc methods */ -void paddle_mobile__framework__proto__var_desc__init - (PaddleMobile__Framework__Proto__VarDesc *message); -size_t paddle_mobile__framework__proto__var_desc__get_packed_size - (const PaddleMobile__Framework__Proto__VarDesc *message); -size_t paddle_mobile__framework__proto__var_desc__pack - (const PaddleMobile__Framework__Proto__VarDesc *message, - uint8_t *out); -size_t paddle_mobile__framework__proto__var_desc__pack_to_buffer - (const PaddleMobile__Framework__Proto__VarDesc *message, - ProtobufCBuffer *buffer); +void paddle_mobile__framework__proto__var_desc__init( + PaddleMobile__Framework__Proto__VarDesc *message); +size_t paddle_mobile__framework__proto__var_desc__get_packed_size( + const PaddleMobile__Framework__Proto__VarDesc *message); +size_t paddle_mobile__framework__proto__var_desc__pack( + const PaddleMobile__Framework__Proto__VarDesc *message, uint8_t *out); +size_t paddle_mobile__framework__proto__var_desc__pack_to_buffer( + const PaddleMobile__Framework__Proto__VarDesc *message, + ProtobufCBuffer *buffer); PaddleMobile__Framework__Proto__VarDesc * - paddle_mobile__framework__proto__var_desc__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void paddle_mobile__framework__proto__var_desc__free_unpacked - (PaddleMobile__Framework__Proto__VarDesc *message, - ProtobufCAllocator *allocator); +paddle_mobile__framework__proto__var_desc__unpack(ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void paddle_mobile__framework__proto__var_desc__free_unpacked( + PaddleMobile__Framework__Proto__VarDesc *message, + ProtobufCAllocator *allocator); /* PaddleMobile__Framework__Proto__BlockDesc methods */ -void paddle_mobile__framework__proto__block_desc__init - (PaddleMobile__Framework__Proto__BlockDesc *message); -size_t paddle_mobile__framework__proto__block_desc__get_packed_size - (const PaddleMobile__Framework__Proto__BlockDesc *message); -size_t paddle_mobile__framework__proto__block_desc__pack - (const PaddleMobile__Framework__Proto__BlockDesc *message, - uint8_t *out); -size_t paddle_mobile__framework__proto__block_desc__pack_to_buffer - (const PaddleMobile__Framework__Proto__BlockDesc *message, - ProtobufCBuffer *buffer); +void paddle_mobile__framework__proto__block_desc__init( + PaddleMobile__Framework__Proto__BlockDesc *message); +size_t paddle_mobile__framework__proto__block_desc__get_packed_size( + const PaddleMobile__Framework__Proto__BlockDesc *message); +size_t paddle_mobile__framework__proto__block_desc__pack( + const PaddleMobile__Framework__Proto__BlockDesc *message, uint8_t *out); +size_t paddle_mobile__framework__proto__block_desc__pack_to_buffer( + const PaddleMobile__Framework__Proto__BlockDesc *message, + ProtobufCBuffer *buffer); PaddleMobile__Framework__Proto__BlockDesc * - paddle_mobile__framework__proto__block_desc__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void paddle_mobile__framework__proto__block_desc__free_unpacked - (PaddleMobile__Framework__Proto__BlockDesc *message, - ProtobufCAllocator *allocator); +paddle_mobile__framework__proto__block_desc__unpack( + ProtobufCAllocator *allocator, size_t len, const uint8_t *data); +void paddle_mobile__framework__proto__block_desc__free_unpacked( + PaddleMobile__Framework__Proto__BlockDesc *message, + ProtobufCAllocator *allocator); /* PaddleMobile__Framework__Proto__ProgramDesc methods */ -void paddle_mobile__framework__proto__program_desc__init - (PaddleMobile__Framework__Proto__ProgramDesc *message); -size_t paddle_mobile__framework__proto__program_desc__get_packed_size - (const PaddleMobile__Framework__Proto__ProgramDesc *message); -size_t paddle_mobile__framework__proto__program_desc__pack - (const PaddleMobile__Framework__Proto__ProgramDesc *message, - uint8_t *out); -size_t paddle_mobile__framework__proto__program_desc__pack_to_buffer - (const PaddleMobile__Framework__Proto__ProgramDesc *message, - ProtobufCBuffer *buffer); +void paddle_mobile__framework__proto__program_desc__init( + PaddleMobile__Framework__Proto__ProgramDesc *message); +size_t paddle_mobile__framework__proto__program_desc__get_packed_size( + const PaddleMobile__Framework__Proto__ProgramDesc *message); +size_t paddle_mobile__framework__proto__program_desc__pack( + const PaddleMobile__Framework__Proto__ProgramDesc *message, uint8_t *out); +size_t paddle_mobile__framework__proto__program_desc__pack_to_buffer( + const PaddleMobile__Framework__Proto__ProgramDesc *message, + ProtobufCBuffer *buffer); PaddleMobile__Framework__Proto__ProgramDesc * - paddle_mobile__framework__proto__program_desc__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void paddle_mobile__framework__proto__program_desc__free_unpacked - (PaddleMobile__Framework__Proto__ProgramDesc *message, - ProtobufCAllocator *allocator); +paddle_mobile__framework__proto__program_desc__unpack( + ProtobufCAllocator *allocator, size_t len, const uint8_t *data); +void paddle_mobile__framework__proto__program_desc__free_unpacked( + PaddleMobile__Framework__Proto__ProgramDesc *message, + ProtobufCAllocator *allocator); /* --- per-message closures --- */ -typedef void (*PaddleMobile__Framework__Proto__Version_Closure) - (const PaddleMobile__Framework__Proto__Version *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__OpDesc__Attr_Closure) - (const PaddleMobile__Framework__Proto__OpDesc__Attr *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__OpDesc__Var_Closure) - (const PaddleMobile__Framework__Proto__OpDesc__Var *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__OpDesc_Closure) - (const PaddleMobile__Framework__Proto__OpDesc *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__OpProto__Var_Closure) - (const PaddleMobile__Framework__Proto__OpProto__Var *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__OpProto__Attr_Closure) - (const PaddleMobile__Framework__Proto__OpProto__Attr *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__OpProto_Closure) - (const PaddleMobile__Framework__Proto__OpProto *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__VarType__TensorDesc_Closure) - (const PaddleMobile__Framework__Proto__VarType__TensorDesc *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__VarType__LoDTensorDesc_Closure) - (const PaddleMobile__Framework__Proto__VarType__LoDTensorDesc *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc_Closure) - (const PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__VarType__ReaderDesc_Closure) - (const PaddleMobile__Framework__Proto__VarType__ReaderDesc *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__VarType__ChannelDesc_Closure) - (const PaddleMobile__Framework__Proto__VarType__ChannelDesc *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__VarType__Tuple_Closure) - (const PaddleMobile__Framework__Proto__VarType__Tuple *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__VarType_Closure) - (const PaddleMobile__Framework__Proto__VarType *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__VarDesc_Closure) - (const PaddleMobile__Framework__Proto__VarDesc *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__BlockDesc_Closure) - (const PaddleMobile__Framework__Proto__BlockDesc *message, - void *closure_data); -typedef void (*PaddleMobile__Framework__Proto__ProgramDesc_Closure) - (const PaddleMobile__Framework__Proto__ProgramDesc *message, - void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__Version_Closure)( + const PaddleMobile__Framework__Proto__Version *message, void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__OpDesc__Attr_Closure)( + const PaddleMobile__Framework__Proto__OpDesc__Attr *message, + void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__OpDesc__Var_Closure)( + const PaddleMobile__Framework__Proto__OpDesc__Var *message, + void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__OpDesc_Closure)( + const PaddleMobile__Framework__Proto__OpDesc *message, void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__OpProto__Var_Closure)( + const PaddleMobile__Framework__Proto__OpProto__Var *message, + void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__OpProto__Attr_Closure)( + const PaddleMobile__Framework__Proto__OpProto__Attr *message, + void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__OpProto_Closure)( + const PaddleMobile__Framework__Proto__OpProto *message, void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__VarType__TensorDesc_Closure)( + const PaddleMobile__Framework__Proto__VarType__TensorDesc *message, + void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__VarType__LoDTensorDesc_Closure)( + const PaddleMobile__Framework__Proto__VarType__LoDTensorDesc *message, + void *closure_data); +typedef void ( + *PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc_Closure)( + const PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc *message, + void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__VarType__ReaderDesc_Closure)( + const PaddleMobile__Framework__Proto__VarType__ReaderDesc *message, + void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__VarType__ChannelDesc_Closure)( + const PaddleMobile__Framework__Proto__VarType__ChannelDesc *message, + void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__VarType__Tuple_Closure)( + const PaddleMobile__Framework__Proto__VarType__Tuple *message, + void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__VarType_Closure)( + const PaddleMobile__Framework__Proto__VarType *message, void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__VarDesc_Closure)( + const PaddleMobile__Framework__Proto__VarDesc *message, void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__BlockDesc_Closure)( + const PaddleMobile__Framework__Proto__BlockDesc *message, + void *closure_data); +typedef void (*PaddleMobile__Framework__Proto__ProgramDesc_Closure)( + const PaddleMobile__Framework__Proto__ProgramDesc *message, + void *closure_data); /* --- services --- */ - /* --- descriptors --- */ -extern const ProtobufCEnumDescriptor paddle_mobile__framework__proto__attr_type__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__version__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__attr__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__var__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__var__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__attr__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__tensor_desc__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__reader_desc__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__channel_desc__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__tuple__descriptor; -extern const ProtobufCEnumDescriptor paddle_mobile__framework__proto__var_type__type__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_desc__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__block_desc__descriptor; -extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__program_desc__descriptor; +extern const ProtobufCEnumDescriptor + paddle_mobile__framework__proto__attr_type__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__version__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__op_desc__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__op_desc__attr__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__op_desc__var__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__op_proto__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__op_proto__var__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__op_proto__attr__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__tensor_desc__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__reader_desc__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__channel_desc__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_type__tuple__descriptor; +extern const ProtobufCEnumDescriptor + paddle_mobile__framework__proto__var_type__type__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__var_desc__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__block_desc__descriptor; +extern const ProtobufCMessageDescriptor + paddle_mobile__framework__proto__program_desc__descriptor; PROTOBUF_C__END_DECLS - -#endif /* PROTOBUF_C_framework_2eproto__INCLUDED */ +#endif /* PROTOBUF_C_framework_2eproto__INCLUDED */ diff --git a/src/io/executor.h b/src/io/executor.h index d39a3d7f8a90372cdc4d0846e231d4d98403306f..7ee6368ea201dbfc9ac8426fd648a5857a1c383f 100644 --- a/src/io/executor.h +++ b/src/io/executor.h @@ -58,6 +58,15 @@ class Executor { std::vector Predict(const std::vector &input, const std::vector &dims); +#ifdef PADDLE_MOBILE_FPGA + void InjectVariable(const framework::Tensor &t, string var_name); + void FeedData(const framework::Tensor &t); + std::shared_ptr FetchResult(int id = -1); + void Predict_From_To(int start = 0, int end = -1); + void Predict_From(int start); + void Predict_To(int end); +#endif + protected: Executor() = default; std::shared_ptr Predict(const framework::Tensor &t, @@ -83,7 +92,6 @@ class Executor { uint64_t runEnd = 0UL; }; #endif - int batch_size_ = 1; bool use_optimize_ = false; bool loddable_ = false; }; diff --git a/src/operators/dequantize_op.h b/src/operators/dequantize_op.h index 9f388d156140ed6b33e5ad1df8c92bfe69f99d45..4855f27fc84cc4ef5acd7a4f9cbe7ad8a70b9c75 100644 --- a/src/operators/dequantize_op.h +++ b/src/operators/dequantize_op.h @@ -14,31 +14,30 @@ limitations under the License. */ #pragma once +#include #include "framework/operator.h" -#include "operators/op_param.h" #include "operators/kernel/dequantize_kernel.h" +#include "operators/op_param.h" namespace paddle_mobile { namespace operators { template -class DequantizeOp : public framework::OperatorWithKernel< - DeviceType, - DequantizeParam, - DequantizeKernel> { +class DequantizeOp + : public framework::OperatorWithKernel, + DequantizeKernel> { public: - DequantizeOp(const std::string &type, - const VariableNameMap &inputs, - const VariableNameMap &outputs, - const framework::AttributeMap &attrs, - std::shared_ptr scope) - : framework::OperatorWithKernel, + DequantizeOp(const std::string &type, const VariableNameMap &inputs, + const VariableNameMap &outputs, + const framework::AttributeMap &attrs, + std::shared_ptr scope) + : framework::OperatorWithKernel, DequantizeKernel>( type, inputs, outputs, attrs, scope) {} // inference output shape void InferShape() const override; }; -} // namespace paddle_mobile } // namespace operators +} // namespace paddle_mobile diff --git a/src/operators/kernel/arm/dequantize_kernel.cpp b/src/operators/kernel/arm/dequantize_kernel.cpp index 00b09feefd744042862928260d3713f1f7ada240..3033c16c747855455e43454b204fef8e4a345818 100644 --- a/src/operators/kernel/arm/dequantize_kernel.cpp +++ b/src/operators/kernel/arm/dequantize_kernel.cpp @@ -38,7 +38,7 @@ void DequantizeKernel::Compute( const int32_t *x = input->data(); float *y = output->mutable_data(); size_t size = output->numel(); - float scale = 1.f / activation_scale / weight_scale; + float scale = 1.f / (activation_scale * weight_scale); #if defined(__ARM_NEON__) || defined(__ARM_NEON) size_t loop = size >> 4; size_t remain = size & 0xF; diff --git a/src/operators/kernel/arm/quantize_kernel.cpp b/src/operators/kernel/arm/quantize_kernel.cpp index 2dcac78dd26a6bcafc5c4c46370a1cfafa0efeb2..e2c8efc299c858a3cbb907ce0e98b1c2f96d2bc1 100644 --- a/src/operators/kernel/arm/quantize_kernel.cpp +++ b/src/operators/kernel/arm/quantize_kernel.cpp @@ -16,7 +16,6 @@ limitations under the License. */ #include "operators/kernel/quantize_kernel.h" #include -#include #if defined(__ARM_NEON__) || defined(__ARM_NEON) #include @@ -55,7 +54,7 @@ int32x4_t vrnd_to_even(float32x4_t r) { if (abs(q) % 2 == 0) { ret[i] = q; } else { - ret[i] = q + (q > 0) ? -1 : 1; + ret[i] = q + ((q > 0) ? -1 : 1); } } } @@ -131,7 +130,7 @@ static float find_abs_max(const Tensor *input) { static void quantize_round_to_even(const Tensor *input, const float scale, Tensor *output) { const float *x = input->data(); - int8_t *y = output->data(); + int8_t *y = output->mutable_data(); size_t size = input->numel(); #if defined(__ARM_NEON__) || defined(__ARM_NEON) size_t loop = size >> 4; @@ -153,8 +152,8 @@ static void quantize_round_to_even(const Tensor *input, const float scale, int16x4_t d1 = vmovn_s32(q1); int16x4_t d2 = vmovn_s32(q2); int16x4_t d3 = vmovn_s32(q3); - int16x8_t q5 = vcombine_s16(d1, d0); - int16x8_t q6 = vcombine_s16(d3, d2); + int16x8_t q5 = vcombine_s16(d0, d1); + int16x8_t q6 = vcombine_s16(d2, d3); int8x8_t d5 = vmovn_s16(q5); int8x8_t d6 = vmovn_s16(q6); vst1_s8(y, d5); @@ -174,7 +173,7 @@ static void quantize_round_to_even(const Tensor *input, const float scale, if (abs(q) % 2 == 0) { y[i] = q; } else { - y[i] = q + (q > 0) ? -1 : 1; + y[i] = q + ((q > 0) ? -1 : 1); } } } @@ -183,7 +182,7 @@ static void quantize_round_to_even(const Tensor *input, const float scale, static void quantize_round_to_zero(const Tensor *input, const float scale, Tensor *output) { const float *x = input->data(); - int8_t *y = output->data(); + int8_t *y = output->mutable_data(); size_t size = input->numel(); #ifdef defined(__ARM_NEON__) || defined(__ARM_NEON) size_t loop = size >> 4; @@ -205,8 +204,8 @@ static void quantize_round_to_zero(const Tensor *input, const float scale, int16x4_t d1 = vmovn_s32(q1); int16x4_t d2 = vmovn_s32(q2); int16x4_t d3 = vmovn_s32(q3); - int16x8_t q5 = vcombine_s16(d1, d0); - int16x8_t q6 = vcombine_s16(d3, d2); + int16x8_t q5 = vcombine_s16(d0, d1); + int16x8_t q6 = vcombine_s16(d2, d3); int8x8_t d5 = vmovn_s16(q5); int8x8_t d6 = vmovn_s16(q6); vst1_s8(y, d5); @@ -224,7 +223,7 @@ static void quantize_round_to_zero(const Tensor *input, const float scale, static void quantize_round_to_nearest(const Tensor *input, const float scale, Tensor *output) { const float *x = input->data(); - int8_t *y = output->data(); + int8_t *y = output->mutable_data(); size_t size = input->numel(); #ifdef defined(__ARM_NEON__) || defined(__ARM_NEON) size_t loop = size >> 4; @@ -246,8 +245,8 @@ static void quantize_round_to_nearest(const Tensor *input, const float scale, int16x4_t d1 = vmovn_s32(q1); int16x4_t d2 = vmovn_s32(q2); int16x4_t d3 = vmovn_s32(q3); - int16x8_t q5 = vcombine_s16(d1, d0); - int16x8_t q6 = vcombine_s16(d3, d2); + int16x8_t q5 = vcombine_s16(d0, d1); + int16x8_t q6 = vcombine_s16(d2, d3); int8x8_t d5 = vmovn_s16(q5); int8x8_t d6 = vmovn_s16(q6); vst1_s8(y, d5); @@ -258,7 +257,7 @@ static void quantize_round_to_nearest(const Tensor *input, const float scale, size = remain; #endif for (size_t i = 0; i < size; ++i) { - y[i] = trunc(x[i] * scale); + y[i] = round(x[i] * scale); } } @@ -279,9 +278,7 @@ void QuantizeKernel::Compute( } else { max_abs = find_abs_max(input); } - if (max_abs < std::numeric_limits::min()) { - max_abs = std::numeric_limits::min(); - } + max_abs = std::max(max_abs, 1e-6f); // only support int8 currently float online_scale = 127 / max_abs; param.online_scale_->mutable_data()[0] = online_scale; diff --git a/src/operators/kernel/dequantize_kernel.h b/src/operators/kernel/dequantize_kernel.h index fb575fc812cef7ce2cda333630ee985914d4cb94..3d0437875bb64a0d32948a05725214d666ebfa01 100644 --- a/src/operators/kernel/dequantize_kernel.h +++ b/src/operators/kernel/dequantize_kernel.h @@ -20,9 +20,9 @@ limitations under the License. */ namespace paddle_mobile { namespace operators { -template -class DequantizeKernel : public - framework::OpKernelBase> { +template +class DequantizeKernel + : public framework::OpKernelBase> { public: void Compute(const DequantizeParam ¶m) const; bool Init(DequantizeParam *param); diff --git a/src/operators/kernel/quantize_kernel.h b/src/operators/kernel/quantize_kernel.h index ee0a9e64896ec7f74fa413332a2045ad30ccd338..7a35d03ba76651df935fd9c32b13377767f3c439 100644 --- a/src/operators/kernel/quantize_kernel.h +++ b/src/operators/kernel/quantize_kernel.h @@ -20,9 +20,9 @@ limitations under the License. */ namespace paddle_mobile { namespace operators { -template -class QuantizeKernel : public - framework::OpKernelBase> { +template +class QuantizeKernel + : public framework::OpKernelBase> { public: void Compute(const QuantizeParam ¶m) const; bool Init(QuantizeParam *param); diff --git a/src/operators/quantize_op.h b/src/operators/quantize_op.h index 4943c6f4668f3ca1c4ee5c6569b0b91df880424f..2b0d2f8e321b9e15324e5aa2b38ba50fb4f7aebf 100644 --- a/src/operators/quantize_op.h +++ b/src/operators/quantize_op.h @@ -14,30 +14,29 @@ limitations under the License. */ #pragma once +#include #include "framework/operator.h" -#include "operators/op_param.h" #include "operators/kernel/quantize_kernel.h" +#include "operators/op_param.h" namespace paddle_mobile { namespace operators { template class QuantizeOp : public framework::OperatorWithKernel< - DeviceType, QuantizeParam, - operators::QuantizeKernel> { + DeviceType, QuantizeParam, + operators::QuantizeKernel> { public: - QuantizeOp(const std::string &type, - const VariableNameMap &inputs, + QuantizeOp(const std::string &type, const VariableNameMap &inputs, const VariableNameMap &outputs, const framework::AttributeMap &attrs, std::shared_ptr scope) - : framework::OperatorWithKernel, + : framework::OperatorWithKernel, operators::QuantizeKernel>( type, inputs, outputs, attrs, scope) {} // inference output shape void InferShape() const override; }; -} // namespace paddle_mobile } // namespace operators +} // namespace paddle_mobile diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d68a8c1fb1a2cd0584d80d5afa8ed8f439d5d5d4..e82cd9e24842d0033ab435fca07d173873fd1e79 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -212,6 +212,14 @@ if (NOT FOUND_MATCH) ADD_EXECUTABLE(test-fc-op operators/test_fusion_fc_op.cpp test_helper.h test_include.h) target_link_libraries(test-fc-op paddle-mobile) + # test quantize op + ADD_EXECUTABLE(test-quantize-op operators/test_quantize_op.cpp test_helper.h test_include.h) + target_link_libraries(test-quantize-op paddle-mobile) + + # test dequantize op + ADD_EXECUTABLE(test-dequantize-op operators/test_dequantize_op.cpp test_helper.h test_include.h) + target_link_libraries(test-dequantize-op paddle-mobile) + # gen test log ADD_EXECUTABLE(test-log common/test_log.cpp) target_link_libraries(test-log paddle-mobile) diff --git a/test/operators/test_dequantize_op.cpp b/test/operators/test_dequantize_op.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c61ae32d90169c5f8c6fdced94ce70f29d93b96 --- /dev/null +++ b/test/operators/test_dequantize_op.cpp @@ -0,0 +1,76 @@ +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +#include "../test_helper.h" +#include "../test_include.h" +#include "operators/dequantize_op.h" + +namespace paddle_mobile { + +void dequantize(const Tensor* input, const float scale, Tensor* output) { + const int32_t* x = input->data(); + float* y = output->mutable_data(); + size_t size = output->numel(); + for (size_t i = 0; i < size; ++i) { + y[i] = x[i] * scale; + } +} + +int TestDequqntizeOp() { + framework::DDim dim = framework::make_ddim({1, 3, 224, 224}); + + VariableNameMap inputs; + VariableNameMap outputs; + auto scope = std::make_shared(); + inputs["X"] = std::vector({"input"}); + inputs["Scale"] = std::vector({"scale"}); + outputs["Out"] = std::vector({"output"}); + + auto input_var = scope.get()->Var("input"); + auto input = input_var->template GetMutable(); + SetupTensor(input, dim, -1000, 1000); + + auto scale_var = scope.get()->Var("scale"); + auto scale = scale_var->template GetMutable(); + scale->Resize(framework::make_ddim({1})); + scale->mutable_data()[0] = 1.27; + + auto output_var = scope.get()->Var("output"); + framework::AttributeMap attrs; + attrs["weight_scale"].Set(1.74); + + auto* op = new operators::DequantizeOp("dequantize", inputs, + outputs, attrs, scope); + op->InferShape(); + op->Run(); + auto output = output_var->template Get(); + const float* output_data = output->data(); + + framework::Tensor output_cmp; + output_cmp.Resize(dim); + float dequant_scale = 1.f / (1.27 * 1.74); + dequantize(input, dequant_scale, &output_cmp); + const float* output_cmp_data = output_cmp.data(); + for (int i = 0; i < output->numel(); ++i) { + PADDLE_MOBILE_ENFORCE(output_data[i] == output_cmp_data[i], + "output[%d] = %.6f, output_cmp[%d] = %.6f", i, + output_data[i], i, output_cmp_data[i]); + } + delete op; + return 0; +} + +} // namespace paddle_mobile + +int main() { return paddle_mobile::TestDequqntizeOp(); } diff --git a/test/operators/test_quantize_op.cpp b/test/operators/test_quantize_op.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c988862f6d91c87f47525fa36b7ee61f253682ab --- /dev/null +++ b/test/operators/test_quantize_op.cpp @@ -0,0 +1,113 @@ +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +#include "../test_helper.h" +#include "../test_include.h" +#include "operators/quantize_op.h" + +namespace paddle_mobile { + +// static float g_test_data[50] = { +// -5.55, -5.5, -5.45, -5.0, -4.55, -4.5, -4.45, -4.0, -3.55, -3.5, +// -3.45, -3.01, -2.75, -2.5, -2.501, -2.49, -2.01, -1.75, -1.5, -1.25, +// -1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0, 1.25, +// 1.5, 1.75, 2.01, 2.49, 2.501, 2.5, 2.75, 3.01, 3.45, 3.5, +// 3.55, 4.0, 4.45, 4.5, 4.55, 5.0, 5.45, 5.5, 5.55, 6.0, +// }; + +static float find_abs_max(const Tensor *input) { + float max_abs = 0.f; + const float *x = input->data(); + size_t size = input->numel(); + for (size_t i = 0; i < size; ++i) { + float value = std::abs(x[i]); + if (value > max_abs) { + max_abs = value; + } + } + return max_abs; +} + +static void quantize_round_to_even(const Tensor *input, const float scale, + Tensor *output) { + const float *x = input->data(); + int8_t *y = output->mutable_data(); + size_t size = input->numel(); + for (size_t i = 0; i < size; ++i) { + float value = x[i] * scale; + float v = round(value); + int32_t q = (int32_t)v; + if (abs(abs(q - value) - 0.5) > 0) { + y[i] = q; + } else { + if (abs(q) % 2 == 0) { + y[i] = q; + } else { + y[i] = q + ((q > 0) ? -1 : 1); + } + } + } +} + +int TestQuqntizeOp() { + framework::DDim dim = framework::make_ddim({1, 3, 224, 224}); + + VariableNameMap inputs; + VariableNameMap outputs; + auto scope = std::make_shared(); + inputs["X"] = std::vector({"input"}); + outputs["Out"] = std::vector({"output"}); + outputs["OutScale"] = std::vector({"output_scale"}); + + auto input_var = scope.get()->Var("input"); + auto input = input_var->template GetMutable(); + SetupTensor(input, dim, -100.f, 100.f); + + auto output_var = scope.get()->Var("output"); + auto output_scale_var = scope.get()->Var("output_scale"); + + framework::AttributeMap attrs; + auto *op = new operators::QuantizeOp("quantize", inputs, outputs, + attrs, scope); + op->InferShape(); + op->Run(); + + auto output = output_var->template Get(); + const int8_t *output_data = output->data(); + auto output_scale = output_scale_var->template Get(); + const float *output_scale_data = output_scale->data(); + + float max_abs = find_abs_max(input); + float output_scale_cmp = 127 / max_abs; + PADDLE_MOBILE_ENFORCE(output_scale_cmp == output_scale_data[0], + "output_scale = %.6f, output_scale_cmp = %.6f", + output_scale_cmp, output_scale_data[0]); + + framework::Tensor output_cmp; + output_cmp.Resize(dim); + quantize_round_to_even(input, output_scale_cmp, &output_cmp); + int8_t *output_cmp_data = output_cmp.data(); + for (int i = 0; i < output->numel(); ++i) { + PADDLE_MOBILE_ENFORCE(output_data[i] == output_cmp_data[i], + "output[%d] = %d, output_cmp[%d] = %d", i, + static_cast(output_data[i]), i, + static_cast(output_cmp_data[i])); + } + delete op; + return 0; +} + +} // namespace paddle_mobile + +int main() { return paddle_mobile::TestQuqntizeOp(); } diff --git a/test/operators/test_sigmoid_op.cpp b/test/operators/test_sigmoid_op.cpp index 37d05a44b5b66f2428eedd8e8719cd127747ee08..739c594ad7044025eaa3637d8669c43f1c6c6348 100644 --- a/test/operators/test_sigmoid_op.cpp +++ b/test/operators/test_sigmoid_op.cpp @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#include "../../src/operators/kernel/sigmoid_kernel.h" #include "../../src/operators/kernel/central-arm-func/sigmoid_arm_func.h" +#include "../../src/operators/kernel/sigmoid_kernel.h" #include "../test_helper.h" #include "io/executor.h" diff --git a/tools/pre-commit.hooks/cpplint.hook b/tools/pre-commit.hooks/cpplint.hook index 15541fc0be340e2ca5c296d78f702b0190b5ffea..cbb9fdeab5bb10763940f842525dd23e6e46f2b4 100644 --- a/tools/pre-commit.hooks/cpplint.hook +++ b/tools/pre-commit.hooks/cpplint.hook @@ -3,7 +3,8 @@ TOTAL_ERRORS=0 # The trick to remove deleted files: https://stackoverflow.com/a/2413151 -for file in $(git diff --cached --name-status | awk '$1 != "D" {print $2}' | grep -v ".pb.cpp" | grep -v ".pb.h"); do +for file in $(git diff --cached --name-status | awk '$1 != "D" {print $2}' | \ + grep -v ".pb.cpp" | grep -v ".pb.h" | grep -v ".pb-c.h" | grep -v ".pb-c.c"); do cpplint $file; TOTAL_ERRORS=$(expr $TOTAL_ERRORS + $?); done