提交 946afe3f 编写于 作者: H hjchen2

Add quantize/dequantize op unit test

上级 5e4a1781
...@@ -15,7 +15,6 @@ limitations under the License. */ ...@@ -15,7 +15,6 @@ limitations under the License. */
#include "common/types.h" #include "common/types.h"
#include <vector> #include <vector>
namespace paddle_mobile { namespace paddle_mobile {
const char *G_OP_TYPE_CONV = "conv2d"; const char *G_OP_TYPE_CONV = "conv2d";
...@@ -117,7 +116,6 @@ std::unordered_map< ...@@ -117,7 +116,6 @@ std::unordered_map<
{G_OP_TYPE_SHAPE, {{"Input"}, {"Out"}}}, {G_OP_TYPE_SHAPE, {{"Input"}, {"Out"}}},
{G_OP_TYPE_CONV_TRANSPOSE, {{"Input"}, {"Output"}}}, {G_OP_TYPE_CONV_TRANSPOSE, {{"Input"}, {"Output"}}},
{G_OP_TYPE_QUANTIZE, {{"X"}, {"Out", "OutScale"}}}, {G_OP_TYPE_QUANTIZE, {{"X"}, {"Out", "OutScale"}}},
{G_OP_TYPE_DEQUANTIZE, {{"X", "Scale"}, {"Out"}}} {G_OP_TYPE_DEQUANTIZE, {{"X", "Scale"}, {"Out"}}}};
};
} // namespace paddle_mobile } // namespace paddle_mobile
...@@ -14,8 +14,8 @@ limitations under the License. */ ...@@ -14,8 +14,8 @@ limitations under the License. */
#pragma once #pragma once
#include "common/enforce.h"
#include <string> #include <string>
#include "common/enforce.h"
namespace paddle_mobile { namespace paddle_mobile {
......
...@@ -7,407 +7,390 @@ ...@@ -7,407 +7,390 @@
#endif #endif
#include "framework.pb-c.h" #include "framework.pb-c.h"
void paddle_mobile__framework__proto__version__init void paddle_mobile__framework__proto__version__init(
(PaddleMobile__Framework__Proto__Version *message) PaddleMobile__Framework__Proto__Version *message) {
{ static const PaddleMobile__Framework__Proto__Version init_value =
static const PaddleMobile__Framework__Proto__Version init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VERSION__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__VERSION__INIT;
*message = init_value; *message = init_value;
} }
size_t paddle_mobile__framework__proto__version__get_packed_size size_t paddle_mobile__framework__proto__version__get_packed_size(
(const PaddleMobile__Framework__Proto__Version *message) const PaddleMobile__Framework__Proto__Version *message) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__version__descriptor); &paddle_mobile__framework__proto__version__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); return protobuf_c_message_get_packed_size(
(const ProtobufCMessage *)(message));
} }
size_t paddle_mobile__framework__proto__version__pack size_t paddle_mobile__framework__proto__version__pack(
(const PaddleMobile__Framework__Proto__Version *message, const PaddleMobile__Framework__Proto__Version *message, uint8_t *out) {
uint8_t *out) assert(message->base.descriptor ==
{ &paddle_mobile__framework__proto__version__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__version__descriptor); return protobuf_c_message_pack((const ProtobufCMessage *)message, out);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
} }
size_t paddle_mobile__framework__proto__version__pack_to_buffer size_t paddle_mobile__framework__proto__version__pack_to_buffer(
(const PaddleMobile__Framework__Proto__Version *message, const PaddleMobile__Framework__Proto__Version *message,
ProtobufCBuffer *buffer) ProtobufCBuffer *buffer) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__version__descriptor); &paddle_mobile__framework__proto__version__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message,
buffer);
} }
PaddleMobile__Framework__Proto__Version * PaddleMobile__Framework__Proto__Version *
paddle_mobile__framework__proto__version__unpack paddle_mobile__framework__proto__version__unpack(ProtobufCAllocator *allocator,
(ProtobufCAllocator *allocator,
size_t len, size_t len,
const uint8_t *data) const uint8_t *data) {
{ return (PaddleMobile__Framework__Proto__Version *)protobuf_c_message_unpack(
return (PaddleMobile__Framework__Proto__Version *) &paddle_mobile__framework__proto__version__descriptor, allocator, len,
protobuf_c_message_unpack (&paddle_mobile__framework__proto__version__descriptor, data);
allocator, len, data);
} }
void paddle_mobile__framework__proto__version__free_unpacked void paddle_mobile__framework__proto__version__free_unpacked(
(PaddleMobile__Framework__Proto__Version *message, PaddleMobile__Framework__Proto__Version *message,
ProtobufCAllocator *allocator) ProtobufCAllocator *allocator) {
{ if (!message) return;
if(!message) assert(message->base.descriptor ==
return; &paddle_mobile__framework__proto__version__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__version__descriptor); protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
} }
void paddle_mobile__framework__proto__op_desc__attr__init void paddle_mobile__framework__proto__op_desc__attr__init(
(PaddleMobile__Framework__Proto__OpDesc__Attr *message) PaddleMobile__Framework__Proto__OpDesc__Attr *message) {
{ static const PaddleMobile__Framework__Proto__OpDesc__Attr init_value =
static const PaddleMobile__Framework__Proto__OpDesc__Attr init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__ATTR__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__ATTR__INIT;
*message = init_value; *message = init_value;
} }
void paddle_mobile__framework__proto__op_desc__var__init void paddle_mobile__framework__proto__op_desc__var__init(
(PaddleMobile__Framework__Proto__OpDesc__Var *message) PaddleMobile__Framework__Proto__OpDesc__Var *message) {
{ static const PaddleMobile__Framework__Proto__OpDesc__Var init_value =
static const PaddleMobile__Framework__Proto__OpDesc__Var init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__VAR__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__VAR__INIT;
*message = init_value; *message = init_value;
} }
void paddle_mobile__framework__proto__op_desc__init void paddle_mobile__framework__proto__op_desc__init(
(PaddleMobile__Framework__Proto__OpDesc *message) PaddleMobile__Framework__Proto__OpDesc *message) {
{ static const PaddleMobile__Framework__Proto__OpDesc init_value =
static const PaddleMobile__Framework__Proto__OpDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__INIT;
*message = init_value; *message = init_value;
} }
size_t paddle_mobile__framework__proto__op_desc__get_packed_size size_t paddle_mobile__framework__proto__op_desc__get_packed_size(
(const PaddleMobile__Framework__Proto__OpDesc *message) const PaddleMobile__Framework__Proto__OpDesc *message) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__op_desc__descriptor); &paddle_mobile__framework__proto__op_desc__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); return protobuf_c_message_get_packed_size(
(const ProtobufCMessage *)(message));
} }
size_t paddle_mobile__framework__proto__op_desc__pack size_t paddle_mobile__framework__proto__op_desc__pack(
(const PaddleMobile__Framework__Proto__OpDesc *message, const PaddleMobile__Framework__Proto__OpDesc *message, uint8_t *out) {
uint8_t *out) assert(message->base.descriptor ==
{ &paddle_mobile__framework__proto__op_desc__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__op_desc__descriptor); return protobuf_c_message_pack((const ProtobufCMessage *)message, out);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
} }
size_t paddle_mobile__framework__proto__op_desc__pack_to_buffer size_t paddle_mobile__framework__proto__op_desc__pack_to_buffer(
(const PaddleMobile__Framework__Proto__OpDesc *message, const PaddleMobile__Framework__Proto__OpDesc *message,
ProtobufCBuffer *buffer) ProtobufCBuffer *buffer) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__op_desc__descriptor); &paddle_mobile__framework__proto__op_desc__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message,
buffer);
} }
PaddleMobile__Framework__Proto__OpDesc * PaddleMobile__Framework__Proto__OpDesc *
paddle_mobile__framework__proto__op_desc__unpack paddle_mobile__framework__proto__op_desc__unpack(ProtobufCAllocator *allocator,
(ProtobufCAllocator *allocator,
size_t len, size_t len,
const uint8_t *data) const uint8_t *data) {
{ return (PaddleMobile__Framework__Proto__OpDesc *)protobuf_c_message_unpack(
return (PaddleMobile__Framework__Proto__OpDesc *) &paddle_mobile__framework__proto__op_desc__descriptor, allocator, len,
protobuf_c_message_unpack (&paddle_mobile__framework__proto__op_desc__descriptor, data);
allocator, len, data);
} }
void paddle_mobile__framework__proto__op_desc__free_unpacked void paddle_mobile__framework__proto__op_desc__free_unpacked(
(PaddleMobile__Framework__Proto__OpDesc *message, PaddleMobile__Framework__Proto__OpDesc *message,
ProtobufCAllocator *allocator) ProtobufCAllocator *allocator) {
{ if (!message) return;
if(!message) assert(message->base.descriptor ==
return; &paddle_mobile__framework__proto__op_desc__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__op_desc__descriptor); protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
} }
void paddle_mobile__framework__proto__op_proto__var__init void paddle_mobile__framework__proto__op_proto__var__init(
(PaddleMobile__Framework__Proto__OpProto__Var *message) PaddleMobile__Framework__Proto__OpProto__Var *message) {
{ static const PaddleMobile__Framework__Proto__OpProto__Var init_value =
static const PaddleMobile__Framework__Proto__OpProto__Var init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__VAR__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__VAR__INIT;
*message = init_value; *message = init_value;
} }
void paddle_mobile__framework__proto__op_proto__attr__init void paddle_mobile__framework__proto__op_proto__attr__init(
(PaddleMobile__Framework__Proto__OpProto__Attr *message) PaddleMobile__Framework__Proto__OpProto__Attr *message) {
{ static const PaddleMobile__Framework__Proto__OpProto__Attr init_value =
static const PaddleMobile__Framework__Proto__OpProto__Attr init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__ATTR__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__ATTR__INIT;
*message = init_value; *message = init_value;
} }
void paddle_mobile__framework__proto__op_proto__init void paddle_mobile__framework__proto__op_proto__init(
(PaddleMobile__Framework__Proto__OpProto *message) PaddleMobile__Framework__Proto__OpProto *message) {
{ static const PaddleMobile__Framework__Proto__OpProto init_value =
static const PaddleMobile__Framework__Proto__OpProto init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__INIT;
*message = init_value; *message = init_value;
} }
size_t paddle_mobile__framework__proto__op_proto__get_packed_size size_t paddle_mobile__framework__proto__op_proto__get_packed_size(
(const PaddleMobile__Framework__Proto__OpProto *message) const PaddleMobile__Framework__Proto__OpProto *message) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__op_proto__descriptor); &paddle_mobile__framework__proto__op_proto__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); return protobuf_c_message_get_packed_size(
(const ProtobufCMessage *)(message));
} }
size_t paddle_mobile__framework__proto__op_proto__pack size_t paddle_mobile__framework__proto__op_proto__pack(
(const PaddleMobile__Framework__Proto__OpProto *message, const PaddleMobile__Framework__Proto__OpProto *message, uint8_t *out) {
uint8_t *out) assert(message->base.descriptor ==
{ &paddle_mobile__framework__proto__op_proto__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__op_proto__descriptor); return protobuf_c_message_pack((const ProtobufCMessage *)message, out);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
} }
size_t paddle_mobile__framework__proto__op_proto__pack_to_buffer size_t paddle_mobile__framework__proto__op_proto__pack_to_buffer(
(const PaddleMobile__Framework__Proto__OpProto *message, const PaddleMobile__Framework__Proto__OpProto *message,
ProtobufCBuffer *buffer) ProtobufCBuffer *buffer) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__op_proto__descriptor); &paddle_mobile__framework__proto__op_proto__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message,
buffer);
} }
PaddleMobile__Framework__Proto__OpProto * PaddleMobile__Framework__Proto__OpProto *
paddle_mobile__framework__proto__op_proto__unpack paddle_mobile__framework__proto__op_proto__unpack(ProtobufCAllocator *allocator,
(ProtobufCAllocator *allocator,
size_t len, size_t len,
const uint8_t *data) const uint8_t *data) {
{ return (PaddleMobile__Framework__Proto__OpProto *)protobuf_c_message_unpack(
return (PaddleMobile__Framework__Proto__OpProto *) &paddle_mobile__framework__proto__op_proto__descriptor, allocator, len,
protobuf_c_message_unpack (&paddle_mobile__framework__proto__op_proto__descriptor, data);
allocator, len, data);
} }
void paddle_mobile__framework__proto__op_proto__free_unpacked void paddle_mobile__framework__proto__op_proto__free_unpacked(
(PaddleMobile__Framework__Proto__OpProto *message, PaddleMobile__Framework__Proto__OpProto *message,
ProtobufCAllocator *allocator) ProtobufCAllocator *allocator) {
{ if (!message) return;
if(!message) assert(message->base.descriptor ==
return; &paddle_mobile__framework__proto__op_proto__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__op_proto__descriptor); protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
} }
void 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) PaddleMobile__Framework__Proto__VarType__TensorDesc *message) {
{ static const PaddleMobile__Framework__Proto__VarType__TensorDesc init_value =
static const PaddleMobile__Framework__Proto__VarType__TensorDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TENSOR_DESC__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TENSOR_DESC__INIT;
*message = init_value; *message = init_value;
} }
void 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) PaddleMobile__Framework__Proto__VarType__LoDTensorDesc *message) {
{ static const PaddleMobile__Framework__Proto__VarType__LoDTensorDesc
static const PaddleMobile__Framework__Proto__VarType__LoDTensorDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_DESC__INIT; init_value =
PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_DESC__INIT;
*message = init_value; *message = init_value;
} }
void 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) PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc *message) {
{ static const PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc
static const PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_ARRAY_DESC__INIT; init_value =
PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_ARRAY_DESC__INIT;
*message = init_value; *message = init_value;
} }
void 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) PaddleMobile__Framework__Proto__VarType__ReaderDesc *message) {
{ static const PaddleMobile__Framework__Proto__VarType__ReaderDesc init_value =
static const PaddleMobile__Framework__Proto__VarType__ReaderDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__READER_DESC__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__READER_DESC__INIT;
*message = init_value; *message = init_value;
} }
void 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) PaddleMobile__Framework__Proto__VarType__ChannelDesc *message) {
{ static const PaddleMobile__Framework__Proto__VarType__ChannelDesc init_value =
static const PaddleMobile__Framework__Proto__VarType__ChannelDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__CHANNEL_DESC__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__CHANNEL_DESC__INIT;
*message = init_value; *message = init_value;
} }
void paddle_mobile__framework__proto__var_type__tuple__init void paddle_mobile__framework__proto__var_type__tuple__init(
(PaddleMobile__Framework__Proto__VarType__Tuple *message) PaddleMobile__Framework__Proto__VarType__Tuple *message) {
{ static const PaddleMobile__Framework__Proto__VarType__Tuple init_value =
static const PaddleMobile__Framework__Proto__VarType__Tuple init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TUPLE__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TUPLE__INIT;
*message = init_value; *message = init_value;
} }
void paddle_mobile__framework__proto__var_type__init void paddle_mobile__framework__proto__var_type__init(
(PaddleMobile__Framework__Proto__VarType *message) PaddleMobile__Framework__Proto__VarType *message) {
{ static const PaddleMobile__Framework__Proto__VarType init_value =
static const PaddleMobile__Framework__Proto__VarType init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__INIT;
*message = init_value; *message = init_value;
} }
size_t paddle_mobile__framework__proto__var_type__get_packed_size size_t paddle_mobile__framework__proto__var_type__get_packed_size(
(const PaddleMobile__Framework__Proto__VarType *message) const PaddleMobile__Framework__Proto__VarType *message) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__var_type__descriptor); &paddle_mobile__framework__proto__var_type__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); return protobuf_c_message_get_packed_size(
(const ProtobufCMessage *)(message));
} }
size_t paddle_mobile__framework__proto__var_type__pack size_t paddle_mobile__framework__proto__var_type__pack(
(const PaddleMobile__Framework__Proto__VarType *message, const PaddleMobile__Framework__Proto__VarType *message, uint8_t *out) {
uint8_t *out) assert(message->base.descriptor ==
{ &paddle_mobile__framework__proto__var_type__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__var_type__descriptor); return protobuf_c_message_pack((const ProtobufCMessage *)message, out);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
} }
size_t paddle_mobile__framework__proto__var_type__pack_to_buffer size_t paddle_mobile__framework__proto__var_type__pack_to_buffer(
(const PaddleMobile__Framework__Proto__VarType *message, const PaddleMobile__Framework__Proto__VarType *message,
ProtobufCBuffer *buffer) ProtobufCBuffer *buffer) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__var_type__descriptor); &paddle_mobile__framework__proto__var_type__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message,
buffer);
} }
PaddleMobile__Framework__Proto__VarType * PaddleMobile__Framework__Proto__VarType *
paddle_mobile__framework__proto__var_type__unpack paddle_mobile__framework__proto__var_type__unpack(ProtobufCAllocator *allocator,
(ProtobufCAllocator *allocator,
size_t len, size_t len,
const uint8_t *data) const uint8_t *data) {
{ return (PaddleMobile__Framework__Proto__VarType *)protobuf_c_message_unpack(
return (PaddleMobile__Framework__Proto__VarType *) &paddle_mobile__framework__proto__var_type__descriptor, allocator, len,
protobuf_c_message_unpack (&paddle_mobile__framework__proto__var_type__descriptor, data);
allocator, len, data);
} }
void paddle_mobile__framework__proto__var_type__free_unpacked void paddle_mobile__framework__proto__var_type__free_unpacked(
(PaddleMobile__Framework__Proto__VarType *message, PaddleMobile__Framework__Proto__VarType *message,
ProtobufCAllocator *allocator) ProtobufCAllocator *allocator) {
{ if (!message) return;
if(!message) assert(message->base.descriptor ==
return; &paddle_mobile__framework__proto__var_type__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__var_type__descriptor); protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
} }
void paddle_mobile__framework__proto__var_desc__init void paddle_mobile__framework__proto__var_desc__init(
(PaddleMobile__Framework__Proto__VarDesc *message) PaddleMobile__Framework__Proto__VarDesc *message) {
{ static const PaddleMobile__Framework__Proto__VarDesc init_value =
static const PaddleMobile__Framework__Proto__VarDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_DESC__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_DESC__INIT;
*message = init_value; *message = init_value;
} }
size_t paddle_mobile__framework__proto__var_desc__get_packed_size size_t paddle_mobile__framework__proto__var_desc__get_packed_size(
(const PaddleMobile__Framework__Proto__VarDesc *message) const PaddleMobile__Framework__Proto__VarDesc *message) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__var_desc__descriptor); &paddle_mobile__framework__proto__var_desc__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); return protobuf_c_message_get_packed_size(
(const ProtobufCMessage *)(message));
} }
size_t paddle_mobile__framework__proto__var_desc__pack size_t paddle_mobile__framework__proto__var_desc__pack(
(const PaddleMobile__Framework__Proto__VarDesc *message, const PaddleMobile__Framework__Proto__VarDesc *message, uint8_t *out) {
uint8_t *out) assert(message->base.descriptor ==
{ &paddle_mobile__framework__proto__var_desc__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__var_desc__descriptor); return protobuf_c_message_pack((const ProtobufCMessage *)message, out);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
} }
size_t paddle_mobile__framework__proto__var_desc__pack_to_buffer size_t paddle_mobile__framework__proto__var_desc__pack_to_buffer(
(const PaddleMobile__Framework__Proto__VarDesc *message, const PaddleMobile__Framework__Proto__VarDesc *message,
ProtobufCBuffer *buffer) ProtobufCBuffer *buffer) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__var_desc__descriptor); &paddle_mobile__framework__proto__var_desc__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message,
buffer);
} }
PaddleMobile__Framework__Proto__VarDesc * PaddleMobile__Framework__Proto__VarDesc *
paddle_mobile__framework__proto__var_desc__unpack paddle_mobile__framework__proto__var_desc__unpack(ProtobufCAllocator *allocator,
(ProtobufCAllocator *allocator,
size_t len, size_t len,
const uint8_t *data) const uint8_t *data) {
{ return (PaddleMobile__Framework__Proto__VarDesc *)protobuf_c_message_unpack(
return (PaddleMobile__Framework__Proto__VarDesc *) &paddle_mobile__framework__proto__var_desc__descriptor, allocator, len,
protobuf_c_message_unpack (&paddle_mobile__framework__proto__var_desc__descriptor, data);
allocator, len, data);
} }
void paddle_mobile__framework__proto__var_desc__free_unpacked void paddle_mobile__framework__proto__var_desc__free_unpacked(
(PaddleMobile__Framework__Proto__VarDesc *message, PaddleMobile__Framework__Proto__VarDesc *message,
ProtobufCAllocator *allocator) ProtobufCAllocator *allocator) {
{ if (!message) return;
if(!message) assert(message->base.descriptor ==
return; &paddle_mobile__framework__proto__var_desc__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__var_desc__descriptor); protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
} }
void paddle_mobile__framework__proto__block_desc__init void paddle_mobile__framework__proto__block_desc__init(
(PaddleMobile__Framework__Proto__BlockDesc *message) PaddleMobile__Framework__Proto__BlockDesc *message) {
{ static const PaddleMobile__Framework__Proto__BlockDesc init_value =
static const PaddleMobile__Framework__Proto__BlockDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__BLOCK_DESC__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__BLOCK_DESC__INIT;
*message = init_value; *message = init_value;
} }
size_t paddle_mobile__framework__proto__block_desc__get_packed_size size_t paddle_mobile__framework__proto__block_desc__get_packed_size(
(const PaddleMobile__Framework__Proto__BlockDesc *message) const PaddleMobile__Framework__Proto__BlockDesc *message) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__block_desc__descriptor); &paddle_mobile__framework__proto__block_desc__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); return protobuf_c_message_get_packed_size(
(const ProtobufCMessage *)(message));
} }
size_t paddle_mobile__framework__proto__block_desc__pack size_t paddle_mobile__framework__proto__block_desc__pack(
(const PaddleMobile__Framework__Proto__BlockDesc *message, const PaddleMobile__Framework__Proto__BlockDesc *message, uint8_t *out) {
uint8_t *out) assert(message->base.descriptor ==
{ &paddle_mobile__framework__proto__block_desc__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__block_desc__descriptor); return protobuf_c_message_pack((const ProtobufCMessage *)message, out);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
} }
size_t paddle_mobile__framework__proto__block_desc__pack_to_buffer size_t paddle_mobile__framework__proto__block_desc__pack_to_buffer(
(const PaddleMobile__Framework__Proto__BlockDesc *message, const PaddleMobile__Framework__Proto__BlockDesc *message,
ProtobufCBuffer *buffer) ProtobufCBuffer *buffer) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__block_desc__descriptor); &paddle_mobile__framework__proto__block_desc__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message,
buffer);
} }
PaddleMobile__Framework__Proto__BlockDesc * PaddleMobile__Framework__Proto__BlockDesc *
paddle_mobile__framework__proto__block_desc__unpack paddle_mobile__framework__proto__block_desc__unpack(
(ProtobufCAllocator *allocator, ProtobufCAllocator *allocator, size_t len, const uint8_t *data) {
size_t len, return (PaddleMobile__Framework__Proto__BlockDesc *)protobuf_c_message_unpack(
const uint8_t *data) &paddle_mobile__framework__proto__block_desc__descriptor, allocator, len,
{ 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 void paddle_mobile__framework__proto__block_desc__free_unpacked(
(PaddleMobile__Framework__Proto__BlockDesc *message, PaddleMobile__Framework__Proto__BlockDesc *message,
ProtobufCAllocator *allocator) ProtobufCAllocator *allocator) {
{ if (!message) return;
if(!message) assert(message->base.descriptor ==
return; &paddle_mobile__framework__proto__block_desc__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__block_desc__descriptor); protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
} }
void paddle_mobile__framework__proto__program_desc__init void paddle_mobile__framework__proto__program_desc__init(
(PaddleMobile__Framework__Proto__ProgramDesc *message) PaddleMobile__Framework__Proto__ProgramDesc *message) {
{ static const PaddleMobile__Framework__Proto__ProgramDesc init_value =
static const PaddleMobile__Framework__Proto__ProgramDesc init_value = PADDLE_MOBILE__FRAMEWORK__PROTO__PROGRAM_DESC__INIT; PADDLE_MOBILE__FRAMEWORK__PROTO__PROGRAM_DESC__INIT;
*message = init_value; *message = init_value;
} }
size_t paddle_mobile__framework__proto__program_desc__get_packed_size size_t paddle_mobile__framework__proto__program_desc__get_packed_size(
(const PaddleMobile__Framework__Proto__ProgramDesc *message) const PaddleMobile__Framework__Proto__ProgramDesc *message) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__program_desc__descriptor); &paddle_mobile__framework__proto__program_desc__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); return protobuf_c_message_get_packed_size(
(const ProtobufCMessage *)(message));
} }
size_t paddle_mobile__framework__proto__program_desc__pack size_t paddle_mobile__framework__proto__program_desc__pack(
(const PaddleMobile__Framework__Proto__ProgramDesc *message, const PaddleMobile__Framework__Proto__ProgramDesc *message, uint8_t *out) {
uint8_t *out) assert(message->base.descriptor ==
{ &paddle_mobile__framework__proto__program_desc__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__program_desc__descriptor); return protobuf_c_message_pack((const ProtobufCMessage *)message, out);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
} }
size_t paddle_mobile__framework__proto__program_desc__pack_to_buffer size_t paddle_mobile__framework__proto__program_desc__pack_to_buffer(
(const PaddleMobile__Framework__Proto__ProgramDesc *message, const PaddleMobile__Framework__Proto__ProgramDesc *message,
ProtobufCBuffer *buffer) ProtobufCBuffer *buffer) {
{ assert(message->base.descriptor ==
assert(message->base.descriptor == &paddle_mobile__framework__proto__program_desc__descriptor); &paddle_mobile__framework__proto__program_desc__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message,
buffer);
} }
PaddleMobile__Framework__Proto__ProgramDesc * PaddleMobile__Framework__Proto__ProgramDesc *
paddle_mobile__framework__proto__program_desc__unpack paddle_mobile__framework__proto__program_desc__unpack(
(ProtobufCAllocator *allocator, ProtobufCAllocator *allocator, size_t len, const uint8_t *data) {
size_t len,
const uint8_t *data)
{
return (PaddleMobile__Framework__Proto__ProgramDesc *) return (PaddleMobile__Framework__Proto__ProgramDesc *)
protobuf_c_message_unpack (&paddle_mobile__framework__proto__program_desc__descriptor, protobuf_c_message_unpack(
allocator, len, data); &paddle_mobile__framework__proto__program_desc__descriptor, allocator,
len, data);
} }
void paddle_mobile__framework__proto__program_desc__free_unpacked void paddle_mobile__framework__proto__program_desc__free_unpacked(
(PaddleMobile__Framework__Proto__ProgramDesc *message, PaddleMobile__Framework__Proto__ProgramDesc *message,
ProtobufCAllocator *allocator) ProtobufCAllocator *allocator) {
{ if (!message) return;
if(!message) assert(message->base.descriptor ==
return; &paddle_mobile__framework__proto__program_desc__descriptor);
assert(message->base.descriptor == &paddle_mobile__framework__proto__program_desc__descriptor); protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
} }
static const int64_t paddle_mobile__framework__proto__version__version__default_value = 0ll; static const int64_t
static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__version__field_descriptors[1] = paddle_mobile__framework__proto__version__version__default_value = 0ll;
{ static const ProtobufCFieldDescriptor
paddle_mobile__framework__proto__version__field_descriptors[1] = {
{ {
"version", "version", 1, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT64,
1,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_INT64,
offsetof(PaddleMobile__Framework__Proto__Version, has_version), offsetof(PaddleMobile__Framework__Proto__Version, has_version),
offsetof(PaddleMobile__Framework__Proto__Version, version), offsetof(PaddleMobile__Framework__Proto__Version, version), NULL,
NULL,
&paddle_mobile__framework__proto__version__version__default_value, &paddle_mobile__framework__proto__version__version__default_value,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__version__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__version__field_indices_by_name[] = {
0, /* field[0] = version */ 0, /* field[0] = version */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__version__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__version__number_ranges[1 + 1] = {{1, 0},
{ 1, 0 }, {0, 1}};
{ 0, 1 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__version__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__version__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.Version", "paddle_mobile.framework.proto.Version",
"Version", "Version",
...@@ -417,170 +400,112 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__version__descr ...@@ -417,170 +400,112 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__version__descr
1, 1,
paddle_mobile__framework__proto__version__field_descriptors, paddle_mobile__framework__proto__version__field_descriptors,
paddle_mobile__framework__proto__version__field_indices_by_name, 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, 1,
PROTOBUF_C_LABEL_REQUIRED, paddle_mobile__framework__proto__version__number_ranges,
PROTOBUF_C_TYPE_STRING, (ProtobufCMessageInit)paddle_mobile__framework__proto__version__init,
0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, name),
NULL, NULL,
NULL, NULL,
0, /* flags */ NULL /* reserved[123] */
0,NULL,NULL /* reserved1,reserved2, etc */ };
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", "type", 2, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM,
2,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_ENUM,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, type), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, type),
&paddle_mobile__framework__proto__attr_type__descriptor, &paddle_mobile__framework__proto__attr_type__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"i", "i", 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32,
3,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_INT32,
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_i), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_i),
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, i), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, i), NULL,
NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"f", "f", 4, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_FLOAT,
4,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_FLOAT,
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_f), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_f),
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, f), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, f), NULL,
NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"s", "s", 5, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING,
5,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, s), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, s), NULL,
NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"ints", "ints", 6, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_INT32,
6,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_INT32,
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_ints), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_ints),
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, ints), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, ints), NULL,
NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"floats", "floats", 7, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_FLOAT,
7,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_FLOAT,
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_floats), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_floats),
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, floats), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, floats),
NULL, NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"strings", "strings", 8, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_STRING,
8,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_STRING,
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_strings), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_strings),
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, strings), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, strings),
NULL, NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"b", "b", 10, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL,
10,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_BOOL,
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_b), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_b),
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, b), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, b), NULL,
NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"bools", "bools", 11, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_BOOL,
11,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_BOOL,
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_bools), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_bools),
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, bools), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, bools), NULL,
NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"block_idx", "block_idx", 12, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32,
12, offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr,
PROTOBUF_C_LABEL_OPTIONAL, has_block_idx),
PROTOBUF_C_TYPE_INT32,
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_block_idx),
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, block_idx), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, block_idx),
NULL, NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"l", "l", 13, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT64,
13,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_INT64,
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_l), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, has_l),
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, l), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, l), NULL,
NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"blocks_idx", "blocks_idx", 14, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_INT32,
14, offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr,
PROTOBUF_C_LABEL_REPEATED, n_blocks_idx),
PROTOBUF_C_TYPE_INT32,
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, n_blocks_idx),
offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, blocks_idx), offsetof(PaddleMobile__Framework__Proto__OpDesc__Attr, blocks_idx),
NULL, NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__op_desc__attr__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__op_desc__attr__field_indices_by_name[] = {
8, /* field[8] = b */ 8, /* field[8] = b */
10, /* field[10] = block_idx */ 10, /* field[10] = block_idx */
12, /* field[12] = blocks_idx */ 12, /* field[12] = blocks_idx */
...@@ -595,14 +520,11 @@ static const unsigned paddle_mobile__framework__proto__op_desc__attr__field_indi ...@@ -595,14 +520,11 @@ static const unsigned paddle_mobile__framework__proto__op_desc__attr__field_indi
7, /* field[7] = strings */ 7, /* field[7] = strings */
1, /* field[1] = type */ 1, /* field[1] = type */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__op_desc__attr__number_ranges[2 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__op_desc__attr__number_ranges[2 + 1] = {
{ 1, 0 }, {1, 0}, {10, 8}, {0, 13}};
{ 10, 8 }, const ProtobufCMessageDescriptor
{ 0, 13 } paddle_mobile__framework__proto__op_desc__attr__descriptor = {
};
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__attr__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.OpDesc.Attr", "paddle_mobile.framework.proto.OpDesc.Attr",
"Attr", "Attr",
...@@ -612,48 +534,41 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__attr_ ...@@ -612,48 +534,41 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__attr_
13, 13,
paddle_mobile__framework__proto__op_desc__attr__field_descriptors, paddle_mobile__framework__proto__op_desc__attr__field_descriptors,
paddle_mobile__framework__proto__op_desc__attr__field_indices_by_name, paddle_mobile__framework__proto__op_desc__attr__field_indices_by_name,
2, paddle_mobile__framework__proto__op_desc__attr__number_ranges, 2,
(ProtobufCMessageInit) paddle_mobile__framework__proto__op_desc__attr__init, paddle_mobile__framework__proto__op_desc__attr__number_ranges,
NULL,NULL,NULL /* reserved[123] */ (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] = static const ProtobufCFieldDescriptor
{ paddle_mobile__framework__proto__op_desc__var__field_descriptors[2] = {
{ {
"parameter", "parameter", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING,
1,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__OpDesc__Var, parameter), offsetof(PaddleMobile__Framework__Proto__OpDesc__Var, parameter),
NULL, NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"arguments", "arguments", 2, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_STRING,
2,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_STRING,
offsetof(PaddleMobile__Framework__Proto__OpDesc__Var, n_arguments), offsetof(PaddleMobile__Framework__Proto__OpDesc__Var, n_arguments),
offsetof(PaddleMobile__Framework__Proto__OpDesc__Var, arguments), offsetof(PaddleMobile__Framework__Proto__OpDesc__Var, arguments),
NULL, NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__op_desc__var__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__op_desc__var__field_indices_by_name[] = {
1, /* field[1] = arguments */ 1, /* field[1] = arguments */
0, /* field[0] = parameter */ 0, /* field[0] = parameter */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__op_desc__var__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__op_desc__var__number_ranges[1 + 1] = {
{ 1, 0 }, {1, 0}, {0, 2}};
{ 0, 2 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__op_desc__var__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__var__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.OpDesc.Var", "paddle_mobile.framework.proto.OpDesc.Var",
"Var", "Var",
...@@ -663,88 +578,71 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__var__ ...@@ -663,88 +578,71 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__var__
2, 2,
paddle_mobile__framework__proto__op_desc__var__field_descriptors, paddle_mobile__framework__proto__op_desc__var__field_descriptors,
paddle_mobile__framework__proto__op_desc__var__field_indices_by_name, paddle_mobile__framework__proto__op_desc__var__field_indices_by_name,
1, paddle_mobile__framework__proto__op_desc__var__number_ranges, 1,
(ProtobufCMessageInit) paddle_mobile__framework__proto__op_desc__var__init, paddle_mobile__framework__proto__op_desc__var__number_ranges,
NULL,NULL,NULL /* reserved[123] */ (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 protobuf_c_boolean
static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__op_desc__field_descriptors[5] = paddle_mobile__framework__proto__op_desc__is_target__default_value = 0;
{ static const ProtobufCFieldDescriptor
paddle_mobile__framework__proto__op_desc__field_descriptors[5] = {
{ {
"inputs", "inputs", 1, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE,
1,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(PaddleMobile__Framework__Proto__OpDesc, n_inputs), offsetof(PaddleMobile__Framework__Proto__OpDesc, n_inputs),
offsetof(PaddleMobile__Framework__Proto__OpDesc, inputs), offsetof(PaddleMobile__Framework__Proto__OpDesc, inputs),
&paddle_mobile__framework__proto__op_desc__var__descriptor, &paddle_mobile__framework__proto__op_desc__var__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"outputs", "outputs", 2, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE,
2,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(PaddleMobile__Framework__Proto__OpDesc, n_outputs), offsetof(PaddleMobile__Framework__Proto__OpDesc, n_outputs),
offsetof(PaddleMobile__Framework__Proto__OpDesc, outputs), offsetof(PaddleMobile__Framework__Proto__OpDesc, outputs),
&paddle_mobile__framework__proto__op_desc__var__descriptor, &paddle_mobile__framework__proto__op_desc__var__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"type", "type", 3, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING,
3,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__OpDesc, type), offsetof(PaddleMobile__Framework__Proto__OpDesc, type), NULL, NULL,
NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"attrs", "attrs", 4, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE,
4,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(PaddleMobile__Framework__Proto__OpDesc, n_attrs), offsetof(PaddleMobile__Framework__Proto__OpDesc, n_attrs),
offsetof(PaddleMobile__Framework__Proto__OpDesc, attrs), offsetof(PaddleMobile__Framework__Proto__OpDesc, attrs),
&paddle_mobile__framework__proto__op_desc__attr__descriptor, &paddle_mobile__framework__proto__op_desc__attr__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"is_target", "is_target", 5, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL,
5,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_BOOL,
offsetof(PaddleMobile__Framework__Proto__OpDesc, has_is_target), offsetof(PaddleMobile__Framework__Proto__OpDesc, has_is_target),
offsetof(PaddleMobile__Framework__Proto__OpDesc, is_target), offsetof(PaddleMobile__Framework__Proto__OpDesc, is_target), NULL,
NULL,
&paddle_mobile__framework__proto__op_desc__is_target__default_value, &paddle_mobile__framework__proto__op_desc__is_target__default_value,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__op_desc__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__op_desc__field_indices_by_name[] = {
3, /* field[3] = attrs */ 3, /* field[3] = attrs */
0, /* field[0] = inputs */ 0, /* field[0] = inputs */
4, /* field[4] = is_target */ 4, /* field[4] = is_target */
1, /* field[1] = outputs */ 1, /* field[1] = outputs */
2, /* field[2] = type */ 2, /* field[2] = type */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__op_desc__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__op_desc__number_ranges[1 + 1] = {{1, 0},
{ 1, 0 }, {0, 5}};
{ 0, 5 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__op_desc__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.OpDesc", "paddle_mobile.framework.proto.OpDesc",
"OpDesc", "OpDesc",
...@@ -754,89 +652,79 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__descr ...@@ -754,89 +652,79 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__descr
5, 5,
paddle_mobile__framework__proto__op_desc__field_descriptors, paddle_mobile__framework__proto__op_desc__field_descriptors,
paddle_mobile__framework__proto__op_desc__field_indices_by_name, 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, 1,
PROTOBUF_C_LABEL_REQUIRED, paddle_mobile__framework__proto__op_desc__number_ranges,
PROTOBUF_C_TYPE_STRING, (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 */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__OpProto__Var, name), offsetof(PaddleMobile__Framework__Proto__OpProto__Var, name), NULL,
NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"comment", "comment", 2, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING,
2,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__OpProto__Var, comment), offsetof(PaddleMobile__Framework__Proto__OpProto__Var, comment),
NULL, NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"duplicable", "duplicable", 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL,
3, offsetof(PaddleMobile__Framework__Proto__OpProto__Var,
PROTOBUF_C_LABEL_OPTIONAL, has_duplicable),
PROTOBUF_C_TYPE_BOOL,
offsetof(PaddleMobile__Framework__Proto__OpProto__Var, has_duplicable),
offsetof(PaddleMobile__Framework__Proto__OpProto__Var, duplicable), offsetof(PaddleMobile__Framework__Proto__OpProto__Var, duplicable),
NULL, NULL,
&paddle_mobile__framework__proto__op_proto__var__duplicable__default_value, &paddle_mobile__framework__proto__op_proto__var__duplicable__default_value,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"intermediate", "intermediate", 4, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL,
4, offsetof(PaddleMobile__Framework__Proto__OpProto__Var,
PROTOBUF_C_LABEL_OPTIONAL, has_intermediate),
PROTOBUF_C_TYPE_BOOL, offsetof(PaddleMobile__Framework__Proto__OpProto__Var,
offsetof(PaddleMobile__Framework__Proto__OpProto__Var, has_intermediate), intermediate),
offsetof(PaddleMobile__Framework__Proto__OpProto__Var, intermediate),
NULL, NULL,
&paddle_mobile__framework__proto__op_proto__var__intermediate__default_value, &paddle_mobile__framework__proto__op_proto__var__intermediate__default_value,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"dispensable", "dispensable", 5, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL,
5, offsetof(PaddleMobile__Framework__Proto__OpProto__Var,
PROTOBUF_C_LABEL_OPTIONAL, has_dispensable),
PROTOBUF_C_TYPE_BOOL,
offsetof(PaddleMobile__Framework__Proto__OpProto__Var, has_dispensable),
offsetof(PaddleMobile__Framework__Proto__OpProto__Var, dispensable), offsetof(PaddleMobile__Framework__Proto__OpProto__Var, dispensable),
NULL, NULL,
&paddle_mobile__framework__proto__op_proto__var__dispensable__default_value, &paddle_mobile__framework__proto__op_proto__var__dispensable__default_value,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"reuse", "reuse", 6, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING,
6,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__OpProto__Var, reuse), offsetof(PaddleMobile__Framework__Proto__OpProto__Var, reuse), NULL,
NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__op_proto__var__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__op_proto__var__field_indices_by_name[] = {
1, /* field[1] = comment */ 1, /* field[1] = comment */
4, /* field[4] = dispensable */ 4, /* field[4] = dispensable */
2, /* field[2] = duplicable */ 2, /* field[2] = duplicable */
...@@ -844,13 +732,11 @@ static const unsigned paddle_mobile__framework__proto__op_proto__var__field_indi ...@@ -844,13 +732,11 @@ static const unsigned paddle_mobile__framework__proto__op_proto__var__field_indi
0, /* field[0] = name */ 0, /* field[0] = name */
5, /* field[5] = reuse */ 5, /* field[5] = reuse */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__op_proto__var__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__op_proto__var__number_ranges[1 + 1] = {
{ 1, 0 }, {1, 0}, {0, 6}};
{ 0, 6 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__op_proto__var__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__var__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.OpProto.Var", "paddle_mobile.framework.proto.OpProto.Var",
"Var", "Var",
...@@ -860,75 +746,64 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__var_ ...@@ -860,75 +746,64 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__var_
6, 6,
paddle_mobile__framework__proto__op_proto__var__field_descriptors, paddle_mobile__framework__proto__op_proto__var__field_descriptors,
paddle_mobile__framework__proto__op_proto__var__field_indices_by_name, 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, 1,
PROTOBUF_C_LABEL_REQUIRED, paddle_mobile__framework__proto__op_proto__var__number_ranges,
PROTOBUF_C_TYPE_STRING, (ProtobufCMessageInit)
0, /* quantifier_offset */ paddle_mobile__framework__proto__op_proto__var__init,
offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, name),
NULL, NULL,
NULL, NULL,
0, /* flags */ NULL /* reserved[123] */
0,NULL,NULL /* reserved1,reserved2, etc */ };
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", "type", 2, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM,
2,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_ENUM,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, type), offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, type),
&paddle_mobile__framework__proto__attr_type__descriptor, &paddle_mobile__framework__proto__attr_type__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"comment", "comment", 3, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING,
3,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, comment), offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, comment),
NULL, NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"generated", "generated", 4, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL,
4, offsetof(PaddleMobile__Framework__Proto__OpProto__Attr,
PROTOBUF_C_LABEL_OPTIONAL, has_generated),
PROTOBUF_C_TYPE_BOOL,
offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, has_generated),
offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, generated), offsetof(PaddleMobile__Framework__Proto__OpProto__Attr, generated),
NULL, NULL,
&paddle_mobile__framework__proto__op_proto__attr__generated__default_value, &paddle_mobile__framework__proto__op_proto__attr__generated__default_value,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__op_proto__attr__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__op_proto__attr__field_indices_by_name[] = {
2, /* field[2] = comment */ 2, /* field[2] = comment */
3, /* field[3] = generated */ 3, /* field[3] = generated */
0, /* field[0] = name */ 0, /* field[0] = name */
1, /* field[1] = type */ 1, /* field[1] = type */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__op_proto__attr__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__op_proto__attr__number_ranges[1 + 1] = {
{ 1, 0 }, {1, 0}, {0, 4}};
{ 0, 4 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__op_proto__attr__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__attr__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.OpProto.Attr", "paddle_mobile.framework.proto.OpProto.Attr",
"Attr", "Attr",
...@@ -938,87 +813,68 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__attr ...@@ -938,87 +813,68 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__attr
4, 4,
paddle_mobile__framework__proto__op_proto__attr__field_descriptors, paddle_mobile__framework__proto__op_proto__attr__field_descriptors,
paddle_mobile__framework__proto__op_proto__attr__field_indices_by_name, 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, 1,
PROTOBUF_C_LABEL_REQUIRED, paddle_mobile__framework__proto__op_proto__attr__number_ranges,
PROTOBUF_C_TYPE_STRING, (ProtobufCMessageInit)
0, /* quantifier_offset */ paddle_mobile__framework__proto__op_proto__attr__init,
offsetof(PaddleMobile__Framework__Proto__OpProto, type),
NULL, NULL,
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, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"inputs", "inputs", 2, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE,
2,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(PaddleMobile__Framework__Proto__OpProto, n_inputs), offsetof(PaddleMobile__Framework__Proto__OpProto, n_inputs),
offsetof(PaddleMobile__Framework__Proto__OpProto, inputs), offsetof(PaddleMobile__Framework__Proto__OpProto, inputs),
&paddle_mobile__framework__proto__op_proto__var__descriptor, &paddle_mobile__framework__proto__op_proto__var__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"outputs", "outputs", 3, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE,
3,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(PaddleMobile__Framework__Proto__OpProto, n_outputs), offsetof(PaddleMobile__Framework__Proto__OpProto, n_outputs),
offsetof(PaddleMobile__Framework__Proto__OpProto, outputs), offsetof(PaddleMobile__Framework__Proto__OpProto, outputs),
&paddle_mobile__framework__proto__op_proto__var__descriptor, &paddle_mobile__framework__proto__op_proto__var__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"attrs", "attrs", 4, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE,
4,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(PaddleMobile__Framework__Proto__OpProto, n_attrs), offsetof(PaddleMobile__Framework__Proto__OpProto, n_attrs),
offsetof(PaddleMobile__Framework__Proto__OpProto, attrs), offsetof(PaddleMobile__Framework__Proto__OpProto, attrs),
&paddle_mobile__framework__proto__op_proto__attr__descriptor, &paddle_mobile__framework__proto__op_proto__attr__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"comment", "comment", 5, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING,
5,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__OpProto, comment), offsetof(PaddleMobile__Framework__Proto__OpProto, comment), NULL,
NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__op_proto__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__op_proto__field_indices_by_name[] = {
3, /* field[3] = attrs */ 3, /* field[3] = attrs */
4, /* field[4] = comment */ 4, /* field[4] = comment */
1, /* field[1] = inputs */ 1, /* field[1] = inputs */
2, /* field[2] = outputs */ 2, /* field[2] = outputs */
0, /* field[0] = type */ 0, /* field[0] = type */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__op_proto__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__op_proto__number_ranges[1 + 1] = {{1, 0},
{ 1, 0 }, {0, 5}};
{ 0, 5 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__op_proto__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.OpProto", "paddle_mobile.framework.proto.OpProto",
"OpProto", "OpProto",
...@@ -1028,48 +884,47 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__desc ...@@ -1028,48 +884,47 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__desc
5, 5,
paddle_mobile__framework__proto__op_proto__field_descriptors, paddle_mobile__framework__proto__op_proto__field_descriptors,
paddle_mobile__framework__proto__op_proto__field_indices_by_name, paddle_mobile__framework__proto__op_proto__field_indices_by_name,
1, paddle_mobile__framework__proto__op_proto__number_ranges, 1,
(ProtobufCMessageInit) paddle_mobile__framework__proto__op_proto__init, paddle_mobile__framework__proto__op_proto__number_ranges,
NULL,NULL,NULL /* reserved[123] */ (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] = static const ProtobufCFieldDescriptor
{ paddle_mobile__framework__proto__var_type__tensor_desc__field_descriptors
[2] = {
{ {
"data_type", "data_type", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM,
1,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_ENUM,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarType__TensorDesc, data_type), offsetof(PaddleMobile__Framework__Proto__VarType__TensorDesc,
data_type),
&paddle_mobile__framework__proto__var_type__type__descriptor, &paddle_mobile__framework__proto__var_type__type__descriptor,
NULL, NULL, 0, /* flags */
0, /* flags */ 0, NULL, NULL /* reserved1,reserved2, etc */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"dims", "dims", 2, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_INT64,
2, offsetof(PaddleMobile__Framework__Proto__VarType__TensorDesc,
PROTOBUF_C_LABEL_REPEATED, n_dims),
PROTOBUF_C_TYPE_INT64, offsetof(PaddleMobile__Framework__Proto__VarType__TensorDesc,
offsetof(PaddleMobile__Framework__Proto__VarType__TensorDesc, n_dims), dims),
offsetof(PaddleMobile__Framework__Proto__VarType__TensorDesc, dims), NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__var_type__tensor_desc__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__var_type__tensor_desc__field_indices_by_name
[] = {
0, /* field[0] = data_type */ 0, /* field[0] = data_type */
1, /* field[1] = dims */ 1, /* field[1] = dims */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__tensor_desc__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__var_type__tensor_desc__number_ranges[1 +
{ 1, 0 }, 1] = {
{ 0, 2 } {1, 0}, {0, 2}};
}; const ProtobufCMessageDescriptor
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__tensor_desc__descriptor = paddle_mobile__framework__proto__var_type__tensor_desc__descriptor = {
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.VarType.TensorDesc", "paddle_mobile.framework.proto.VarType.TensorDesc",
"TensorDesc", "TensorDesc",
...@@ -1079,49 +934,53 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__tens ...@@ -1079,49 +934,53 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__tens
2, 2,
paddle_mobile__framework__proto__var_type__tensor_desc__field_descriptors, paddle_mobile__framework__proto__var_type__tensor_desc__field_descriptors,
paddle_mobile__framework__proto__var_type__tensor_desc__field_indices_by_name, paddle_mobile__framework__proto__var_type__tensor_desc__field_indices_by_name,
1, paddle_mobile__framework__proto__var_type__tensor_desc__number_ranges, 1,
(ProtobufCMessageInit) paddle_mobile__framework__proto__var_type__tensor_desc__init, paddle_mobile__framework__proto__var_type__tensor_desc__number_ranges,
NULL,NULL,NULL /* reserved[123] */ (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 int32_t
static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_descriptors[2] = 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", "tensor", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_MESSAGE,
1,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc, tensor), offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc,
tensor),
&paddle_mobile__framework__proto__var_type__tensor_desc__descriptor, &paddle_mobile__framework__proto__var_type__tensor_desc__descriptor,
NULL, NULL, 0, /* flags */
0, /* flags */ 0, NULL, NULL /* reserved1,reserved2, etc */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"lod_level", "lod_level", 2, PROTOBUF_C_LABEL_OPTIONAL,
2,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_INT32, PROTOBUF_C_TYPE_INT32,
offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc, has_lod_level), offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc,
offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc, lod_level), has_lod_level),
offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorDesc,
lod_level),
NULL, NULL,
&paddle_mobile__framework__proto__var_type__lo_dtensor_desc__lod_level__default_value, &paddle_mobile__framework__proto__var_type__lo_dtensor_desc__lod_level__default_value,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_indices_by_name
[] = {
1, /* field[1] = lod_level */ 1, /* field[1] = lod_level */
0, /* field[0] = tensor */ 0, /* field[0] = tensor */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__lo_dtensor_desc__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__var_type__lo_dtensor_desc__number_ranges
{ 1, 0 }, [1 + 1] = {{1, 0}, {0, 2}};
{ 0, 2 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.VarType.LoDTensorDesc", "paddle_mobile.framework.proto.VarType.LoDTensorDesc",
"LoDTensorDesc", "LoDTensorDesc",
...@@ -1131,49 +990,56 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__lo_d ...@@ -1131,49 +990,56 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__lo_d
2, 2,
paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_descriptors, paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_descriptors,
paddle_mobile__framework__proto__var_type__lo_dtensor_desc__field_indices_by_name, 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, 1,
(ProtobufCMessageInit) paddle_mobile__framework__proto__var_type__lo_dtensor_desc__init, paddle_mobile__framework__proto__var_type__lo_dtensor_desc__number_ranges,
NULL,NULL,NULL /* reserved[123] */ (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 int32_t
static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__field_descriptors[2] = 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", "tensor", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_MESSAGE,
1,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc, tensor), offsetof(
PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc,
tensor),
&paddle_mobile__framework__proto__var_type__tensor_desc__descriptor, &paddle_mobile__framework__proto__var_type__tensor_desc__descriptor,
NULL, NULL, 0, /* flags */
0, /* flags */ 0, NULL, NULL /* reserved1,reserved2, etc */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"lod_level", "lod_level", 2, PROTOBUF_C_LABEL_OPTIONAL,
2,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_INT32, PROTOBUF_C_TYPE_INT32,
offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc, has_lod_level), offsetof(
offsetof(PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc, lod_level), PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc,
has_lod_level),
offsetof(
PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc,
lod_level),
NULL, NULL,
&paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__lod_level__default_value, &paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__lod_level__default_value,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__field_indices_by_name
[] = {
1, /* field[1] = lod_level */ 1, /* field[1] = lod_level */
0, /* field[0] = tensor */ 0, /* field[0] = tensor */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__number_ranges
{ 1, 0 }, [1 + 1] = {{1, 0}, {0, 2}};
{ 0, 2 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc", "paddle_mobile.framework.proto.VarType.LoDTensorArrayDesc",
"LoDTensorArrayDesc", "LoDTensorArrayDesc",
...@@ -1183,35 +1049,38 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__lo_d ...@@ -1183,35 +1049,38 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__lo_d
2, 2,
paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__field_descriptors, 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, 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, 1,
(ProtobufCMessageInit) paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__init, paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__number_ranges,
NULL,NULL,NULL /* reserved[123] */ (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] = static const ProtobufCFieldDescriptor
{ paddle_mobile__framework__proto__var_type__reader_desc__field_descriptors[1] = {
{ {
"lod_tensor", "lod_tensor", 1, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE,
1, offsetof(PaddleMobile__Framework__Proto__VarType__ReaderDesc,
PROTOBUF_C_LABEL_REPEATED, n_lod_tensor),
PROTOBUF_C_TYPE_MESSAGE, offsetof(PaddleMobile__Framework__Proto__VarType__ReaderDesc,
offsetof(PaddleMobile__Framework__Proto__VarType__ReaderDesc, n_lod_tensor), lod_tensor),
offsetof(PaddleMobile__Framework__Proto__VarType__ReaderDesc, lod_tensor),
&paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor, &paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor,
NULL, NULL, 0, /* flags */
0, /* flags */ 0, NULL, NULL /* reserved1,reserved2, etc */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__var_type__reader_desc__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__var_type__reader_desc__field_indices_by_name
[] = {
0, /* field[0] = lod_tensor */ 0, /* field[0] = lod_tensor */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__reader_desc__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__var_type__reader_desc__number_ranges[1 +
{ 1, 0 }, 1] = {
{ 0, 1 } {1, 0}, {0, 1}};
}; const ProtobufCMessageDescriptor
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__reader_desc__descriptor = paddle_mobile__framework__proto__var_type__reader_desc__descriptor = {
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.VarType.ReaderDesc", "paddle_mobile.framework.proto.VarType.ReaderDesc",
"ReaderDesc", "ReaderDesc",
...@@ -1221,48 +1090,47 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__read ...@@ -1221,48 +1090,47 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__read
1, 1,
paddle_mobile__framework__proto__var_type__reader_desc__field_descriptors, paddle_mobile__framework__proto__var_type__reader_desc__field_descriptors,
paddle_mobile__framework__proto__var_type__reader_desc__field_indices_by_name, paddle_mobile__framework__proto__var_type__reader_desc__field_indices_by_name,
1, paddle_mobile__framework__proto__var_type__reader_desc__number_ranges, 1,
(ProtobufCMessageInit) paddle_mobile__framework__proto__var_type__reader_desc__init, paddle_mobile__framework__proto__var_type__reader_desc__number_ranges,
NULL,NULL,NULL /* reserved[123] */ (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] = static const ProtobufCFieldDescriptor
{ paddle_mobile__framework__proto__var_type__channel_desc__field_descriptors
[2] = {
{ {
"data_type", "data_type", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM,
1,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_ENUM,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarType__ChannelDesc, data_type), offsetof(PaddleMobile__Framework__Proto__VarType__ChannelDesc,
data_type),
&paddle_mobile__framework__proto__var_type__type__descriptor, &paddle_mobile__framework__proto__var_type__type__descriptor,
NULL, NULL, 0, /* flags */
0, /* flags */ 0, NULL, NULL /* reserved1,reserved2, etc */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"capacity", "capacity", 2, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_INT64,
2,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_INT64,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarType__ChannelDesc, capacity), offsetof(PaddleMobile__Framework__Proto__VarType__ChannelDesc,
NULL, capacity),
NULL, NULL, NULL, 0, /* flags */
0, /* flags */ 0, NULL, NULL /* reserved1,reserved2, etc */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__var_type__channel_desc__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__var_type__channel_desc__field_indices_by_name
[] = {
1, /* field[1] = capacity */ 1, /* field[1] = capacity */
0, /* field[0] = data_type */ 0, /* field[0] = data_type */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__channel_desc__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__var_type__channel_desc__number_ranges[1 +
{ 1, 0 }, 1] =
{ 0, 2 } {{1, 0}, {0, 2}};
}; const ProtobufCMessageDescriptor
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__channel_desc__descriptor = paddle_mobile__framework__proto__var_type__channel_desc__descriptor = {
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.VarType.ChannelDesc", "paddle_mobile.framework.proto.VarType.ChannelDesc",
"ChannelDesc", "ChannelDesc",
...@@ -1272,35 +1140,37 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__chan ...@@ -1272,35 +1140,37 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__chan
2, 2,
paddle_mobile__framework__proto__var_type__channel_desc__field_descriptors, paddle_mobile__framework__proto__var_type__channel_desc__field_descriptors,
paddle_mobile__framework__proto__var_type__channel_desc__field_indices_by_name, 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, 1,
PROTOBUF_C_LABEL_REPEATED, paddle_mobile__framework__proto__var_type__channel_desc__number_ranges,
PROTOBUF_C_TYPE_ENUM, (ProtobufCMessageInit)
offsetof(PaddleMobile__Framework__Proto__VarType__Tuple, n_element_type), paddle_mobile__framework__proto__var_type__channel_desc__init,
offsetof(PaddleMobile__Framework__Proto__VarType__Tuple, element_type), NULL,
&paddle_mobile__framework__proto__var_type__type__descriptor,
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, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__var_type__tuple__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__var_type__tuple__field_indices_by_name[] =
{
0, /* field[0] = element_type */ 0, /* field[0] = element_type */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__tuple__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__var_type__tuple__number_ranges[1 + 1] = {
{ 1, 0 }, {1, 0}, {0, 1}};
{ 0, 1 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__var_type__tuple__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__tuple__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.VarType.Tuple", "paddle_mobile.framework.proto.VarType.Tuple",
"Tuple", "Tuple",
...@@ -1310,65 +1180,86 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__tupl ...@@ -1310,65 +1180,86 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__tupl
1, 1,
paddle_mobile__framework__proto__var_type__tuple__field_descriptors, paddle_mobile__framework__proto__var_type__tuple__field_descriptors,
paddle_mobile__framework__proto__var_type__tuple__field_indices_by_name, paddle_mobile__framework__proto__var_type__tuple__field_indices_by_name,
1, paddle_mobile__framework__proto__var_type__tuple__number_ranges, 1,
(ProtobufCMessageInit) paddle_mobile__framework__proto__var_type__tuple__init, paddle_mobile__framework__proto__var_type__tuple__number_ranges,
NULL,NULL,NULL /* reserved[123] */ (ProtobufCMessageInit)
}; paddle_mobile__framework__proto__var_type__tuple__init,
static const ProtobufCEnumValue paddle_mobile__framework__proto__var_type__type__enum_values_by_number[22] = NULL,
{ NULL,
{ "BOOL", "PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__BOOL", 0 }, NULL /* reserved[123] */
{ "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 = 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, PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.VarType.Type", "paddle_mobile.framework.proto.VarType.Type",
"Type", "Type",
...@@ -1380,96 +1271,72 @@ const ProtobufCEnumDescriptor paddle_mobile__framework__proto__var_type__type__d ...@@ -1380,96 +1271,72 @@ const ProtobufCEnumDescriptor paddle_mobile__framework__proto__var_type__type__d
paddle_mobile__framework__proto__var_type__type__enum_values_by_name, paddle_mobile__framework__proto__var_type__type__enum_values_by_name,
1, 1,
paddle_mobile__framework__proto__var_type__type__value_ranges, paddle_mobile__framework__proto__var_type__type__value_ranges,
NULL,NULL,NULL,NULL /* reserved[1234] */ NULL,
NULL,
NULL,
NULL /* reserved[1234] */
}; };
static const ProtobufCFieldDescriptor paddle_mobile__framework__proto__var_type__field_descriptors[7] = static const ProtobufCFieldDescriptor
{ paddle_mobile__framework__proto__var_type__field_descriptors[7] = {
{ {
"type", "type", 1, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM,
1,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_ENUM,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarType, type), offsetof(PaddleMobile__Framework__Proto__VarType, type),
&paddle_mobile__framework__proto__var_type__type__descriptor, &paddle_mobile__framework__proto__var_type__type__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"selected_rows", "selected_rows", 2, PROTOBUF_C_LABEL_OPTIONAL,
2, PROTOBUF_C_TYPE_MESSAGE, 0, /* quantifier_offset */
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarType, selected_rows), offsetof(PaddleMobile__Framework__Proto__VarType, selected_rows),
&paddle_mobile__framework__proto__var_type__tensor_desc__descriptor, &paddle_mobile__framework__proto__var_type__tensor_desc__descriptor,
NULL, NULL, 0, /* flags */
0, /* flags */ 0, NULL, NULL /* reserved1,reserved2, etc */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"lod_tensor", "lod_tensor", 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE,
3,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarType, lod_tensor), offsetof(PaddleMobile__Framework__Proto__VarType, lod_tensor),
&paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor, &paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor,
NULL, NULL, 0, /* flags */
0, /* flags */ 0, NULL, NULL /* reserved1,reserved2, etc */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"tensor_array", "tensor_array", 4, PROTOBUF_C_LABEL_OPTIONAL,
4, PROTOBUF_C_TYPE_MESSAGE, 0, /* quantifier_offset */
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarType, tensor_array), offsetof(PaddleMobile__Framework__Proto__VarType, tensor_array),
&paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor, &paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor,
NULL, NULL, 0, /* flags */
0, /* flags */ 0, NULL, NULL /* reserved1,reserved2, etc */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"reader", "reader", 5, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE,
5,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarType, reader), offsetof(PaddleMobile__Framework__Proto__VarType, reader),
&paddle_mobile__framework__proto__var_type__reader_desc__descriptor, &paddle_mobile__framework__proto__var_type__reader_desc__descriptor,
NULL, NULL, 0, /* flags */
0, /* flags */ 0, NULL, NULL /* reserved1,reserved2, etc */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"channel", "channel", 6, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE,
6,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarType, channel), offsetof(PaddleMobile__Framework__Proto__VarType, channel),
&paddle_mobile__framework__proto__var_type__channel_desc__descriptor, &paddle_mobile__framework__proto__var_type__channel_desc__descriptor,
NULL, NULL, 0, /* flags */
0, /* flags */ 0, NULL, NULL /* reserved1,reserved2, etc */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"tuple", "tuple", 7, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE,
7,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarType, tuple), offsetof(PaddleMobile__Framework__Proto__VarType, tuple),
&paddle_mobile__framework__proto__var_type__tuple__descriptor, &paddle_mobile__framework__proto__var_type__tuple__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__var_type__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__var_type__field_indices_by_name[] = {
5, /* field[5] = channel */ 5, /* field[5] = channel */
2, /* field[2] = lod_tensor */ 2, /* field[2] = lod_tensor */
4, /* field[4] = reader */ 4, /* field[4] = reader */
...@@ -1478,13 +1345,11 @@ static const unsigned paddle_mobile__framework__proto__var_type__field_indices_b ...@@ -1478,13 +1345,11 @@ static const unsigned paddle_mobile__framework__proto__var_type__field_indices_b
6, /* field[6] = tuple */ 6, /* field[6] = tuple */
0, /* field[0] = type */ 0, /* field[0] = type */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__var_type__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__var_type__number_ranges[1 + 1] = {{1, 0},
{ 1, 0 }, {0, 7}};
{ 0, 7 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__var_type__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.VarType", "paddle_mobile.framework.proto.VarType",
"VarType", "VarType",
...@@ -1494,62 +1359,53 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__desc ...@@ -1494,62 +1359,53 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__desc
7, 7,
paddle_mobile__framework__proto__var_type__field_descriptors, paddle_mobile__framework__proto__var_type__field_descriptors,
paddle_mobile__framework__proto__var_type__field_indices_by_name, 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, 1,
PROTOBUF_C_LABEL_REQUIRED, paddle_mobile__framework__proto__var_type__number_ranges,
PROTOBUF_C_TYPE_STRING, (ProtobufCMessageInit)paddle_mobile__framework__proto__var_type__init,
0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarDesc, name),
NULL, NULL,
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, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"type", "type", 2, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_MESSAGE,
2,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__VarDesc, type), offsetof(PaddleMobile__Framework__Proto__VarDesc, type),
&paddle_mobile__framework__proto__var_type__descriptor, &paddle_mobile__framework__proto__var_type__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"persistable", "persistable", 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL,
3,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_BOOL,
offsetof(PaddleMobile__Framework__Proto__VarDesc, has_persistable), offsetof(PaddleMobile__Framework__Proto__VarDesc, has_persistable),
offsetof(PaddleMobile__Framework__Proto__VarDesc, persistable), offsetof(PaddleMobile__Framework__Proto__VarDesc, persistable),
NULL, NULL,
&paddle_mobile__framework__proto__var_desc__persistable__default_value, &paddle_mobile__framework__proto__var_desc__persistable__default_value,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__var_desc__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__var_desc__field_indices_by_name[] = {
0, /* field[0] = name */ 0, /* field[0] = name */
2, /* field[2] = persistable */ 2, /* field[2] = persistable */
1, /* field[1] = type */ 1, /* field[1] = type */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__var_desc__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__var_desc__number_ranges[1 + 1] = {{1, 0},
{ 1, 0 }, {0, 3}};
{ 0, 3 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__var_desc__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_desc__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.VarDesc", "paddle_mobile.framework.proto.VarDesc",
"VarDesc", "VarDesc",
...@@ -1559,88 +1415,74 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_desc__desc ...@@ -1559,88 +1415,74 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_desc__desc
3, 3,
paddle_mobile__framework__proto__var_desc__field_descriptors, paddle_mobile__framework__proto__var_desc__field_descriptors,
paddle_mobile__framework__proto__var_desc__field_indices_by_name, 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, 1,
PROTOBUF_C_LABEL_REQUIRED, paddle_mobile__framework__proto__var_desc__number_ranges,
PROTOBUF_C_TYPE_INT32, (ProtobufCMessageInit)paddle_mobile__framework__proto__var_desc__init,
0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__BlockDesc, idx),
NULL, NULL,
NULL, NULL,
0, /* flags */ NULL /* reserved[123] */
0,NULL,NULL /* reserved1,reserved2, etc */ };
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", "parent_idx", 2, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_INT32,
2,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_INT32,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__BlockDesc, parent_idx), offsetof(PaddleMobile__Framework__Proto__BlockDesc, parent_idx),
NULL, NULL, NULL, 0, /* flags */
NULL, 0, NULL, NULL /* reserved1,reserved2, etc */
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
}, },
{ {
"vars", "vars", 3, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE,
3,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(PaddleMobile__Framework__Proto__BlockDesc, n_vars), offsetof(PaddleMobile__Framework__Proto__BlockDesc, n_vars),
offsetof(PaddleMobile__Framework__Proto__BlockDesc, vars), offsetof(PaddleMobile__Framework__Proto__BlockDesc, vars),
&paddle_mobile__framework__proto__var_desc__descriptor, &paddle_mobile__framework__proto__var_desc__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"ops", "ops", 4, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE,
4,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(PaddleMobile__Framework__Proto__BlockDesc, n_ops), offsetof(PaddleMobile__Framework__Proto__BlockDesc, n_ops),
offsetof(PaddleMobile__Framework__Proto__BlockDesc, ops), offsetof(PaddleMobile__Framework__Proto__BlockDesc, ops),
&paddle_mobile__framework__proto__op_desc__descriptor, &paddle_mobile__framework__proto__op_desc__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"forward_block_idx", "forward_block_idx", 5, PROTOBUF_C_LABEL_OPTIONAL,
5,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_INT32, PROTOBUF_C_TYPE_INT32,
offsetof(PaddleMobile__Framework__Proto__BlockDesc, has_forward_block_idx), offsetof(PaddleMobile__Framework__Proto__BlockDesc,
offsetof(PaddleMobile__Framework__Proto__BlockDesc, forward_block_idx), has_forward_block_idx),
offsetof(PaddleMobile__Framework__Proto__BlockDesc,
forward_block_idx),
NULL, NULL,
&paddle_mobile__framework__proto__block_desc__forward_block_idx__default_value, &paddle_mobile__framework__proto__block_desc__forward_block_idx__default_value,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__block_desc__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__block_desc__field_indices_by_name[] = {
4, /* field[4] = forward_block_idx */ 4, /* field[4] = forward_block_idx */
0, /* field[0] = idx */ 0, /* field[0] = idx */
3, /* field[3] = ops */ 3, /* field[3] = ops */
1, /* field[1] = parent_idx */ 1, /* field[1] = parent_idx */
2, /* field[2] = vars */ 2, /* field[2] = vars */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__block_desc__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__block_desc__number_ranges[1 + 1] = {
{ 1, 0 }, {1, 0}, {0, 5}};
{ 0, 5 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__block_desc__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__block_desc__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.BlockDesc", "paddle_mobile.framework.proto.BlockDesc",
"BlockDesc", "BlockDesc",
...@@ -1650,48 +1492,42 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__block_desc__de ...@@ -1650,48 +1492,42 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__block_desc__de
5, 5,
paddle_mobile__framework__proto__block_desc__field_descriptors, paddle_mobile__framework__proto__block_desc__field_descriptors,
paddle_mobile__framework__proto__block_desc__field_indices_by_name, paddle_mobile__framework__proto__block_desc__field_indices_by_name,
1, paddle_mobile__framework__proto__block_desc__number_ranges, 1,
(ProtobufCMessageInit) paddle_mobile__framework__proto__block_desc__init, paddle_mobile__framework__proto__block_desc__number_ranges,
NULL,NULL,NULL /* reserved[123] */ (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] = static const ProtobufCFieldDescriptor
{ paddle_mobile__framework__proto__program_desc__field_descriptors[2] = {
{ {
"blocks", "blocks", 1, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE,
1,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(PaddleMobile__Framework__Proto__ProgramDesc, n_blocks), offsetof(PaddleMobile__Framework__Proto__ProgramDesc, n_blocks),
offsetof(PaddleMobile__Framework__Proto__ProgramDesc, blocks), offsetof(PaddleMobile__Framework__Proto__ProgramDesc, blocks),
&paddle_mobile__framework__proto__block_desc__descriptor, &paddle_mobile__framework__proto__block_desc__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
{ {
"version", "version", 2, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE,
2,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */ 0, /* quantifier_offset */
offsetof(PaddleMobile__Framework__Proto__ProgramDesc, version), offsetof(PaddleMobile__Framework__Proto__ProgramDesc, version),
&paddle_mobile__framework__proto__version__descriptor, &paddle_mobile__framework__proto__version__descriptor, NULL,
NULL,
0, /* flags */ 0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0, NULL, NULL /* reserved1,reserved2, etc */
}, },
}; };
static const unsigned paddle_mobile__framework__proto__program_desc__field_indices_by_name[] = { static const unsigned
paddle_mobile__framework__proto__program_desc__field_indices_by_name[] = {
0, /* field[0] = blocks */ 0, /* field[0] = blocks */
1, /* field[1] = version */ 1, /* field[1] = version */
}; };
static const ProtobufCIntRange paddle_mobile__framework__proto__program_desc__number_ranges[1 + 1] = static const ProtobufCIntRange
{ paddle_mobile__framework__proto__program_desc__number_ranges[1 + 1] = {
{ 1, 0 }, {1, 0}, {0, 2}};
{ 0, 2 } const ProtobufCMessageDescriptor
}; paddle_mobile__framework__proto__program_desc__descriptor = {
const ProtobufCMessageDescriptor paddle_mobile__framework__proto__program_desc__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.ProgramDesc", "paddle_mobile.framework.proto.ProgramDesc",
"ProgramDesc", "ProgramDesc",
...@@ -1701,43 +1537,39 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__program_desc__ ...@@ -1701,43 +1537,39 @@ const ProtobufCMessageDescriptor paddle_mobile__framework__proto__program_desc__
2, 2,
paddle_mobile__framework__proto__program_desc__field_descriptors, paddle_mobile__framework__proto__program_desc__field_descriptors,
paddle_mobile__framework__proto__program_desc__field_indices_by_name, paddle_mobile__framework__proto__program_desc__field_indices_by_name,
1, paddle_mobile__framework__proto__program_desc__number_ranges, 1,
(ProtobufCMessageInit) paddle_mobile__framework__proto__program_desc__init, paddle_mobile__framework__proto__program_desc__number_ranges,
NULL,NULL,NULL /* reserved[123] */ (ProtobufCMessageInit)
}; paddle_mobile__framework__proto__program_desc__init,
static const ProtobufCEnumValue paddle_mobile__framework__proto__attr_type__enum_values_by_number[11] = NULL,
{ NULL,
{ "INT", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INT", 0 }, NULL /* reserved[123] */
{ "FLOAT", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__FLOAT", 1 }, };
{ "STRING", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__STRING", 2 }, static const ProtobufCEnumValue
{ "INTS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INTS", 3 }, paddle_mobile__framework__proto__attr_type__enum_values_by_number[11] = {
{ "FLOATS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__FLOATS", 4 }, {"INT", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INT", 0},
{ "STRINGS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__STRINGS", 5 }, {"FLOAT", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__FLOAT", 1},
{ "BOOLEAN", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BOOLEAN", 6 }, {"STRING", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__STRING", 2},
{ "BOOLEANS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BOOLEANS", 7 }, {"INTS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INTS", 3},
{ "BLOCK", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCK", 8 }, {"FLOATS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__FLOATS", 4},
{ "LONG", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__LONG", 9 }, {"STRINGS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__STRINGS", 5},
{ "BLOCKS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCKS", 10 }, {"BOOLEAN", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BOOLEAN", 6},
}; {"BOOLEANS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BOOLEANS", 7},
static const ProtobufCIntRange paddle_mobile__framework__proto__attr_type__value_ranges[] = { {"BLOCK", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCK", 8},
{0, 0},{0, 11} {"LONG", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__LONG", 9},
}; {"BLOCKS", "PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCKS", 10},
static const ProtobufCEnumValueIndex paddle_mobile__framework__proto__attr_type__enum_values_by_name[11] = };
{ static const ProtobufCIntRange
{ "BLOCK", 8 }, paddle_mobile__framework__proto__attr_type__value_ranges[] = {{0, 0},
{ "BLOCKS", 10 }, {0, 11}};
{ "BOOLEAN", 6 }, static const ProtobufCEnumValueIndex
{ "BOOLEANS", 7 }, paddle_mobile__framework__proto__attr_type__enum_values_by_name[11] = {
{ "FLOAT", 1 }, {"BLOCK", 8}, {"BLOCKS", 10}, {"BOOLEAN", 6}, {"BOOLEANS", 7},
{ "FLOATS", 4 }, {"FLOAT", 1}, {"FLOATS", 4}, {"INT", 0}, {"INTS", 3},
{ "INT", 0 }, {"LONG", 9}, {"STRING", 2}, {"STRINGS", 5},
{ "INTS", 3 }, };
{ "LONG", 9 }, const ProtobufCEnumDescriptor
{ "STRING", 2 }, paddle_mobile__framework__proto__attr_type__descriptor = {
{ "STRINGS", 5 },
};
const ProtobufCEnumDescriptor paddle_mobile__framework__proto__attr_type__descriptor =
{
PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
"paddle_mobile.framework.proto.AttrType", "paddle_mobile.framework.proto.AttrType",
"AttrType", "AttrType",
...@@ -1749,5 +1581,8 @@ const ProtobufCEnumDescriptor paddle_mobile__framework__proto__attr_type__descri ...@@ -1749,5 +1581,8 @@ const ProtobufCEnumDescriptor paddle_mobile__framework__proto__attr_type__descri
paddle_mobile__framework__proto__attr_type__enum_values_by_name, paddle_mobile__framework__proto__attr_type__enum_values_by_name,
1, 1,
paddle_mobile__framework__proto__attr_type__value_ranges, paddle_mobile__framework__proto__attr_type__value_ranges,
NULL,NULL,NULL,NULL /* reserved[1234] */ NULL,
NULL,
NULL,
NULL /* reserved[1234] */
}; };
...@@ -14,25 +14,40 @@ PROTOBUF_C__BEGIN_DECLS ...@@ -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. # 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 #endif
typedef struct _PaddleMobile__Framework__Proto__Version
typedef struct _PaddleMobile__Framework__Proto__Version PaddleMobile__Framework__Proto__Version; PaddleMobile__Framework__Proto__Version;
typedef struct _PaddleMobile__Framework__Proto__OpDesc PaddleMobile__Framework__Proto__OpDesc; typedef struct _PaddleMobile__Framework__Proto__OpDesc
typedef struct _PaddleMobile__Framework__Proto__OpDesc__Attr PaddleMobile__Framework__Proto__OpDesc__Attr; PaddleMobile__Framework__Proto__OpDesc;
typedef struct _PaddleMobile__Framework__Proto__OpDesc__Var PaddleMobile__Framework__Proto__OpDesc__Var; typedef struct _PaddleMobile__Framework__Proto__OpDesc__Attr
typedef struct _PaddleMobile__Framework__Proto__OpProto PaddleMobile__Framework__Proto__OpProto; PaddleMobile__Framework__Proto__OpDesc__Attr;
typedef struct _PaddleMobile__Framework__Proto__OpProto__Var PaddleMobile__Framework__Proto__OpProto__Var; typedef struct _PaddleMobile__Framework__Proto__OpDesc__Var
typedef struct _PaddleMobile__Framework__Proto__OpProto__Attr PaddleMobile__Framework__Proto__OpProto__Attr; PaddleMobile__Framework__Proto__OpDesc__Var;
typedef struct _PaddleMobile__Framework__Proto__VarType PaddleMobile__Framework__Proto__VarType; typedef struct _PaddleMobile__Framework__Proto__OpProto
typedef struct _PaddleMobile__Framework__Proto__VarType__TensorDesc PaddleMobile__Framework__Proto__VarType__TensorDesc; PaddleMobile__Framework__Proto__OpProto;
typedef struct _PaddleMobile__Framework__Proto__VarType__LoDTensorDesc PaddleMobile__Framework__Proto__VarType__LoDTensorDesc; typedef struct _PaddleMobile__Framework__Proto__OpProto__Var
typedef struct _PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc; PaddleMobile__Framework__Proto__OpProto__Var;
typedef struct _PaddleMobile__Framework__Proto__VarType__ReaderDesc PaddleMobile__Framework__Proto__VarType__ReaderDesc; typedef struct _PaddleMobile__Framework__Proto__OpProto__Attr
typedef struct _PaddleMobile__Framework__Proto__VarType__ChannelDesc PaddleMobile__Framework__Proto__VarType__ChannelDesc; PaddleMobile__Framework__Proto__OpProto__Attr;
typedef struct _PaddleMobile__Framework__Proto__VarType__Tuple PaddleMobile__Framework__Proto__VarType__Tuple; typedef struct _PaddleMobile__Framework__Proto__VarType
typedef struct _PaddleMobile__Framework__Proto__VarDesc PaddleMobile__Framework__Proto__VarDesc; PaddleMobile__Framework__Proto__VarType;
typedef struct _PaddleMobile__Framework__Proto__BlockDesc PaddleMobile__Framework__Proto__BlockDesc; typedef struct _PaddleMobile__Framework__Proto__VarType__TensorDesc
typedef struct _PaddleMobile__Framework__Proto__ProgramDesc PaddleMobile__Framework__Proto__ProgramDesc; 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 --- */ /* --- enums --- */
...@@ -72,8 +87,9 @@ typedef enum _PaddleMobile__Framework__Proto__VarType__Type { ...@@ -72,8 +87,9 @@ typedef enum _PaddleMobile__Framework__Proto__VarType__Type {
* in operators like nccl_op * in operators like nccl_op
*/ */
PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__RAW = 17, PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__RAW = 17,
PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__TUPLE = 18 PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__TUPLE =
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE) 18 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(
PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE)
} PaddleMobile__Framework__Proto__VarType__Type; } PaddleMobile__Framework__Proto__VarType__Type;
typedef enum _PaddleMobile__Framework__Proto__AttrType { typedef enum _PaddleMobile__Framework__Proto__AttrType {
PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INT = 0, PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__INT = 0,
...@@ -86,8 +102,9 @@ typedef enum _PaddleMobile__Framework__Proto__AttrType { ...@@ -86,8 +102,9 @@ typedef enum _PaddleMobile__Framework__Proto__AttrType {
PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BOOLEANS = 7, PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BOOLEANS = 7,
PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCK = 8, PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCK = 8,
PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__LONG = 9, PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__LONG = 9,
PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCKS = 10 PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE__BLOCKS =
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE) 10 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(
PADDLE_MOBILE__FRAMEWORK__PROTO__ATTR_TYPE)
} PaddleMobile__Framework__Proto__AttrType; } PaddleMobile__Framework__Proto__AttrType;
/* --- messages --- */ /* --- messages --- */
...@@ -98,19 +115,19 @@ typedef enum _PaddleMobile__Framework__Proto__AttrType { ...@@ -98,19 +115,19 @@ typedef enum _PaddleMobile__Framework__Proto__AttrType {
* Serailization and Deserialization codes should be modified in a way * Serailization and Deserialization codes should be modified in a way
* that supports old versions following the version and compatibility policy. * that supports old versions following the version and compatibility policy.
*/ */
struct _PaddleMobile__Framework__Proto__Version struct _PaddleMobile__Framework__Proto__Version {
{
ProtobufCMessage base; ProtobufCMessage base;
protobuf_c_boolean has_version; protobuf_c_boolean has_version;
int64_t version; int64_t version;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__VERSION__INIT \ #define PADDLE_MOBILE__FRAMEWORK__PROTO__VERSION__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__version__descriptor) \ { \
, 0, 0ll } PROTOBUF_C_MESSAGE_INIT( \
&paddle_mobile__framework__proto__version__descriptor) \
, 0, 0ll \
}
struct _PaddleMobile__Framework__Proto__OpDesc__Attr {
struct _PaddleMobile__Framework__Proto__OpDesc__Attr
{
ProtobufCMessage base; ProtobufCMessage base;
char *name; char *name;
PaddleMobile__Framework__Proto__AttrType type; PaddleMobile__Framework__Proto__AttrType type;
...@@ -137,28 +154,31 @@ struct _PaddleMobile__Framework__Proto__OpDesc__Attr ...@@ -137,28 +154,31 @@ struct _PaddleMobile__Framework__Proto__OpDesc__Attr
int32_t *blocks_idx; int32_t *blocks_idx;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__ATTR__INIT \ #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 } 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, \
struct _PaddleMobile__Framework__Proto__OpDesc__Var 0, NULL, 0, NULL, 0, NULL, 0, 0, 0, NULL, 0, 0, 0, 0, 0, NULL \
{ }
struct _PaddleMobile__Framework__Proto__OpDesc__Var {
ProtobufCMessage base; ProtobufCMessage base;
char *parameter; char *parameter;
size_t n_arguments; size_t n_arguments;
char **arguments; char **arguments;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__VAR__INIT \ #define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__VAR__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__op_desc__var__descriptor) \ { \
, NULL, 0,NULL } PROTOBUF_C_MESSAGE_INIT( \
&paddle_mobile__framework__proto__op_desc__var__descriptor) \
, NULL, 0, NULL \
}
/* /*
* OpDesc describes an instance of a C++ framework::OperatorBase * OpDesc describes an instance of a C++ framework::OperatorBase
* derived class type. * derived class type.
*/ */
struct _PaddleMobile__Framework__Proto__OpDesc struct _PaddleMobile__Framework__Proto__OpDesc {
{
ProtobufCMessage base; ProtobufCMessage base;
char *type; char *type;
size_t n_inputs; size_t n_inputs;
...@@ -171,15 +191,16 @@ struct _PaddleMobile__Framework__Proto__OpDesc ...@@ -171,15 +191,16 @@ struct _PaddleMobile__Framework__Proto__OpDesc
protobuf_c_boolean is_target; protobuf_c_boolean is_target;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_DESC__INIT \ #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 } 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. * VarProto describes the C++ type framework::Variable.
*/ */
struct _PaddleMobile__Framework__Proto__OpProto__Var struct _PaddleMobile__Framework__Proto__OpProto__Var {
{
ProtobufCMessage base; ProtobufCMessage base;
char *name; char *name;
char *comment; char *comment;
...@@ -192,15 +213,16 @@ struct _PaddleMobile__Framework__Proto__OpProto__Var ...@@ -192,15 +213,16 @@ struct _PaddleMobile__Framework__Proto__OpProto__Var
char *reuse; char *reuse;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__VAR__INIT \ #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 } 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. * AttrProto describes the C++ type Attribute.
*/ */
struct _PaddleMobile__Framework__Proto__OpProto__Attr struct _PaddleMobile__Framework__Proto__OpProto__Attr {
{
ProtobufCMessage base; ProtobufCMessage base;
char *name; char *name;
PaddleMobile__Framework__Proto__AttrType type; PaddleMobile__Framework__Proto__AttrType type;
...@@ -214,15 +236,16 @@ struct _PaddleMobile__Framework__Proto__OpProto__Attr ...@@ -214,15 +236,16 @@ struct _PaddleMobile__Framework__Proto__OpProto__Attr
protobuf_c_boolean generated; protobuf_c_boolean generated;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__ATTR__INIT \ #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 } 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. * OpProto describes a C++ framework::OperatorBase derived class.
*/ */
struct _PaddleMobile__Framework__Proto__OpProto struct _PaddleMobile__Framework__Proto__OpProto {
{
ProtobufCMessage base; ProtobufCMessage base;
char *type; char *type;
size_t n_inputs; size_t n_inputs;
...@@ -234,12 +257,13 @@ struct _PaddleMobile__Framework__Proto__OpProto ...@@ -234,12 +257,13 @@ struct _PaddleMobile__Framework__Proto__OpProto
char *comment; char *comment;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__OP_PROTO__INIT \ #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 } 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 struct _PaddleMobile__Framework__Proto__VarType__TensorDesc {
{
ProtobufCMessage base; ProtobufCMessage base;
/* /*
* Should only be PODType. Is enforced in C++ * Should only be PODType. Is enforced in C++
...@@ -252,69 +276,75 @@ struct _PaddleMobile__Framework__Proto__VarType__TensorDesc ...@@ -252,69 +276,75 @@ struct _PaddleMobile__Framework__Proto__VarType__TensorDesc
int64_t *dims; int64_t *dims;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TENSOR_DESC__INIT \ #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 } 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 {
struct _PaddleMobile__Framework__Proto__VarType__LoDTensorDesc
{
ProtobufCMessage base; ProtobufCMessage base;
PaddleMobile__Framework__Proto__VarType__TensorDesc *tensor; PaddleMobile__Framework__Proto__VarType__TensorDesc *tensor;
protobuf_c_boolean has_lod_level; protobuf_c_boolean has_lod_level;
int32_t lod_level; int32_t lod_level;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_DESC__INIT \ #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 } PROTOBUF_C_MESSAGE_INIT( \
&paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor) \
, NULL, 0, 0 \
}
struct _PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc struct _PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc {
{
ProtobufCMessage base; ProtobufCMessage base;
PaddleMobile__Framework__Proto__VarType__TensorDesc *tensor; PaddleMobile__Framework__Proto__VarType__TensorDesc *tensor;
protobuf_c_boolean has_lod_level; protobuf_c_boolean has_lod_level;
int32_t lod_level; int32_t lod_level;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__LO_DTENSOR_ARRAY_DESC__INIT \ #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 } PROTOBUF_C_MESSAGE_INIT( \
&paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor) \
, NULL, 0, 0 \
}
struct _PaddleMobile__Framework__Proto__VarType__ReaderDesc {
struct _PaddleMobile__Framework__Proto__VarType__ReaderDesc
{
ProtobufCMessage base; ProtobufCMessage base;
size_t n_lod_tensor; size_t n_lod_tensor;
PaddleMobile__Framework__Proto__VarType__LoDTensorDesc **lod_tensor; PaddleMobile__Framework__Proto__VarType__LoDTensorDesc **lod_tensor;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__READER_DESC__INIT \ #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 } PROTOBUF_C_MESSAGE_INIT( \
&paddle_mobile__framework__proto__var_type__reader_desc__descriptor) \
, 0, NULL \
}
struct _PaddleMobile__Framework__Proto__VarType__ChannelDesc struct _PaddleMobile__Framework__Proto__VarType__ChannelDesc {
{
ProtobufCMessage base; ProtobufCMessage base;
PaddleMobile__Framework__Proto__VarType__Type data_type; PaddleMobile__Framework__Proto__VarType__Type data_type;
int64_t capacity; int64_t capacity;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__CHANNEL_DESC__INIT \ #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 } 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 {
struct _PaddleMobile__Framework__Proto__VarType__Tuple
{
ProtobufCMessage base; ProtobufCMessage base;
size_t n_element_type; size_t n_element_type;
PaddleMobile__Framework__Proto__VarType__Type *element_type; PaddleMobile__Framework__Proto__VarType__Type *element_type;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TUPLE__INIT \ #define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TUPLE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__var_type__tuple__descriptor) \ { \
, 0,NULL } PROTOBUF_C_MESSAGE_INIT( \
&paddle_mobile__framework__proto__var_type__tuple__descriptor) \
, 0, NULL \
}
struct _PaddleMobile__Framework__Proto__VarType struct _PaddleMobile__Framework__Proto__VarType {
{
ProtobufCMessage base; ProtobufCMessage base;
PaddleMobile__Framework__Proto__VarType__Type type; PaddleMobile__Framework__Proto__VarType__Type type;
PaddleMobile__Framework__Proto__VarType__TensorDesc *selected_rows; PaddleMobile__Framework__Proto__VarType__TensorDesc *selected_rows;
...@@ -325,12 +355,14 @@ struct _PaddleMobile__Framework__Proto__VarType ...@@ -325,12 +355,14 @@ struct _PaddleMobile__Framework__Proto__VarType
PaddleMobile__Framework__Proto__VarType__Tuple *tuple; PaddleMobile__Framework__Proto__VarType__Tuple *tuple;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__INIT \ #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 } PROTOBUF_C_MESSAGE_INIT( \
&paddle_mobile__framework__proto__var_type__descriptor) \
, PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_TYPE__TYPE__BOOL, NULL, NULL, NULL, \
struct _PaddleMobile__Framework__Proto__VarDesc NULL, NULL, NULL \
{ }
struct _PaddleMobile__Framework__Proto__VarDesc {
ProtobufCMessage base; ProtobufCMessage base;
char *name; char *name;
PaddleMobile__Framework__Proto__VarType *type; PaddleMobile__Framework__Proto__VarType *type;
...@@ -338,12 +370,13 @@ struct _PaddleMobile__Framework__Proto__VarDesc ...@@ -338,12 +370,13 @@ struct _PaddleMobile__Framework__Proto__VarDesc
protobuf_c_boolean persistable; protobuf_c_boolean persistable;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_DESC__INIT \ #define PADDLE_MOBILE__FRAMEWORK__PROTO__VAR_DESC__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__var_desc__descriptor) \ { \
, NULL, NULL, 0, 0 } PROTOBUF_C_MESSAGE_INIT( \
&paddle_mobile__framework__proto__var_desc__descriptor) \
, NULL, NULL, 0, 0 \
}
struct _PaddleMobile__Framework__Proto__BlockDesc {
struct _PaddleMobile__Framework__Proto__BlockDesc
{
ProtobufCMessage base; ProtobufCMessage base;
int32_t idx; int32_t idx;
int32_t parent_idx; int32_t parent_idx;
...@@ -355,9 +388,11 @@ struct _PaddleMobile__Framework__Proto__BlockDesc ...@@ -355,9 +388,11 @@ struct _PaddleMobile__Framework__Proto__BlockDesc
int32_t forward_block_idx; int32_t forward_block_idx;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__BLOCK_DESC__INIT \ #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 } PROTOBUF_C_MESSAGE_INIT( \
&paddle_mobile__framework__proto__block_desc__descriptor) \
, 0, 0, 0, NULL, 0, NULL, 0, -1 \
}
/* /*
* Please refer to * Please refer to
...@@ -366,261 +401,259 @@ struct _PaddleMobile__Framework__Proto__BlockDesc ...@@ -366,261 +401,259 @@ struct _PaddleMobile__Framework__Proto__BlockDesc
* TODO(panyx0718): A model can have multiple programs. Need a * TODO(panyx0718): A model can have multiple programs. Need a
* way to distinguish them. Maybe ID or name? * way to distinguish them. Maybe ID or name?
*/ */
struct _PaddleMobile__Framework__Proto__ProgramDesc struct _PaddleMobile__Framework__Proto__ProgramDesc {
{
ProtobufCMessage base; ProtobufCMessage base;
size_t n_blocks; size_t n_blocks;
PaddleMobile__Framework__Proto__BlockDesc **blocks; PaddleMobile__Framework__Proto__BlockDesc **blocks;
PaddleMobile__Framework__Proto__Version *version; PaddleMobile__Framework__Proto__Version *version;
}; };
#define PADDLE_MOBILE__FRAMEWORK__PROTO__PROGRAM_DESC__INIT \ #define PADDLE_MOBILE__FRAMEWORK__PROTO__PROGRAM_DESC__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&paddle_mobile__framework__proto__program_desc__descriptor) \ { \
, 0,NULL, NULL } PROTOBUF_C_MESSAGE_INIT( \
&paddle_mobile__framework__proto__program_desc__descriptor) \
, 0, NULL, NULL \
}
/* PaddleMobile__Framework__Proto__Version methods */ /* PaddleMobile__Framework__Proto__Version methods */
void paddle_mobile__framework__proto__version__init void paddle_mobile__framework__proto__version__init(
(PaddleMobile__Framework__Proto__Version *message); PaddleMobile__Framework__Proto__Version *message);
size_t paddle_mobile__framework__proto__version__get_packed_size size_t paddle_mobile__framework__proto__version__get_packed_size(
(const PaddleMobile__Framework__Proto__Version *message); const PaddleMobile__Framework__Proto__Version *message);
size_t paddle_mobile__framework__proto__version__pack size_t paddle_mobile__framework__proto__version__pack(
(const PaddleMobile__Framework__Proto__Version *message, const PaddleMobile__Framework__Proto__Version *message, uint8_t *out);
uint8_t *out); size_t paddle_mobile__framework__proto__version__pack_to_buffer(
size_t paddle_mobile__framework__proto__version__pack_to_buffer const PaddleMobile__Framework__Proto__Version *message,
(const PaddleMobile__Framework__Proto__Version *message,
ProtobufCBuffer *buffer); ProtobufCBuffer *buffer);
PaddleMobile__Framework__Proto__Version * PaddleMobile__Framework__Proto__Version *
paddle_mobile__framework__proto__version__unpack paddle_mobile__framework__proto__version__unpack(ProtobufCAllocator *allocator,
(ProtobufCAllocator *allocator,
size_t len, size_t len,
const uint8_t *data); const uint8_t *data);
void paddle_mobile__framework__proto__version__free_unpacked void paddle_mobile__framework__proto__version__free_unpacked(
(PaddleMobile__Framework__Proto__Version *message, PaddleMobile__Framework__Proto__Version *message,
ProtobufCAllocator *allocator); ProtobufCAllocator *allocator);
/* PaddleMobile__Framework__Proto__OpDesc__Attr methods */ /* PaddleMobile__Framework__Proto__OpDesc__Attr methods */
void paddle_mobile__framework__proto__op_desc__attr__init void paddle_mobile__framework__proto__op_desc__attr__init(
(PaddleMobile__Framework__Proto__OpDesc__Attr *message); PaddleMobile__Framework__Proto__OpDesc__Attr *message);
/* PaddleMobile__Framework__Proto__OpDesc__Var methods */ /* PaddleMobile__Framework__Proto__OpDesc__Var methods */
void paddle_mobile__framework__proto__op_desc__var__init void paddle_mobile__framework__proto__op_desc__var__init(
(PaddleMobile__Framework__Proto__OpDesc__Var *message); PaddleMobile__Framework__Proto__OpDesc__Var *message);
/* PaddleMobile__Framework__Proto__OpDesc methods */ /* PaddleMobile__Framework__Proto__OpDesc methods */
void paddle_mobile__framework__proto__op_desc__init void paddle_mobile__framework__proto__op_desc__init(
(PaddleMobile__Framework__Proto__OpDesc *message); PaddleMobile__Framework__Proto__OpDesc *message);
size_t paddle_mobile__framework__proto__op_desc__get_packed_size size_t paddle_mobile__framework__proto__op_desc__get_packed_size(
(const PaddleMobile__Framework__Proto__OpDesc *message); const PaddleMobile__Framework__Proto__OpDesc *message);
size_t paddle_mobile__framework__proto__op_desc__pack size_t paddle_mobile__framework__proto__op_desc__pack(
(const PaddleMobile__Framework__Proto__OpDesc *message, const PaddleMobile__Framework__Proto__OpDesc *message, uint8_t *out);
uint8_t *out); size_t paddle_mobile__framework__proto__op_desc__pack_to_buffer(
size_t paddle_mobile__framework__proto__op_desc__pack_to_buffer const PaddleMobile__Framework__Proto__OpDesc *message,
(const PaddleMobile__Framework__Proto__OpDesc *message,
ProtobufCBuffer *buffer); ProtobufCBuffer *buffer);
PaddleMobile__Framework__Proto__OpDesc * PaddleMobile__Framework__Proto__OpDesc *
paddle_mobile__framework__proto__op_desc__unpack paddle_mobile__framework__proto__op_desc__unpack(ProtobufCAllocator *allocator,
(ProtobufCAllocator *allocator,
size_t len, size_t len,
const uint8_t *data); const uint8_t *data);
void paddle_mobile__framework__proto__op_desc__free_unpacked void paddle_mobile__framework__proto__op_desc__free_unpacked(
(PaddleMobile__Framework__Proto__OpDesc *message, PaddleMobile__Framework__Proto__OpDesc *message,
ProtobufCAllocator *allocator); ProtobufCAllocator *allocator);
/* PaddleMobile__Framework__Proto__OpProto__Var methods */ /* PaddleMobile__Framework__Proto__OpProto__Var methods */
void paddle_mobile__framework__proto__op_proto__var__init void paddle_mobile__framework__proto__op_proto__var__init(
(PaddleMobile__Framework__Proto__OpProto__Var *message); PaddleMobile__Framework__Proto__OpProto__Var *message);
/* PaddleMobile__Framework__Proto__OpProto__Attr methods */ /* PaddleMobile__Framework__Proto__OpProto__Attr methods */
void paddle_mobile__framework__proto__op_proto__attr__init void paddle_mobile__framework__proto__op_proto__attr__init(
(PaddleMobile__Framework__Proto__OpProto__Attr *message); PaddleMobile__Framework__Proto__OpProto__Attr *message);
/* PaddleMobile__Framework__Proto__OpProto methods */ /* PaddleMobile__Framework__Proto__OpProto methods */
void paddle_mobile__framework__proto__op_proto__init void paddle_mobile__framework__proto__op_proto__init(
(PaddleMobile__Framework__Proto__OpProto *message); PaddleMobile__Framework__Proto__OpProto *message);
size_t paddle_mobile__framework__proto__op_proto__get_packed_size size_t paddle_mobile__framework__proto__op_proto__get_packed_size(
(const PaddleMobile__Framework__Proto__OpProto *message); const PaddleMobile__Framework__Proto__OpProto *message);
size_t paddle_mobile__framework__proto__op_proto__pack size_t paddle_mobile__framework__proto__op_proto__pack(
(const PaddleMobile__Framework__Proto__OpProto *message, const PaddleMobile__Framework__Proto__OpProto *message, uint8_t *out);
uint8_t *out); size_t paddle_mobile__framework__proto__op_proto__pack_to_buffer(
size_t paddle_mobile__framework__proto__op_proto__pack_to_buffer const PaddleMobile__Framework__Proto__OpProto *message,
(const PaddleMobile__Framework__Proto__OpProto *message,
ProtobufCBuffer *buffer); ProtobufCBuffer *buffer);
PaddleMobile__Framework__Proto__OpProto * PaddleMobile__Framework__Proto__OpProto *
paddle_mobile__framework__proto__op_proto__unpack paddle_mobile__framework__proto__op_proto__unpack(ProtobufCAllocator *allocator,
(ProtobufCAllocator *allocator,
size_t len, size_t len,
const uint8_t *data); const uint8_t *data);
void paddle_mobile__framework__proto__op_proto__free_unpacked void paddle_mobile__framework__proto__op_proto__free_unpacked(
(PaddleMobile__Framework__Proto__OpProto *message, PaddleMobile__Framework__Proto__OpProto *message,
ProtobufCAllocator *allocator); ProtobufCAllocator *allocator);
/* PaddleMobile__Framework__Proto__VarType__TensorDesc methods */ /* PaddleMobile__Framework__Proto__VarType__TensorDesc methods */
void 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); PaddleMobile__Framework__Proto__VarType__TensorDesc *message);
/* PaddleMobile__Framework__Proto__VarType__LoDTensorDesc methods */ /* PaddleMobile__Framework__Proto__VarType__LoDTensorDesc methods */
void 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); PaddleMobile__Framework__Proto__VarType__LoDTensorDesc *message);
/* PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc methods */ /* PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc methods */
void 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); PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc *message);
/* PaddleMobile__Framework__Proto__VarType__ReaderDesc methods */ /* PaddleMobile__Framework__Proto__VarType__ReaderDesc methods */
void 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); PaddleMobile__Framework__Proto__VarType__ReaderDesc *message);
/* PaddleMobile__Framework__Proto__VarType__ChannelDesc methods */ /* PaddleMobile__Framework__Proto__VarType__ChannelDesc methods */
void 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); PaddleMobile__Framework__Proto__VarType__ChannelDesc *message);
/* PaddleMobile__Framework__Proto__VarType__Tuple methods */ /* PaddleMobile__Framework__Proto__VarType__Tuple methods */
void paddle_mobile__framework__proto__var_type__tuple__init void paddle_mobile__framework__proto__var_type__tuple__init(
(PaddleMobile__Framework__Proto__VarType__Tuple *message); PaddleMobile__Framework__Proto__VarType__Tuple *message);
/* PaddleMobile__Framework__Proto__VarType methods */ /* PaddleMobile__Framework__Proto__VarType methods */
void paddle_mobile__framework__proto__var_type__init void paddle_mobile__framework__proto__var_type__init(
(PaddleMobile__Framework__Proto__VarType *message); PaddleMobile__Framework__Proto__VarType *message);
size_t paddle_mobile__framework__proto__var_type__get_packed_size size_t paddle_mobile__framework__proto__var_type__get_packed_size(
(const PaddleMobile__Framework__Proto__VarType *message); const PaddleMobile__Framework__Proto__VarType *message);
size_t paddle_mobile__framework__proto__var_type__pack size_t paddle_mobile__framework__proto__var_type__pack(
(const PaddleMobile__Framework__Proto__VarType *message, const PaddleMobile__Framework__Proto__VarType *message, uint8_t *out);
uint8_t *out); size_t paddle_mobile__framework__proto__var_type__pack_to_buffer(
size_t paddle_mobile__framework__proto__var_type__pack_to_buffer const PaddleMobile__Framework__Proto__VarType *message,
(const PaddleMobile__Framework__Proto__VarType *message,
ProtobufCBuffer *buffer); ProtobufCBuffer *buffer);
PaddleMobile__Framework__Proto__VarType * PaddleMobile__Framework__Proto__VarType *
paddle_mobile__framework__proto__var_type__unpack paddle_mobile__framework__proto__var_type__unpack(ProtobufCAllocator *allocator,
(ProtobufCAllocator *allocator,
size_t len, size_t len,
const uint8_t *data); const uint8_t *data);
void paddle_mobile__framework__proto__var_type__free_unpacked void paddle_mobile__framework__proto__var_type__free_unpacked(
(PaddleMobile__Framework__Proto__VarType *message, PaddleMobile__Framework__Proto__VarType *message,
ProtobufCAllocator *allocator); ProtobufCAllocator *allocator);
/* PaddleMobile__Framework__Proto__VarDesc methods */ /* PaddleMobile__Framework__Proto__VarDesc methods */
void paddle_mobile__framework__proto__var_desc__init void paddle_mobile__framework__proto__var_desc__init(
(PaddleMobile__Framework__Proto__VarDesc *message); PaddleMobile__Framework__Proto__VarDesc *message);
size_t paddle_mobile__framework__proto__var_desc__get_packed_size size_t paddle_mobile__framework__proto__var_desc__get_packed_size(
(const PaddleMobile__Framework__Proto__VarDesc *message); const PaddleMobile__Framework__Proto__VarDesc *message);
size_t paddle_mobile__framework__proto__var_desc__pack size_t paddle_mobile__framework__proto__var_desc__pack(
(const PaddleMobile__Framework__Proto__VarDesc *message, const PaddleMobile__Framework__Proto__VarDesc *message, uint8_t *out);
uint8_t *out); size_t paddle_mobile__framework__proto__var_desc__pack_to_buffer(
size_t paddle_mobile__framework__proto__var_desc__pack_to_buffer const PaddleMobile__Framework__Proto__VarDesc *message,
(const PaddleMobile__Framework__Proto__VarDesc *message,
ProtobufCBuffer *buffer); ProtobufCBuffer *buffer);
PaddleMobile__Framework__Proto__VarDesc * PaddleMobile__Framework__Proto__VarDesc *
paddle_mobile__framework__proto__var_desc__unpack paddle_mobile__framework__proto__var_desc__unpack(ProtobufCAllocator *allocator,
(ProtobufCAllocator *allocator,
size_t len, size_t len,
const uint8_t *data); const uint8_t *data);
void paddle_mobile__framework__proto__var_desc__free_unpacked void paddle_mobile__framework__proto__var_desc__free_unpacked(
(PaddleMobile__Framework__Proto__VarDesc *message, PaddleMobile__Framework__Proto__VarDesc *message,
ProtobufCAllocator *allocator); ProtobufCAllocator *allocator);
/* PaddleMobile__Framework__Proto__BlockDesc methods */ /* PaddleMobile__Framework__Proto__BlockDesc methods */
void paddle_mobile__framework__proto__block_desc__init void paddle_mobile__framework__proto__block_desc__init(
(PaddleMobile__Framework__Proto__BlockDesc *message); PaddleMobile__Framework__Proto__BlockDesc *message);
size_t paddle_mobile__framework__proto__block_desc__get_packed_size size_t paddle_mobile__framework__proto__block_desc__get_packed_size(
(const PaddleMobile__Framework__Proto__BlockDesc *message); const PaddleMobile__Framework__Proto__BlockDesc *message);
size_t paddle_mobile__framework__proto__block_desc__pack size_t paddle_mobile__framework__proto__block_desc__pack(
(const PaddleMobile__Framework__Proto__BlockDesc *message, const PaddleMobile__Framework__Proto__BlockDesc *message, uint8_t *out);
uint8_t *out); size_t paddle_mobile__framework__proto__block_desc__pack_to_buffer(
size_t paddle_mobile__framework__proto__block_desc__pack_to_buffer const PaddleMobile__Framework__Proto__BlockDesc *message,
(const PaddleMobile__Framework__Proto__BlockDesc *message,
ProtobufCBuffer *buffer); ProtobufCBuffer *buffer);
PaddleMobile__Framework__Proto__BlockDesc * PaddleMobile__Framework__Proto__BlockDesc *
paddle_mobile__framework__proto__block_desc__unpack paddle_mobile__framework__proto__block_desc__unpack(
(ProtobufCAllocator *allocator, ProtobufCAllocator *allocator, size_t len, const uint8_t *data);
size_t len, void paddle_mobile__framework__proto__block_desc__free_unpacked(
const uint8_t *data); PaddleMobile__Framework__Proto__BlockDesc *message,
void paddle_mobile__framework__proto__block_desc__free_unpacked
(PaddleMobile__Framework__Proto__BlockDesc *message,
ProtobufCAllocator *allocator); ProtobufCAllocator *allocator);
/* PaddleMobile__Framework__Proto__ProgramDesc methods */ /* PaddleMobile__Framework__Proto__ProgramDesc methods */
void paddle_mobile__framework__proto__program_desc__init void paddle_mobile__framework__proto__program_desc__init(
(PaddleMobile__Framework__Proto__ProgramDesc *message); PaddleMobile__Framework__Proto__ProgramDesc *message);
size_t paddle_mobile__framework__proto__program_desc__get_packed_size size_t paddle_mobile__framework__proto__program_desc__get_packed_size(
(const PaddleMobile__Framework__Proto__ProgramDesc *message); const PaddleMobile__Framework__Proto__ProgramDesc *message);
size_t paddle_mobile__framework__proto__program_desc__pack size_t paddle_mobile__framework__proto__program_desc__pack(
(const PaddleMobile__Framework__Proto__ProgramDesc *message, const PaddleMobile__Framework__Proto__ProgramDesc *message, uint8_t *out);
uint8_t *out); size_t paddle_mobile__framework__proto__program_desc__pack_to_buffer(
size_t paddle_mobile__framework__proto__program_desc__pack_to_buffer const PaddleMobile__Framework__Proto__ProgramDesc *message,
(const PaddleMobile__Framework__Proto__ProgramDesc *message,
ProtobufCBuffer *buffer); ProtobufCBuffer *buffer);
PaddleMobile__Framework__Proto__ProgramDesc * PaddleMobile__Framework__Proto__ProgramDesc *
paddle_mobile__framework__proto__program_desc__unpack paddle_mobile__framework__proto__program_desc__unpack(
(ProtobufCAllocator *allocator, ProtobufCAllocator *allocator, size_t len, const uint8_t *data);
size_t len, void paddle_mobile__framework__proto__program_desc__free_unpacked(
const uint8_t *data); PaddleMobile__Framework__Proto__ProgramDesc *message,
void paddle_mobile__framework__proto__program_desc__free_unpacked
(PaddleMobile__Framework__Proto__ProgramDesc *message,
ProtobufCAllocator *allocator); ProtobufCAllocator *allocator);
/* --- per-message closures --- */ /* --- per-message closures --- */
typedef void (*PaddleMobile__Framework__Proto__Version_Closure) typedef void (*PaddleMobile__Framework__Proto__Version_Closure)(
(const PaddleMobile__Framework__Proto__Version *message, const PaddleMobile__Framework__Proto__Version *message, void *closure_data);
void *closure_data); typedef void (*PaddleMobile__Framework__Proto__OpDesc__Attr_Closure)(
typedef void (*PaddleMobile__Framework__Proto__OpDesc__Attr_Closure) const PaddleMobile__Framework__Proto__OpDesc__Attr *message,
(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); void *closure_data);
typedef void (*PaddleMobile__Framework__Proto__OpProto__Var_Closure) typedef void (*PaddleMobile__Framework__Proto__OpDesc__Var_Closure)(
(const PaddleMobile__Framework__Proto__OpProto__Var *message, const PaddleMobile__Framework__Proto__OpDesc__Var *message,
void *closure_data); void *closure_data);
typedef void (*PaddleMobile__Framework__Proto__OpProto__Attr_Closure) typedef void (*PaddleMobile__Framework__Proto__OpDesc_Closure)(
(const PaddleMobile__Framework__Proto__OpProto__Attr *message, 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); void *closure_data);
typedef void (*PaddleMobile__Framework__Proto__OpProto_Closure) typedef void (*PaddleMobile__Framework__Proto__OpProto__Attr_Closure)(
(const PaddleMobile__Framework__Proto__OpProto *message, const PaddleMobile__Framework__Proto__OpProto__Attr *message,
void *closure_data); void *closure_data);
typedef void (*PaddleMobile__Framework__Proto__VarType__TensorDesc_Closure) typedef void (*PaddleMobile__Framework__Proto__OpProto_Closure)(
(const PaddleMobile__Framework__Proto__VarType__TensorDesc *message, 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); void *closure_data);
typedef void (*PaddleMobile__Framework__Proto__VarType__LoDTensorDesc_Closure) typedef void (*PaddleMobile__Framework__Proto__VarType__LoDTensorDesc_Closure)(
(const PaddleMobile__Framework__Proto__VarType__LoDTensorDesc *message, const PaddleMobile__Framework__Proto__VarType__LoDTensorDesc *message,
void *closure_data); void *closure_data);
typedef void (*PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc_Closure) typedef void (
(const PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc *message, *PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc_Closure)(
const PaddleMobile__Framework__Proto__VarType__LoDTensorArrayDesc *message,
void *closure_data); void *closure_data);
typedef void (*PaddleMobile__Framework__Proto__VarType__ReaderDesc_Closure) typedef void (*PaddleMobile__Framework__Proto__VarType__ReaderDesc_Closure)(
(const PaddleMobile__Framework__Proto__VarType__ReaderDesc *message, const PaddleMobile__Framework__Proto__VarType__ReaderDesc *message,
void *closure_data); void *closure_data);
typedef void (*PaddleMobile__Framework__Proto__VarType__ChannelDesc_Closure) typedef void (*PaddleMobile__Framework__Proto__VarType__ChannelDesc_Closure)(
(const PaddleMobile__Framework__Proto__VarType__ChannelDesc *message, const PaddleMobile__Framework__Proto__VarType__ChannelDesc *message,
void *closure_data); void *closure_data);
typedef void (*PaddleMobile__Framework__Proto__VarType__Tuple_Closure) typedef void (*PaddleMobile__Framework__Proto__VarType__Tuple_Closure)(
(const PaddleMobile__Framework__Proto__VarType__Tuple *message, const PaddleMobile__Framework__Proto__VarType__Tuple *message,
void *closure_data); void *closure_data);
typedef void (*PaddleMobile__Framework__Proto__VarType_Closure) typedef void (*PaddleMobile__Framework__Proto__VarType_Closure)(
(const PaddleMobile__Framework__Proto__VarType *message, 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); void *closure_data);
typedef void (*PaddleMobile__Framework__Proto__VarDesc_Closure) typedef void (*PaddleMobile__Framework__Proto__ProgramDesc_Closure)(
(const PaddleMobile__Framework__Proto__VarDesc *message, const PaddleMobile__Framework__Proto__ProgramDesc *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); void *closure_data);
/* --- services --- */ /* --- services --- */
/* --- descriptors --- */ /* --- descriptors --- */
extern const ProtobufCEnumDescriptor paddle_mobile__framework__proto__attr_type__descriptor; extern const ProtobufCEnumDescriptor
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__version__descriptor; paddle_mobile__framework__proto__attr_type__descriptor;
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__descriptor; extern const ProtobufCMessageDescriptor
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__attr__descriptor; paddle_mobile__framework__proto__version__descriptor;
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_desc__var__descriptor; extern const ProtobufCMessageDescriptor
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__descriptor; paddle_mobile__framework__proto__op_desc__descriptor;
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__var__descriptor; extern const ProtobufCMessageDescriptor
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__op_proto__attr__descriptor; paddle_mobile__framework__proto__op_desc__attr__descriptor;
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__descriptor; extern const ProtobufCMessageDescriptor
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__tensor_desc__descriptor; paddle_mobile__framework__proto__op_desc__var__descriptor;
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__lo_dtensor_desc__descriptor; extern const ProtobufCMessageDescriptor
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__lo_dtensor_array_desc__descriptor; paddle_mobile__framework__proto__op_proto__descriptor;
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__reader_desc__descriptor; extern const ProtobufCMessageDescriptor
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__channel_desc__descriptor; paddle_mobile__framework__proto__op_proto__var__descriptor;
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_type__tuple__descriptor; extern const ProtobufCMessageDescriptor
extern const ProtobufCEnumDescriptor paddle_mobile__framework__proto__var_type__type__descriptor; paddle_mobile__framework__proto__op_proto__attr__descriptor;
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__var_desc__descriptor; extern const ProtobufCMessageDescriptor
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__block_desc__descriptor; paddle_mobile__framework__proto__var_type__descriptor;
extern const ProtobufCMessageDescriptor paddle_mobile__framework__proto__program_desc__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 PROTOBUF_C__END_DECLS
#endif /* PROTOBUF_C_framework_2eproto__INCLUDED */ #endif /* PROTOBUF_C_framework_2eproto__INCLUDED */
...@@ -58,6 +58,15 @@ class Executor { ...@@ -58,6 +58,15 @@ class Executor {
std::vector<Ptype> Predict(const std::vector<Ptype> &input, std::vector<Ptype> Predict(const std::vector<Ptype> &input,
const std::vector<int64_t> &dims); const std::vector<int64_t> &dims);
#ifdef PADDLE_MOBILE_FPGA
void InjectVariable(const framework::Tensor &t, string var_name);
void FeedData(const framework::Tensor &t);
std::shared_ptr<framework::Tensor> 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: protected:
Executor() = default; Executor() = default;
std::shared_ptr<framework::Tensor> Predict(const framework::Tensor &t, std::shared_ptr<framework::Tensor> Predict(const framework::Tensor &t,
...@@ -83,7 +92,6 @@ class Executor { ...@@ -83,7 +92,6 @@ class Executor {
uint64_t runEnd = 0UL; uint64_t runEnd = 0UL;
}; };
#endif #endif
int batch_size_ = 1;
bool use_optimize_ = false; bool use_optimize_ = false;
bool loddable_ = false; bool loddable_ = false;
}; };
......
...@@ -14,31 +14,30 @@ limitations under the License. */ ...@@ -14,31 +14,30 @@ limitations under the License. */
#pragma once #pragma once
#include <string>
#include "framework/operator.h" #include "framework/operator.h"
#include "operators/op_param.h"
#include "operators/kernel/dequantize_kernel.h" #include "operators/kernel/dequantize_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile { namespace paddle_mobile {
namespace operators { namespace operators {
template <typename DeviceType, typename T> template <typename DeviceType, typename T>
class DequantizeOp : public framework::OperatorWithKernel< class DequantizeOp
DeviceType, : public framework::OperatorWithKernel<DeviceType,
DequantizeParam<DeviceType>, DequantizeParam<DeviceType>,
DequantizeKernel<DeviceType, T>> { DequantizeKernel<DeviceType, T>> {
public: public:
DequantizeOp(const std::string &type, DequantizeOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &inputs,
const VariableNameMap &outputs, const VariableNameMap &outputs,
const framework::AttributeMap &attrs, const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope) std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, : framework::OperatorWithKernel<DeviceType, DequantizeParam<DeviceType>,
DequantizeParam<DeviceType>,
DequantizeKernel<DeviceType, T>>( DequantizeKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
// inference output shape // inference output shape
void InferShape() const override; void InferShape() const override;
}; };
} // namespace paddle_mobile
} // namespace operators } // namespace operators
} // namespace paddle_mobile
...@@ -38,7 +38,7 @@ void DequantizeKernel<CPU, float>::Compute( ...@@ -38,7 +38,7 @@ void DequantizeKernel<CPU, float>::Compute(
const int32_t *x = input->data<const int32_t>(); const int32_t *x = input->data<const int32_t>();
float *y = output->mutable_data<float>(); float *y = output->mutable_data<float>();
size_t size = output->numel(); 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) #if defined(__ARM_NEON__) || defined(__ARM_NEON)
size_t loop = size >> 4; size_t loop = size >> 4;
size_t remain = size & 0xF; size_t remain = size & 0xF;
......
...@@ -16,7 +16,6 @@ limitations under the License. */ ...@@ -16,7 +16,6 @@ limitations under the License. */
#include "operators/kernel/quantize_kernel.h" #include "operators/kernel/quantize_kernel.h"
#include <cmath> #include <cmath>
#include <limits>
#if defined(__ARM_NEON__) || defined(__ARM_NEON) #if defined(__ARM_NEON__) || defined(__ARM_NEON)
#include <arm_neon.h> #include <arm_neon.h>
...@@ -55,7 +54,7 @@ int32x4_t vrnd_to_even(float32x4_t r) { ...@@ -55,7 +54,7 @@ int32x4_t vrnd_to_even(float32x4_t r) {
if (abs(q) % 2 == 0) { if (abs(q) % 2 == 0) {
ret[i] = q; ret[i] = q;
} else { } 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) { ...@@ -131,7 +130,7 @@ static float find_abs_max(const Tensor *input) {
static void quantize_round_to_even(const Tensor *input, const float scale, static void quantize_round_to_even(const Tensor *input, const float scale,
Tensor *output) { Tensor *output) {
const float *x = input->data<const float>(); const float *x = input->data<const float>();
int8_t *y = output->data<int8_t>(); int8_t *y = output->mutable_data<int8_t>();
size_t size = input->numel(); size_t size = input->numel();
#if defined(__ARM_NEON__) || defined(__ARM_NEON) #if defined(__ARM_NEON__) || defined(__ARM_NEON)
size_t loop = size >> 4; size_t loop = size >> 4;
...@@ -153,8 +152,8 @@ static void quantize_round_to_even(const Tensor *input, const float scale, ...@@ -153,8 +152,8 @@ static void quantize_round_to_even(const Tensor *input, const float scale,
int16x4_t d1 = vmovn_s32(q1); int16x4_t d1 = vmovn_s32(q1);
int16x4_t d2 = vmovn_s32(q2); int16x4_t d2 = vmovn_s32(q2);
int16x4_t d3 = vmovn_s32(q3); int16x4_t d3 = vmovn_s32(q3);
int16x8_t q5 = vcombine_s16(d1, d0); int16x8_t q5 = vcombine_s16(d0, d1);
int16x8_t q6 = vcombine_s16(d3, d2); int16x8_t q6 = vcombine_s16(d2, d3);
int8x8_t d5 = vmovn_s16(q5); int8x8_t d5 = vmovn_s16(q5);
int8x8_t d6 = vmovn_s16(q6); int8x8_t d6 = vmovn_s16(q6);
vst1_s8(y, d5); vst1_s8(y, d5);
...@@ -174,7 +173,7 @@ static void quantize_round_to_even(const Tensor *input, const float scale, ...@@ -174,7 +173,7 @@ static void quantize_round_to_even(const Tensor *input, const float scale,
if (abs(q) % 2 == 0) { if (abs(q) % 2 == 0) {
y[i] = q; y[i] = q;
} else { } 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, ...@@ -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, static void quantize_round_to_zero(const Tensor *input, const float scale,
Tensor *output) { Tensor *output) {
const float *x = input->data<const float>(); const float *x = input->data<const float>();
int8_t *y = output->data<int8_t>(); int8_t *y = output->mutable_data<int8_t>();
size_t size = input->numel(); size_t size = input->numel();
#ifdef defined(__ARM_NEON__) || defined(__ARM_NEON) #ifdef defined(__ARM_NEON__) || defined(__ARM_NEON)
size_t loop = size >> 4; size_t loop = size >> 4;
...@@ -205,8 +204,8 @@ static void quantize_round_to_zero(const Tensor *input, const float scale, ...@@ -205,8 +204,8 @@ static void quantize_round_to_zero(const Tensor *input, const float scale,
int16x4_t d1 = vmovn_s32(q1); int16x4_t d1 = vmovn_s32(q1);
int16x4_t d2 = vmovn_s32(q2); int16x4_t d2 = vmovn_s32(q2);
int16x4_t d3 = vmovn_s32(q3); int16x4_t d3 = vmovn_s32(q3);
int16x8_t q5 = vcombine_s16(d1, d0); int16x8_t q5 = vcombine_s16(d0, d1);
int16x8_t q6 = vcombine_s16(d3, d2); int16x8_t q6 = vcombine_s16(d2, d3);
int8x8_t d5 = vmovn_s16(q5); int8x8_t d5 = vmovn_s16(q5);
int8x8_t d6 = vmovn_s16(q6); int8x8_t d6 = vmovn_s16(q6);
vst1_s8(y, d5); vst1_s8(y, d5);
...@@ -224,7 +223,7 @@ static void quantize_round_to_zero(const Tensor *input, const float scale, ...@@ -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, static void quantize_round_to_nearest(const Tensor *input, const float scale,
Tensor *output) { Tensor *output) {
const float *x = input->data<const float>(); const float *x = input->data<const float>();
int8_t *y = output->data<int8_t>(); int8_t *y = output->mutable_data<int8_t>();
size_t size = input->numel(); size_t size = input->numel();
#ifdef defined(__ARM_NEON__) || defined(__ARM_NEON) #ifdef defined(__ARM_NEON__) || defined(__ARM_NEON)
size_t loop = size >> 4; size_t loop = size >> 4;
...@@ -246,8 +245,8 @@ static void quantize_round_to_nearest(const Tensor *input, const float scale, ...@@ -246,8 +245,8 @@ static void quantize_round_to_nearest(const Tensor *input, const float scale,
int16x4_t d1 = vmovn_s32(q1); int16x4_t d1 = vmovn_s32(q1);
int16x4_t d2 = vmovn_s32(q2); int16x4_t d2 = vmovn_s32(q2);
int16x4_t d3 = vmovn_s32(q3); int16x4_t d3 = vmovn_s32(q3);
int16x8_t q5 = vcombine_s16(d1, d0); int16x8_t q5 = vcombine_s16(d0, d1);
int16x8_t q6 = vcombine_s16(d3, d2); int16x8_t q6 = vcombine_s16(d2, d3);
int8x8_t d5 = vmovn_s16(q5); int8x8_t d5 = vmovn_s16(q5);
int8x8_t d6 = vmovn_s16(q6); int8x8_t d6 = vmovn_s16(q6);
vst1_s8(y, d5); vst1_s8(y, d5);
...@@ -258,7 +257,7 @@ static void quantize_round_to_nearest(const Tensor *input, const float scale, ...@@ -258,7 +257,7 @@ static void quantize_round_to_nearest(const Tensor *input, const float scale,
size = remain; size = remain;
#endif #endif
for (size_t i = 0; i < size; ++i) { 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<CPU, float>::Compute( ...@@ -279,9 +278,7 @@ void QuantizeKernel<CPU, float>::Compute(
} else { } else {
max_abs = find_abs_max(input); max_abs = find_abs_max(input);
} }
if (max_abs < std::numeric_limits<float>::min()) { max_abs = std::max(max_abs, 1e-6f);
max_abs = std::numeric_limits<float>::min();
}
// only support int8 currently // only support int8 currently
float online_scale = 127 / max_abs; float online_scale = 127 / max_abs;
param.online_scale_->mutable_data<float>()[0] = online_scale; param.online_scale_->mutable_data<float>()[0] = online_scale;
......
...@@ -20,9 +20,9 @@ limitations under the License. */ ...@@ -20,9 +20,9 @@ limitations under the License. */
namespace paddle_mobile { namespace paddle_mobile {
namespace operators { namespace operators {
template<typename DeviceType, typename T> template <typename DeviceType, typename T>
class DequantizeKernel : public class DequantizeKernel
framework::OpKernelBase<DeviceType, DequantizeParam<DeviceType>> { : public framework::OpKernelBase<DeviceType, DequantizeParam<DeviceType>> {
public: public:
void Compute(const DequantizeParam<DeviceType> &param) const; void Compute(const DequantizeParam<DeviceType> &param) const;
bool Init(DequantizeParam<DeviceType> *param); bool Init(DequantizeParam<DeviceType> *param);
......
...@@ -20,9 +20,9 @@ limitations under the License. */ ...@@ -20,9 +20,9 @@ limitations under the License. */
namespace paddle_mobile { namespace paddle_mobile {
namespace operators { namespace operators {
template<typename DeviceType, typename T> template <typename DeviceType, typename T>
class QuantizeKernel : public class QuantizeKernel
framework::OpKernelBase<DeviceType, QuantizeParam<DeviceType>> { : public framework::OpKernelBase<DeviceType, QuantizeParam<DeviceType>> {
public: public:
void Compute(const QuantizeParam<DeviceType> &param) const; void Compute(const QuantizeParam<DeviceType> &param) const;
bool Init(QuantizeParam<DeviceType> *param); bool Init(QuantizeParam<DeviceType> *param);
......
...@@ -14,9 +14,10 @@ limitations under the License. */ ...@@ -14,9 +14,10 @@ limitations under the License. */
#pragma once #pragma once
#include <string>
#include "framework/operator.h" #include "framework/operator.h"
#include "operators/op_param.h"
#include "operators/kernel/quantize_kernel.h" #include "operators/kernel/quantize_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile { namespace paddle_mobile {
namespace operators { namespace operators {
...@@ -26,18 +27,16 @@ class QuantizeOp : public framework::OperatorWithKernel< ...@@ -26,18 +27,16 @@ class QuantizeOp : public framework::OperatorWithKernel<
DeviceType, QuantizeParam<DeviceType>, DeviceType, QuantizeParam<DeviceType>,
operators::QuantizeKernel<DeviceType, T>> { operators::QuantizeKernel<DeviceType, T>> {
public: public:
QuantizeOp(const std::string &type, QuantizeOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &inputs,
const VariableNameMap &outputs, const VariableNameMap &outputs,
const framework::AttributeMap &attrs, const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope) std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, : framework::OperatorWithKernel<DeviceType, QuantizeParam<DeviceType>,
QuantizeParam<DeviceType>,
operators::QuantizeKernel<DeviceType, T>>( operators::QuantizeKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
// inference output shape // inference output shape
void InferShape() const override; void InferShape() const override;
}; };
} // namespace paddle_mobile
} // namespace operators } // namespace operators
} // namespace paddle_mobile
...@@ -212,6 +212,14 @@ if (NOT FOUND_MATCH) ...@@ -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) 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) 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 # gen test log
ADD_EXECUTABLE(test-log common/test_log.cpp) ADD_EXECUTABLE(test-log common/test_log.cpp)
target_link_libraries(test-log paddle-mobile) target_link_libraries(test-log paddle-mobile)
......
/* 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<const int32_t>();
float* y = output->mutable_data<float>();
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<framework::Scope>();
inputs["X"] = std::vector<std::string>({"input"});
inputs["Scale"] = std::vector<std::string>({"scale"});
outputs["Out"] = std::vector<std::string>({"output"});
auto input_var = scope.get()->Var("input");
auto input = input_var->template GetMutable<framework::LoDTensor>();
SetupTensor<int32_t>(input, dim, -1000, 1000);
auto scale_var = scope.get()->Var("scale");
auto scale = scale_var->template GetMutable<framework::LoDTensor>();
scale->Resize(framework::make_ddim({1}));
scale->mutable_data<float>()[0] = 1.27;
auto output_var = scope.get()->Var("output");
framework::AttributeMap attrs;
attrs["weight_scale"].Set<float>(1.74);
auto* op = new operators::DequantizeOp<CPU, float>("dequantize", inputs,
outputs, attrs, scope);
op->InferShape();
op->Run();
auto output = output_var->template Get<framework::LoDTensor>();
const float* output_data = output->data<float>();
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<float>();
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(); }
/* 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<const float>();
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<const float>();
int8_t *y = output->mutable_data<int8_t>();
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<framework::Scope>();
inputs["X"] = std::vector<std::string>({"input"});
outputs["Out"] = std::vector<std::string>({"output"});
outputs["OutScale"] = std::vector<std::string>({"output_scale"});
auto input_var = scope.get()->Var("input");
auto input = input_var->template GetMutable<framework::LoDTensor>();
SetupTensor<float>(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<CPU, float>("quantize", inputs, outputs,
attrs, scope);
op->InferShape();
op->Run();
auto output = output_var->template Get<framework::LoDTensor>();
const int8_t *output_data = output->data<int8_t>();
auto output_scale = output_scale_var->template Get<framework::LoDTensor>();
const float *output_scale_data = output_scale->data<float>();
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<int8_t>();
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<int>(output_data[i]), i,
static_cast<int>(output_cmp_data[i]));
}
delete op;
return 0;
}
} // namespace paddle_mobile
int main() { return paddle_mobile::TestQuqntizeOp(); }
...@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -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 See the License for the specific language governing permissions and
limitations under the License. */ 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/central-arm-func/sigmoid_arm_func.h"
#include "../../src/operators/kernel/sigmoid_kernel.h"
#include "../test_helper.h" #include "../test_helper.h"
#include "io/executor.h" #include "io/executor.h"
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
TOTAL_ERRORS=0 TOTAL_ERRORS=0
# The trick to remove deleted files: https://stackoverflow.com/a/2413151 # 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; cpplint $file;
TOTAL_ERRORS=$(expr $TOTAL_ERRORS + $?); TOTAL_ERRORS=$(expr $TOTAL_ERRORS + $?);
done done
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册