Skip to content

Commit

Permalink
fixup! generated and integrated new set files
Browse files Browse the repository at this point in the history
  • Loading branch information
nopeslide committed Aug 13, 2020
1 parent 1c2878c commit 89d557b
Show file tree
Hide file tree
Showing 21 changed files with 84 additions and 88 deletions.
18 changes: 7 additions & 11 deletions include/operators/set_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "tracing.h"
#include <stddef.h>
#include <string.h>
#include <stdio.h>

typedef struct set_operator_version set_operator_version;
typedef struct set_operator set_operator;
Expand Down Expand Up @@ -51,16 +50,13 @@ find_operator(
size_t opset
) {
set_operator_version *tmp = NULL;
for( size_t i_domain = 0; i_domain < all_operator_sets.length; i_domain++ ) {
set_domain *domain = all_operator_sets.domains[i_domain];
for (size_t i_op = 0; i_op < domain->length; i_op++) {
set_operator *op = domain->operators[i_op];
if (strcmp(op->name,name) == 0) {
for (size_t i_version = 0; i_version < op->length; i_version++) {
set_operator_version *op_version = op->versions[i_version];
if (op_version->version <= opset) {
if (!tmp || op_version->version >= tmp->version) {
tmp = op_version;
for( set_domain **domain = all_operator_sets.domains; *domain; domain++ ) {
for (set_operator **op = (*domain)->operators; *op; op++) {
if (strcmp((*op)->name,name) == 0) {
for (set_operator_version **op_version = (*op)->versions; *op_version; op_version++) {
if ((*op_version)->version <= opset) {
if (!tmp || (*op_version)->version >= tmp->version) {
tmp = *op_version;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/operators/ai.onnx/Add/set_operator__ai_onnx__add.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__add = {
.name = "Add",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__add__7
},
.length = __COUNTER__
&set_operator__ai_onnx__add__7,
NULL
}
};
6 changes: 3 additions & 3 deletions src/operators/ai.onnx/ArgMax/set_operator__ai_onnx__argmax.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__argmax = {
.name = "ArgMax",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__argmax__12
},
.length = __COUNTER__
&set_operator__ai_onnx__argmax__12,
NULL
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__batchnormalization = {
.name = "BatchNormalization",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__batchnormalization__9
},
.length = __COUNTER__
&set_operator__ai_onnx__batchnormalization__9,
NULL
}
};
6 changes: 3 additions & 3 deletions src/operators/ai.onnx/Clip/set_operator__ai_onnx__clip.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__clip = {
.name = "Clip",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__clip__12
},
.length = __COUNTER__
&set_operator__ai_onnx__clip__12,
NULL
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__constant = {
.name = "Constant",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__constant__12
},
.length = __COUNTER__
&set_operator__ai_onnx__constant__12,
NULL
}
};
6 changes: 3 additions & 3 deletions src/operators/ai.onnx/Conv/set_operator__ai_onnx__conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__conv = {
.name = "Conv",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__conv__11
},
.length = __COUNTER__
&set_operator__ai_onnx__conv__11,
NULL
}
};
6 changes: 3 additions & 3 deletions src/operators/ai.onnx/Elu/set_operator__ai_onnx__elu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__elu = {
.name = "Elu",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__elu__6
},
.length = __COUNTER__
&set_operator__ai_onnx__elu__6,
NULL
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__globalaveragepool = {
.name = "GlobalAveragePool",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__globalaveragepool__1
},
.length = __COUNTER__
&set_operator__ai_onnx__globalaveragepool__1,
NULL
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__identity = {
.name = "Identity",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__identity__1
},
.length = __COUNTER__
&set_operator__ai_onnx__identity__1,
NULL
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__leakyrelu = {
.name = "LeakyRelu",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__leakyrelu__6
},
.length = __COUNTER__
&set_operator__ai_onnx__leakyrelu__6,
NULL
}
};
6 changes: 3 additions & 3 deletions src/operators/ai.onnx/MatMul/set_operator__ai_onnx__matmul.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__matmul = {
.name = "MatMul",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__matmul__9
},
.length = __COUNTER__
&set_operator__ai_onnx__matmul__9,
NULL
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__maxpool = {
.name = "MaxPool",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__maxpool__12
},
.length = __COUNTER__
&set_operator__ai_onnx__maxpool__12,
NULL
}
};
6 changes: 3 additions & 3 deletions src/operators/ai.onnx/Mul/set_operator__ai_onnx__mul.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__mul = {
.name = "Mul",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__mul__7
},
.length = __COUNTER__
&set_operator__ai_onnx__mul__7,
NULL
}
};
6 changes: 3 additions & 3 deletions src/operators/ai.onnx/Relu/set_operator__ai_onnx__relu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__relu = {
.name = "Relu",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__relu__6
},
.length = __COUNTER__
&set_operator__ai_onnx__relu__6,
NULL
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__reshape = {
.name = "Reshape",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__reshape__5
},
.length = __COUNTER__
&set_operator__ai_onnx__reshape__5,
NULL
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__sigmoid = {
.name = "Sigmoid",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__sigmoid__6
},
.length = __COUNTER__
&set_operator__ai_onnx__sigmoid__6,
NULL
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__softmax = {
.name = "Softmax",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__softmax__11
},
.length = __COUNTER__
&set_operator__ai_onnx__softmax__11,
NULL
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set_operator set_operator__ai_onnx__transpose = {
.name = "Transpose",
.versions = {
[__COUNTER__]=&set_operator__ai_onnx__transpose__1
},
.length = __COUNTER__
&set_operator__ai_onnx__transpose__1,
NULL
}
};
40 changes: 20 additions & 20 deletions src/operators/ai.onnx/set_operator__ai_onnx.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@
set_domain set_operator__ai_onnx = {
.name = "ai.onnx",
.operators = {
[__COUNTER__]=&set_operator__ai_onnx__matmul,
[__COUNTER__]=&set_operator__ai_onnx__identity,
[__COUNTER__]=&set_operator__ai_onnx__maxpool,
[__COUNTER__]=&set_operator__ai_onnx__transpose,
[__COUNTER__]=&set_operator__ai_onnx__clip,
[__COUNTER__]=&set_operator__ai_onnx__elu,
[__COUNTER__]=&set_operator__ai_onnx__relu,
[__COUNTER__]=&set_operator__ai_onnx__conv,
[__COUNTER__]=&set_operator__ai_onnx__argmax,
[__COUNTER__]=&set_operator__ai_onnx__add,
[__COUNTER__]=&set_operator__ai_onnx__leakyrelu,
[__COUNTER__]=&set_operator__ai_onnx__reshape,
[__COUNTER__]=&set_operator__ai_onnx__globalaveragepool,
[__COUNTER__]=&set_operator__ai_onnx__mul,
[__COUNTER__]=&set_operator__ai_onnx__constant,
[__COUNTER__]=&set_operator__ai_onnx__batchnormalization,
[__COUNTER__]=&set_operator__ai_onnx__sigmoid,
[__COUNTER__]=&set_operator__ai_onnx__softmax
},
.length = __COUNTER__
&set_operator__ai_onnx__matmul,
&set_operator__ai_onnx__identity,
&set_operator__ai_onnx__maxpool,
&set_operator__ai_onnx__transpose,
&set_operator__ai_onnx__clip,
&set_operator__ai_onnx__elu,
&set_operator__ai_onnx__relu,
&set_operator__ai_onnx__conv,
&set_operator__ai_onnx__argmax,
&set_operator__ai_onnx__add,
&set_operator__ai_onnx__leakyrelu,
&set_operator__ai_onnx__reshape,
&set_operator__ai_onnx__globalaveragepool,
&set_operator__ai_onnx__mul,
&set_operator__ai_onnx__constant,
&set_operator__ai_onnx__batchnormalization,
&set_operator__ai_onnx__sigmoid,
&set_operator__ai_onnx__softmax,
NULL
}
};
6 changes: 3 additions & 3 deletions src/operators/set_operator.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

set_opset all_operator_sets = {
.domains = {
[__COUNTER__]=&set_operator__ai_onnx
},
.length = __COUNTER__
&set_operator__ai_onnx,
NULL
}
};

0 comments on commit 89d557b

Please sign in to comment.