Permalink
Browse files

Merge pull request #79 from a127a127/interpreter

[experimental] Interpreter
  • Loading branch information...
lubatang committed Sep 29, 2018
2 parents 97bb879 + 3166aec commit cdac8d7fe61608e88efd4cd94e96371c1765171f
Showing with 12,838 additions and 2 deletions.
  1. +1 −0 configure.ac
  2. +22 −0 include/onnc/Runtime/onnc-runtime-internal.h
  3. +163 −0 include/onnc/Runtime/onnc-runtime.h
  4. +13 −0 include/onnc/Runtime/operator/abs.h
  5. +13 −0 include/onnc/Runtime/operator/acos.h
  6. +15 −0 include/onnc/Runtime/operator/add.h
  7. +14 −0 include/onnc/Runtime/operator/affine.h
  8. +15 −0 include/onnc/Runtime/operator/and.h
  9. +14 −0 include/onnc/Runtime/operator/argmax.h
  10. +14 −0 include/onnc/Runtime/operator/argmin.h
  11. +13 −0 include/onnc/Runtime/operator/asin.h
  12. +13 −0 include/onnc/Runtime/operator/atan.h
  13. +15 −0 include/onnc/Runtime/operator/aten.h
  14. +20 −0 include/onnc/Runtime/operator/averagepool.h
  15. +31 −0 include/onnc/Runtime/operator/batchnormalization.h
  16. +13 −0 include/onnc/Runtime/operator/cast.h
  17. +13 −0 include/onnc/Runtime/operator/ceil.h
  18. +14 −0 include/onnc/Runtime/operator/clip.h
  19. +14 −0 include/onnc/Runtime/operator/concat.h
  20. +12 −0 include/onnc/Runtime/operator/constant.h
  21. +19 −0 include/onnc/Runtime/operator/constantfill.h
  22. +26 −0 include/onnc/Runtime/operator/conv.h
  23. +30 −0 include/onnc/Runtime/operator/convtranspose.h
  24. +13 −0 include/onnc/Runtime/operator/cos.h
  25. +16 −0 include/onnc/Runtime/operator/crop.h
  26. +13 −0 include/onnc/Runtime/operator/depthtospace.h
  27. +15 −0 include/onnc/Runtime/operator/div.h
  28. +15 −0 include/onnc/Runtime/operator/dropout.h
  29. +13 −0 include/onnc/Runtime/operator/elu.h
  30. +15 −0 include/onnc/Runtime/operator/equal.h
  31. +13 −0 include/onnc/Runtime/operator/exp.h
  32. +15 −0 include/onnc/Runtime/operator/expand.h
  33. +13 −0 include/onnc/Runtime/operator/flatten.h
  34. +13 −0 include/onnc/Runtime/operator/floor.h
  35. +15 −0 include/onnc/Runtime/operator/gather.h
  36. +20 −0 include/onnc/Runtime/operator/gemm.h
  37. +19 −0 include/onnc/Runtime/operator/giventensorfill.h
  38. +13 −0 include/onnc/Runtime/operator/globalaveragepool.h
  39. +13 −0 include/onnc/Runtime/operator/globallppool.h
  40. +13 −0 include/onnc/Runtime/operator/globalmaxpool.h
  41. +15 −0 include/onnc/Runtime/operator/greater.h
  42. +34 −0 include/onnc/Runtime/operator/gru.h
  43. +19 −0 include/onnc/Runtime/operator/gruunit.h
  44. +13 −0 include/onnc/Runtime/operator/hardmax.h
  45. +14 −0 include/onnc/Runtime/operator/hardsigmoid.h
  46. +13 −0 include/onnc/Runtime/operator/identity.h
  47. +15 −0 include/onnc/Runtime/operator/if.h
  48. +15 −0 include/onnc/Runtime/operator/imagescaler.h
  49. +17 −0 include/onnc/Runtime/operator/instancenormalization.h
  50. +13 −0 include/onnc/Runtime/operator/leakyrelu.h
  51. +15 −0 include/onnc/Runtime/operator/less.h
  52. +13 −0 include/onnc/Runtime/operator/log.h
  53. +13 −0 include/onnc/Runtime/operator/logsoftmax.h
  54. +19 −0 include/onnc/Runtime/operator/loop.h
  55. +15 −0 include/onnc/Runtime/operator/loopindextensor.h
  56. +14 −0 include/onnc/Runtime/operator/lpnormalization.h
  57. +20 −0 include/onnc/Runtime/operator/lppool.h
  58. +16 −0 include/onnc/Runtime/operator/lrn.h
  59. +40 −0 include/onnc/Runtime/operator/lstm.h
  60. +15 −0 include/onnc/Runtime/operator/matmul.h
  61. +14 −0 include/onnc/Runtime/operator/max.h
  62. +22 −0 include/onnc/Runtime/operator/maxpool.h
  63. +17 −0 include/onnc/Runtime/operator/maxroipool.h
  64. +14 −0 include/onnc/Runtime/operator/mean.h
  65. +14 −0 include/onnc/Runtime/operator/meanvariancenormalization.h
  66. +14 −0 include/onnc/Runtime/operator/min.h
  67. +15 −0 include/onnc/Runtime/operator/mul.h
  68. +15 −0 include/onnc/Runtime/operator/multinomial.h
  69. +13 −0 include/onnc/Runtime/operator/neg.h
  70. +13 −0 include/onnc/Runtime/operator/not.h
  71. +15 −0 include/onnc/Runtime/operator/or.h
  72. +16 −0 include/onnc/Runtime/operator/pad.h
  73. +14 −0 include/onnc/Runtime/operator/parametricsoftplus.h
  74. +15 −0 include/onnc/Runtime/operator/pow.h
  75. +15 −0 include/onnc/Runtime/operator/prelu.h
  76. +17 −0 include/onnc/Runtime/operator/randomnormal.h
  77. +16 −0 include/onnc/Runtime/operator/randomnormallike.h
  78. +17 −0 include/onnc/Runtime/operator/randomuniform.h
  79. +16 −0 include/onnc/Runtime/operator/randomuniformlike.h
  80. +13 −0 include/onnc/Runtime/operator/reciprocal.h
  81. +15 −0 include/onnc/Runtime/operator/reducel1.h
  82. +15 −0 include/onnc/Runtime/operator/reducel2.h
  83. +15 −0 include/onnc/Runtime/operator/reducelogsum.h
  84. +15 −0 include/onnc/Runtime/operator/reducelogsumexp.h
  85. +15 −0 include/onnc/Runtime/operator/reducemax.h
  86. +15 −0 include/onnc/Runtime/operator/reducemean.h
  87. +15 −0 include/onnc/Runtime/operator/reducemin.h
  88. +15 −0 include/onnc/Runtime/operator/reduceprod.h
  89. +15 −0 include/onnc/Runtime/operator/reducesum.h
  90. +15 −0 include/onnc/Runtime/operator/reducesumsquare.h
  91. +13 −0 include/onnc/Runtime/operator/relu.h
  92. +15 −0 include/onnc/Runtime/operator/reshape.h
  93. +33 −0 include/onnc/Runtime/operator/rnn.h
  94. +13 −0 include/onnc/Runtime/operator/scale.h
  95. +14 −0 include/onnc/Runtime/operator/scaledtanh.h
  96. +20 −0 include/onnc/Runtime/operator/scan.h
  97. +14 −0 include/onnc/Runtime/operator/selu.h
  98. +13 −0 include/onnc/Runtime/operator/shape.h
  99. +13 −0 include/onnc/Runtime/operator/sigmoid.h
  100. +13 −0 include/onnc/Runtime/operator/sin.h
  101. +13 −0 include/onnc/Runtime/operator/size.h
  102. +18 −0 include/onnc/Runtime/operator/slice.h
  103. +13 −0 include/onnc/Runtime/operator/softmax.h
  104. +13 −0 include/onnc/Runtime/operator/softplus.h
  105. +13 −0 include/onnc/Runtime/operator/softsign.h
  106. +13 −0 include/onnc/Runtime/operator/spacetodepth.h
  107. +16 −0 include/onnc/Runtime/operator/split.h
  108. +13 −0 include/onnc/Runtime/operator/sqrt.h
  109. +14 −0 include/onnc/Runtime/operator/squeeze.h
  110. +15 −0 include/onnc/Runtime/operator/sub.h
  111. +14 −0 include/onnc/Runtime/operator/sum.h
  112. +13 −0 include/onnc/Runtime/operator/tan.h
  113. +13 −0 include/onnc/Runtime/operator/tanh.h
  114. +13 −0 include/onnc/Runtime/operator/thresholdedrelu.h
  115. +15 −0 include/onnc/Runtime/operator/tile.h
  116. +16 −0 include/onnc/Runtime/operator/topk.h
  117. +14 −0 include/onnc/Runtime/operator/transpose.h
  118. +14 −0 include/onnc/Runtime/operator/unsqueeze.h
  119. +15 −0 include/onnc/Runtime/operator/upsample.h
  120. +15 −0 include/onnc/Runtime/operator/xor.h
  121. +1 −0 lib/CMakeLists.txt
  122. +117 −1 lib/Makefile.am
  123. +5 −0 lib/Runtime/CMakeLists.txt
  124. +49 −0 lib/Runtime/onnc-runtime.c
  125. +21 −0 lib/Runtime/operator/abs.c
  126. +21 −0 lib/Runtime/operator/acos.c
  127. +22 −0 lib/Runtime/operator/add.c
  128. +23 −0 lib/Runtime/operator/affine.c
  129. +22 −0 lib/Runtime/operator/and.c
  130. +58 −0 lib/Runtime/operator/argmax.c
  131. +59 −0 lib/Runtime/operator/argmin.c
  132. +21 −0 lib/Runtime/operator/asin.c
  133. +21 −0 lib/Runtime/operator/atan.c
  134. +16 −0 lib/Runtime/operator/aten.c
  135. +106 −0 lib/Runtime/operator/averagepool.c
  136. +53 −0 lib/Runtime/operator/batchnormalization.c
  137. +14 −0 lib/Runtime/operator/cast.c
  138. +22 −0 lib/Runtime/operator/ceil.c
  139. +26 −0 lib/Runtime/operator/clip.c
  140. +52 −0 lib/Runtime/operator/concat.c
  141. +22 −0 lib/Runtime/operator/constant.c
  142. +20 −0 lib/Runtime/operator/constantfill.c
  143. +186 −0 lib/Runtime/operator/conv.c
  144. +31 −0 lib/Runtime/operator/convtranspose.c
  145. +22 −0 lib/Runtime/operator/cos.c
  146. +17 −0 lib/Runtime/operator/crop.c
  147. +14 −0 lib/Runtime/operator/depthtospace.c
  148. +23 −0 lib/Runtime/operator/div.c
  149. +16 −0 lib/Runtime/operator/dropout.c
  150. +14 −0 lib/Runtime/operator/elu.c
  151. +23 −0 lib/Runtime/operator/equal.c
  152. +23 −0 lib/Runtime/operator/exp.c
  153. +16 −0 lib/Runtime/operator/expand.c
  154. +22 −0 lib/Runtime/operator/flatten.c
  155. +21 −0 lib/Runtime/operator/floor.c
  156. +16 −0 lib/Runtime/operator/gather.c
  157. +36 −0 lib/Runtime/operator/gemm.c
  158. +20 −0 lib/Runtime/operator/giventensorfill.c
  159. +56 −0 lib/Runtime/operator/globalaveragepool.c
  160. +30 −0 lib/Runtime/operator/globallppool.c
  161. +30 −0 lib/Runtime/operator/globalmaxpool.c
  162. +23 −0 lib/Runtime/operator/greater.c
  163. +35 −0 lib/Runtime/operator/gru.c
  164. +20 −0 lib/Runtime/operator/gruunit.c
  165. +40 −0 lib/Runtime/operator/hardmax.c
  166. +26 −0 lib/Runtime/operator/hardsigmoid.c
  167. +21 −0 lib/Runtime/operator/identity.c
  168. +16 −0 lib/Runtime/operator/if.c
  169. +34 −0 lib/Runtime/operator/imagescaler.c
  170. +89 −0 lib/Runtime/operator/instancenormalization.c
  171. +22 −0 lib/Runtime/operator/leakyrelu.c
  172. +23 −0 lib/Runtime/operator/less.c
  173. +22 −0 lib/Runtime/operator/log.c
  174. +39 −0 lib/Runtime/operator/logsoftmax.c
  175. +20 −0 lib/Runtime/operator/loop.c
  176. +91 −0 lib/Runtime/operator/lpnormalization.c
  177. +137 −0 lib/Runtime/operator/lppool.c
  178. +45 −0 lib/Runtime/operator/lrn.c
  179. +41 −0 lib/Runtime/operator/lstm.c
  180. +79 −0 lib/Runtime/operator/matmul.c
  181. +26 −0 lib/Runtime/operator/max.c
  182. +94 −0 lib/Runtime/operator/maxpool.c
  183. +18 −0 lib/Runtime/operator/maxroipool.c
  184. +27 −0 lib/Runtime/operator/mean.c
  185. +15 −0 lib/Runtime/operator/meanvariancenormalization.c
  186. +26 −0 lib/Runtime/operator/min.c
  187. +23 −0 lib/Runtime/operator/mul.c
  188. +46 −0 lib/Runtime/operator/multinomial.c
  189. +21 −0 lib/Runtime/operator/neg.c
  190. +21 −0 lib/Runtime/operator/not.c
  191. +27 −0 lib/Runtime/operator/or.c
  192. +231 −0 lib/Runtime/operator/pad.c
  193. +27 −0 lib/Runtime/operator/parametricsoftplus.c
  194. +25 −0 lib/Runtime/operator/pow.c
  195. +24 −0 lib/Runtime/operator/prelu.c
  196. +38 −0 lib/Runtime/operator/randomnormal.c
  197. +35 −0 lib/Runtime/operator/randomnormallike.c
  198. +28 −0 lib/Runtime/operator/randomuniform.c
  199. +27 −0 lib/Runtime/operator/randomuniformlike.c
  200. +22 −0 lib/Runtime/operator/reciprocal.c
  201. +103 −0 lib/Runtime/operator/reducel1.c
  202. +103 −0 lib/Runtime/operator/reducel2.c
  203. +103 −0 lib/Runtime/operator/reducelogsum.c
  204. +103 −0 lib/Runtime/operator/reducelogsumexp.c
  205. +127 −0 lib/Runtime/operator/reducemax.c
  206. +106 −0 lib/Runtime/operator/reducemean.c
  207. +126 −0 lib/Runtime/operator/reducemin.c
  208. +102 −0 lib/Runtime/operator/reduceprod.c
  209. +119 −0 lib/Runtime/operator/reducesum.c
  210. +102 −0 lib/Runtime/operator/reducesumsquare.c
  211. +24 −0 lib/Runtime/operator/relu.c
  212. +24 −0 lib/Runtime/operator/reshape.c
  213. +34 −0 lib/Runtime/operator/rnn.c
  214. +23 −0 lib/Runtime/operator/scale.c
  215. +25 −0 lib/Runtime/operator/scaledtanh.c
  216. +21 −0 lib/Runtime/operator/scan.c
  217. +25 −0 lib/Runtime/operator/selu.c
  218. +17 −0 lib/Runtime/operator/shape.c
  219. +24 −0 lib/Runtime/operator/sigmoid.c
  220. +22 −0 lib/Runtime/operator/sin.c
  221. +19 −0 lib/Runtime/operator/size.c
  222. +95 −0 lib/Runtime/operator/slice.c
  223. +38 −0 lib/Runtime/operator/softmax.c
  224. +14 −0 lib/Runtime/operator/softplus.c
  225. +23 −0 lib/Runtime/operator/softsign.c
  226. +45 −0 lib/Runtime/operator/spacetodepth.c
  227. +85 −0 lib/Runtime/operator/split.c
  228. +22 −0 lib/Runtime/operator/sqrt.c
  229. +25 −0 lib/Runtime/operator/squeeze.c
  230. +23 −0 lib/Runtime/operator/sub.c
  231. +28 −0 lib/Runtime/operator/sum.c
  232. +22 −0 lib/Runtime/operator/tan.c
  233. +23 −0 lib/Runtime/operator/tanh.c
  234. +22 −0 lib/Runtime/operator/thresholdedrelu.c
  235. +69 −0 lib/Runtime/operator/tile.c
  236. +184 −0 lib/Runtime/operator/topk.c
  237. +107 −0 lib/Runtime/operator/transpose.c
  238. +22 −0 lib/Runtime/operator/unsqueeze.c
  239. +83 −0 lib/Runtime/operator/upsample.c
  240. +27 −0 lib/Runtime/operator/xor.c
  241. +1 −0 scripts/runtime/.gitignore
  242. +24 −0 scripts/runtime/Interpreter.template.cpp
  243. +16 −0 scripts/runtime/Interpreter.visitor.template.cpp
  244. +388 −0 scripts/runtime/code_generator.py
  245. +48 −0 scripts/runtime/onnc-runtime.template.h
  246. +12 −0 scripts/runtime/operator.template.c
  247. +11 −0 scripts/runtime/operator.template.h
  248. +1 −0 tools/CMakeLists.txt
  249. +1 −1 tools/Makefile.am
  250. +8 −0 tools/onni/CMakeLists.txt
  251. +4,244 −0 tools/onni/Interpreter.cpp
  252. +149 −0 tools/onni/Interpreter.h
  253. +31 −0 tools/onni/Makefile.am
  254. +165 −0 tools/onni/ONNIApp.cpp
  255. +30 −0 tools/onni/ONNIApp.h
  256. +28 −0 tools/onni/ONNIConfig.cpp
  257. +76 −0 tools/onni/ONNIConfig.h
  258. +142 −0 tools/onni/main.cpp
  259. +83 −0 tools/onni/onnc-runtime.h
  260. +3 −0 tools/unittests/CMakeLists.txt
  261. +8 −0 tools/unittests/Runtime/CMakeLists.txt
  262. +38 −0 tools/unittests/Runtime/OperatorAbsTest.cpp
