1 #include "FullyConnectedBench.h"
2 #include "Error.h"
3 #include "arm_nnfunctions.h"
4 
test_fully_connected_tflite_s8()5     void FullyConnectedBench::test_fully_connected_tflite_s8()
6     {
7 
8       for(int i=0; i < this->repeatNb; i++)
9        {
10           arm_fully_connected_s8((int8_t*)this->inp
11             ,(const int8_t*)this->weightp
12             ,colDim
13             ,rowDim
14             ,nb_batches
15             ,input_offset
16             ,filter_offset
17             ,output_mult
18             ,output_shift
19             ,output_offset
20             ,(const int32_t*)this->biasp
21             ,(int8_t*)this->outp
22             ,act_min
23             ,act_max
24             ,this->tempp
25             );
26        }
27 
28     }
29 
30 
setUp(Testing::testID_t,std::vector<Testing::param_t> & params,Client::PatternMgr * mgr)31     void FullyConnectedBench::setUp(Testing::testID_t,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
32     {
33 
34 
35        std::vector<Testing::param_t>::iterator it = params.begin();
36        this->repeatNb = *it;
37 
38 
39         output_mult = 1077969154;
40         output_shift = 2;
41         filter_offset = 0;
42         input_offset = 0;
43         output_offset = 1;
44         act_min =-128;
45         act_max= 127;
46 
47 
48         nb_batches=8;
49 
50         colDim=8;
51         rowDim=5;
52 
53         input.reload(FullyConnectedBench::INPUT13_S8_ID,mgr);
54         bias.reload(FullyConnectedBench::BIAS13_S8_ID,mgr);
55         weight.reload(FullyConnectedBench::WEIGHT13_S8_ID,mgr);
56 
57         //ref.reload(FullyConnectedBench::REF13_S8_ID,mgr);
58 
59         output.create(ref.nbSamples(),FullyConnectedBench::OUTPUT_S8_ID,mgr);
60         temp.create(colDim,FullyConnectedBench::TEMP_S16_ID,mgr);
61 
62         this->inp=input.ptr();
63         this->biasp=bias.ptr();
64         this->weightp=weight.ptr();
65         this->outp=output.ptr();
66         //this->refp=ref.ptr();
67         this->tempp=temp.ptr();
68     }
69 
tearDown(Testing::testID_t id,Client::PatternMgr * mgr)70     void FullyConnectedBench::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
71     {
72 
73     }
74