PandA-2024.02
examples
onnx
05_dense_b
05_dense_b.cc
Go to the documentation of this file.
1
#include "tvm/runtime/c_runtime_api.h"
2
#include "tvm/runtime/c_backend_api.h"
3
extern
void
*
__tvm_module_ctx
=
NULL
;
4
#ifdef __cplusplus
5
extern
"C"
6
#endif
7
TVM_DLL
int32_t
fused_nn_dense_add
(
void
*
args
,
void
* arg_type_ids, int32_t num_args) {
8
9
void
* arg0 = (((
TVMValue
*)args)[0].v_handle);
10
float
* placeholder = (
float
*)(((
TVMArray
*)arg0)[0].data);
11
12
void
* arg1 = (((
TVMValue
*)args)[1].v_handle);
13
float
* placeholder1 = (
float
*)(((
TVMArray
*)arg1)[0].data);
14
15
void
* arg2 = (((
TVMValue
*)args)[2].v_handle);
16
float
* placeholder2 = (
float
*)(((
TVMArray
*)arg2)[0].data);
17
18
void
* arg3 = (((
TVMValue
*)args)[3].v_handle);
19
float
* T_add = (
float
*)(((
TVMArray
*)arg3)[0].data);
20
21
float
compute
[64];
22
for
(int32_t y_outer_x_outer_fused = 0; y_outer_x_outer_fused < 64; ++y_outer_x_outer_fused) {
23
float
compute1[1];
24
compute1[0] = 0.000000e+00f;
25
compute1[0] = (compute1[0] + (placeholder[0] * placeholder1[y_outer_x_outer_fused]));
26
compute[y_outer_x_outer_fused] = 0.000000e+00f;
27
compute[y_outer_x_outer_fused] = (compute[y_outer_x_outer_fused] + compute1[0]);
28
}
29
for
(int32_t ax1 = 0; ax1 < 64; ++ax1) {
30
T_add[ax1] = (compute[ax1] + placeholder2[ax1]);
31
}
32
return
0;
33
}
34
NULL
#define NULL
Definition:
bsearch-specialized.c:20
compute
int compute(int a, int b, int c, int d, int e, int f, int g, int expected)
Definition:
main.c:10
__tvm_module_ctx
void * __tvm_module_ctx
TVMValue
Union type of values being passed through API and function calls.
Definition:
c_runtime_api.h:151
test_panda.args
args
Definition:
test_panda.py:468
TVM_DLL
#define TVM_DLL
Definition:
c_runtime_api.h:59
fused_nn_dense_add
TVM_DLL int32_t fused_nn_dense_add(void *args, void *arg_type_ids, int32_t num_args)
Definition:
05_dense_b.cc:7
DLTensor
Plain C Tensor object, does not manage memory.
Definition:
dlpack.h:111
Generated on Mon Feb 12 2024 13:02:50 for PandA-2024.02 by
1.8.13