@@ -99,5 +99,6 @@ AC_CONFIG_FILES([tools/unittests/Makefile])
AC_CONFIG_FILES([tools/onnc/Makefile])
AC_CONFIG_FILES([tools/readonnx/Makefile])
AC_CONFIG_FILES([tools/onnc-jit/Makefile])
AC_CONFIG_FILES([tools/onni/Makefile])

AC_OUTPUT
@@ -0,0 +1,22 @@
#pragma once

#include "onnc-runtime.h"

#include <stddef.h>

typedef struct ONNC_RUNTIME_Context {
void *input_context;
void *weight_context;
void *output_context;
void **mem; /* Deprecated */
size_t mem_i; /* Deprecated */
} Context;


//void *ONNC_RUNTIME_internal_allocate_memory(void *onnc_runtime_context, size_t num, size_t size);

//void *ONNC_RUNTIME_initial_temporary_tensor_memory(void *onnc_runtime_context);

typedef struct ONNC_RUNTIME_Tensor_offset TensorOffset;
typedef struct ONNC_RUNTIME_Tensor_offset_table TensorOffsetTable;

@@ -0,0 +1,163 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

struct ONNC_RUNTIME_Tensor_offset {
uint64_t offset; /* Tensor offset */
uint64_t size; /* Size of tensor in bytes */
};

#define ONNC_RUNTIME_TENSOR_FILE_MAGIC ".TSR"

struct ONNC_RUNTIME_Tensor_offset_table {
uint8_t magic[8]; /* Tensor File magic number. */
uint64_t number_of_tensors;
struct ONNC_RUNTIME_Tensor_offset tensor_offsets[];
};

/**
* ONNC generated entry point.
* @param context The ONNC Runtime Context.
*/
void model_main(void *context);

/**
* Initialize runtime.
* @deprecated
* @return The ONNC Runtime Context, should be passed to every ONNC Runtime functions.
*/
void *ONNC_RUNTIME_init_runtime();

/**
* Shutdown runtime.
* @deprecated
* @param onnc_runtime_context The ONNC Runtime Context.
* @return True if shutdown successfully. False if something wrong.
*/
bool ONNC_RUNTIME_shutdown_runtime(void *onnc_runtime_context);

/**
* Get tensor address from tensor table.
* @param tensor_table The tensor table start address.
* @param index Tensor index.
* @return The memory address of the TensorTable[index].
*/
void *ONNC_RUNTIME_load_from_tensor_table(void *tensor_table, uint32_t index);

#include "operator/abs.h"
#include "operator/acos.h"
#include "operator/add.h"
#include "operator/and.h"
#include "operator/argmax.h"
#include "operator/argmin.h"
#include "operator/asin.h"
#include "operator/atan.h"
#include "operator/averagepool.h"
#include "operator/batchnormalization.h"
#include "operator/cast.h"
#include "operator/ceil.h"
#include "operator/clip.h"
#include "operator/concat.h"
#include "operator/constant.h"
#include "operator/conv.h"
#include "operator/convtranspose.h"
#include "operator/cos.h"
#include "operator/depthtospace.h"
#include "operator/div.h"
#include "operator/dropout.h"
#include "operator/elu.h"
#include "operator/equal.h"
#include "operator/exp.h"
#include "operator/expand.h"
#include "operator/flatten.h"
#include "operator/floor.h"
#include "operator/gru.h"
#include "operator/gather.h"
#include "operator/gemm.h"
#include "operator/globalaveragepool.h"
#include "operator/globallppool.h"
#include "operator/globalmaxpool.h"
#include "operator/greater.h"
#include "operator/hardsigmoid.h"
#include "operator/hardmax.h"
#include "operator/identity.h"
#include "operator/if.h"
#include "operator/instancenormalization.h"
#include "operator/lrn.h"
#include "operator/lstm.h"
#include "operator/leakyrelu.h"
#include "operator/less.h"
#include "operator/log.h"
#include "operator/logsoftmax.h"
#include "operator/loop.h"
#include "operator/lpnormalization.h"
#include "operator/lppool.h"
#include "operator/matmul.h"
#include "operator/max.h"
#include "operator/maxpool.h"
#include "operator/maxroipool.h"
#include "operator/mean.h"
#include "operator/min.h"
#include "operator/mul.h"
#include "operator/multinomial.h"
#include "operator/neg.h"
#include "operator/not.h"
#include "operator/or.h"
#include "operator/prelu.h"
#include "operator/pad.h"
#include "operator/pow.h"
#include "operator/rnn.h"
#include "operator/randomnormal.h"
#include "operator/randomnormallike.h"
#include "operator/randomuniform.h"
#include "operator/randomuniformlike.h"
#include "operator/reciprocal.h"
#include "operator/reducel1.h"
#include "operator/reducel2.h"
#include "operator/reducelogsum.h"
#include "operator/reducelogsumexp.h"
#include "operator/reducemax.h"
#include "operator/reducemean.h"
#include "operator/reducemin.h"
#include "operator/reduceprod.h"
#include "operator/reducesum.h"
#include "operator/reducesumsquare.h"
#include "operator/relu.h"
#include "operator/reshape.h"
#include "operator/scan.h"
#include "operator/selu.h"
#include "operator/shape.h"
#include "operator/sigmoid.h"
#include "operator/sin.h"
#include "operator/size.h"
#include "operator/slice.h"
#include "operator/softmax.h"
#include "operator/softplus.h"
#include "operator/softsign.h"
#include "operator/spacetodepth.h"
#include "operator/split.h"
#include "operator/sqrt.h"
#include "operator/squeeze.h"
#include "operator/sub.h"
#include "operator/sum.h"
#include "operator/tan.h"
#include "operator/tanh.h"
#include "operator/tile.h"
#include "operator/topk.h"
#include "operator/transpose.h"
#include "operator/unsqueeze.h"
#include "operator/upsample.h"
#include "operator/xor.h"
#include "operator/aten.h"
#include "operator/affine.h"
#include "operator/constantfill.h"
#include "operator/crop.h"
#include "operator/gruunit.h"
#include "operator/giventensorfill.h"
#include "operator/imagescaler.h"
#include "operator/meanvariancenormalization.h"
#include "operator/parametricsoftplus.h"
#include "operator/scale.h"
#include "operator/scaledtanh.h"
#include "operator/thresholdedrelu.h"
@@ -0,0 +1,13 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

void ONNC_RUNTIME_abs_float(
void * restrict onnc_runtime_context
,const float * restrict input_X
,int32_t input_X_ndim, const int32_t * restrict input_X_dims
,float * restrict output_Y
,int32_t output_Y_ndim, const int32_t * restrict output_Y_dims

);
@@ -0,0 +1,13 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

void ONNC_RUNTIME_acos_float(
void * restrict onnc_runtime_context
,const float * restrict input_input
,int32_t input_input_ndim, const int32_t * restrict input_input_dims
,float * restrict output_output
,int32_t output_output_ndim, const int32_t * restrict output_output_dims

);
@@ -0,0 +1,15 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

void ONNC_RUNTIME_add_float(
void * restrict onnc_runtime_context
,const float * restrict input_A
,int32_t input_A_ndim, const int32_t * restrict input_A_dims
,const float * restrict input_B
,int32_t input_B_ndim, const int32_t * restrict input_B_dims
,float * restrict output_C
,int32_t output_C_ndim, const int32_t * restrict output_C_dims

);
@@ -0,0 +1,14 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

void ONNC_RUNTIME_affine_float(
void * restrict onnc_runtime_context
,const float * restrict input_X
,int32_t input_X_ndim, const int32_t * restrict input_X_dims
,float * restrict output_Y
,int32_t output_Y_ndim, const int32_t * restrict output_Y_dims
,float alpha
,float beta
);
@@ -0,0 +1,15 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

void ONNC_RUNTIME_and_float(
void * restrict onnc_runtime_context
,const float * restrict input_A
,int32_t input_A_ndim, const int32_t * restrict input_A_dims
,const float * restrict input_B
,int32_t input_B_ndim, const int32_t * restrict input_B_dims
,float * restrict output_C
,int32_t output_C_ndim, const int32_t * restrict output_C_dims

);
@@ -0,0 +1,14 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

void ONNC_RUNTIME_argmax_float(
void * restrict onnc_runtime_context
,const float * restrict input_data
,int32_t input_data_ndim, const int32_t * restrict input_data_dims
,float * restrict output_reduced
,int32_t output_reduced_ndim, const int32_t * restrict output_reduced_dims
,int32_t axis
,int32_t keepdims
);
@@ -0,0 +1,14 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

void ONNC_RUNTIME_argmin_float(
void * restrict onnc_runtime_context
,const float * restrict input_data
,int32_t input_data_ndim, const int32_t * restrict input_data_dims
,float * restrict output_reduced
,int32_t output_reduced_ndim, const int32_t * restrict output_reduced_dims
,int32_t axis
,int32_t keepdims
);
@@ -0,0 +1,13 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

void ONNC_RUNTIME_asin_float(
void * restrict onnc_runtime_context
,const float * restrict input_input
,int32_t input_input_ndim, const int32_t * restrict input_input_dims
,float * restrict output_output
,int32_t output_output_ndim, const int32_t * restrict output_output_dims

);
@@ -0,0 +1,13 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

void ONNC_RUNTIME_atan_float(
void * restrict onnc_runtime_context
,const float * restrict input_input
,int32_t input_input_ndim, const int32_t * restrict input_input_dims
,float * restrict output_output
,int32_t output_output_ndim, const int32_t * restrict output_output_dims

);
@@ -0,0 +1,15 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

void ONNC_RUNTIME_aten_float(
void * restrict onnc_runtime_context
,const float * const * restrict input_input
,int32_t input_input_ntensor
,const int32_t * input_input_ndim, const int32_t * const * restrict input_input_dims
,float * const * restrict output_output
,int32_t output_output_ntensor
,const int32_t * output_output_ndim, const int32_t * const * restrict output_output_dims

);
@@ -0,0 +1,20 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

void ONNC_RUNTIME_averagepool_float(
void * restrict onnc_runtime_context
,const float * restrict input_X
,int32_t input_X_ndim, const int32_t * restrict input_X_dims
,float * restrict output_Y
,int32_t output_Y_ndim, const int32_t * restrict output_Y_dims
,const char * restrict auto_pad
,int32_t count_include_pad
,int32_t * restrict kernel_shape
,int32_t number_of_kernel_shape
,int32_t * restrict pads
,int32_t number_of_pads
,int32_t * restrict strides
,int32_t number_of_strides
);
@@ -0,0 +1,31 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

void ONNC_RUNTIME_batchnormalization_float(
void * restrict onnc_runtime_context
,const float * restrict input_X
,int32_t input_X_ndim, const int32_t * restrict input_X_dims
,const float * restrict input_scale
,int32_t input_scale_ndim, const int32_t * restrict input_scale_dims
,const float * restrict input_B
,int32_t input_B_ndim, const int32_t * restrict input_B_dims
,const float * restrict input_mean
,int32_t input_mean_ndim, const int32_t * restrict input_mean_dims
,const float * restrict input_var
,int32_t input_var_ndim, const int32_t * restrict input_var_dims
,float * restrict output_Y
,int32_t output_Y_ndim, const int32_t * restrict output_Y_dims
,float * restrict output_mean
,int32_t output_mean_ndim, const int32_t * restrict output_mean_dims
,float * restrict output_var
,int32_t output_var_ndim, const int32_t * restrict output_var_dims
,float * restrict output_saved_mean
,int32_t output_saved_mean_ndim, const int32_t * restrict output_saved_mean_dims
,float * restrict output_saved_var
,int32_t output_saved_var_ndim, const int32_t * restrict output_saved_var_dims
,float epsilon
,float momentum
,int32_t spatial
);
Oops, something went wrong.

0 comments on commit cdac8d7

Please sign in to comment.