CMSIS-NN: Added reference C code for arm_avgpool_s8.c and tests
Tests are integrated in CMSIS-DSP test framework. Reference code is based upon CMSIS-NN original average pooling and it is not based upon TF Lite.pull/19/head
parent
7a07cecef1
commit
bfee0b9c02
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@
|
||||
void test_avgpool_s8();
|
||||
|
||||
// Pattern IDs
|
||||
static const int INPUT1_S8_ID=0;
|
||||
static const int REF1_S8_ID=1;
|
||||
static const int INPUT2_S8_ID=2;
|
||||
static const int REF2_S8_ID=3;
|
||||
static const int INPUT3_S8_ID=4;
|
||||
static const int REF3_S8_ID=5;
|
||||
static const int INPUT4_S8_ID=6;
|
||||
static const int REF4_S8_ID=7;
|
||||
static const int INPUT5_S8_ID=8;
|
||||
static const int REF5_S8_ID=9;
|
||||
static const int INPUT6_S8_ID=10;
|
||||
static const int REF6_S8_ID=11;
|
||||
static const int INPUT7_S8_ID=12;
|
||||
static const int REF7_S8_ID=13;
|
||||
static const int INPUT8_S8_ID=14;
|
||||
static const int REF8_S8_ID=15;
|
||||
|
||||
// Output IDs
|
||||
static const int OUTPUT_S8_ID=0;
|
||||
|
||||
// Test IDs
|
||||
static const int TEST_AVGPOOL_S8_1=1;
|
||||
static const int TEST_AVGPOOL_S8_2=2;
|
||||
static const int TEST_AVGPOOL_S8_3=3;
|
||||
static const int TEST_AVGPOOL_S8_4=4;
|
||||
static const int TEST_AVGPOOL_S8_5=5;
|
||||
static const int TEST_AVGPOOL_S8_6=6;
|
||||
static const int TEST_AVGPOOL_S8_7=7;
|
||||
static const int TEST_AVGPOOL_S8_8=8;
|
||||
@ -1,219 +1,31 @@
|
||||
#include "Test.h"
|
||||
#include "Pattern.h"
|
||||
#include "StatsTestsF32.h"
|
||||
#include "SupportTestsF32.h"
|
||||
#include "BasicTestsF32.h"
|
||||
#include "SVMF32.h"
|
||||
#include "BayesF32.h"
|
||||
#include "DistanceTestsF32.h"
|
||||
#include "DistanceTestsU32.h"
|
||||
#include "BasicMathsBenchmarksF32.h"
|
||||
#include "BasicMathsBenchmarksQ31.h"
|
||||
#include "BasicMathsBenchmarksQ15.h"
|
||||
#include "BasicMathsBenchmarksQ7.h"
|
||||
#include "FullyConnected.h"
|
||||
#include "FullyConnectedBench.h"
|
||||
class StatsTests : public Client::Group
|
||||
{
|
||||
public:
|
||||
StatsTests(Testing::testID_t id):Client::Group(id)
|
||||
,StatsTestsF32Var(1)
|
||||
|
||||
{
|
||||
this->addContainer(&StatsTestsF32Var);
|
||||
|
||||
}
|
||||
private:
|
||||
StatsTestsF32 StatsTestsF32Var;
|
||||
;
|
||||
};
|
||||
class SupportTests : public Client::Group
|
||||
{
|
||||
public:
|
||||
SupportTests(Testing::testID_t id):Client::Group(id)
|
||||
,SupportTestsF32Var(1)
|
||||
|
||||
{
|
||||
this->addContainer(&SupportTestsF32Var);
|
||||
|
||||
}
|
||||
private:
|
||||
SupportTestsF32 SupportTestsF32Var;
|
||||
;
|
||||
};
|
||||
class BasicTests : public Client::Group
|
||||
{
|
||||
public:
|
||||
BasicTests(Testing::testID_t id):Client::Group(id)
|
||||
,BasicTestsF32Var(1)
|
||||
|
||||
{
|
||||
this->addContainer(&BasicTestsF32Var);
|
||||
|
||||
}
|
||||
private:
|
||||
BasicTestsF32 BasicTestsF32Var;
|
||||
;
|
||||
};
|
||||
class SVMTests : public Client::Group
|
||||
{
|
||||
public:
|
||||
SVMTests(Testing::testID_t id):Client::Group(id)
|
||||
,SVMF32Var(1)
|
||||
|
||||
{
|
||||
this->addContainer(&SVMF32Var);
|
||||
|
||||
}
|
||||
private:
|
||||
SVMF32 SVMF32Var;
|
||||
;
|
||||
};
|
||||
class BayesTests : public Client::Group
|
||||
{
|
||||
public:
|
||||
BayesTests(Testing::testID_t id):Client::Group(id)
|
||||
,BayesF32Var(1)
|
||||
|
||||
{
|
||||
this->addContainer(&BayesF32Var);
|
||||
|
||||
}
|
||||
private:
|
||||
BayesF32 BayesF32Var;
|
||||
;
|
||||
};
|
||||
class DistanceTests : public Client::Group
|
||||
{
|
||||
public:
|
||||
DistanceTests(Testing::testID_t id):Client::Group(id)
|
||||
,DistanceTestsF32Var(1)
|
||||
,DistanceTestsU32Var(2)
|
||||
|
||||
{
|
||||
this->addContainer(&DistanceTestsF32Var);
|
||||
this->addContainer(&DistanceTestsU32Var);
|
||||
|
||||
}
|
||||
private:
|
||||
DistanceTestsF32 DistanceTestsF32Var;
|
||||
DistanceTestsU32 DistanceTestsU32Var;
|
||||
;
|
||||
};
|
||||
class DSPTests : public Client::Group
|
||||
{
|
||||
public:
|
||||
DSPTests(Testing::testID_t id):Client::Group(id)
|
||||
,StatsTestsVar(1)
|
||||
,SupportTestsVar(2)
|
||||
,BasicTestsVar(3)
|
||||
,SVMTestsVar(4)
|
||||
,BayesTestsVar(5)
|
||||
,DistanceTestsVar(6)
|
||||
|
||||
{
|
||||
this->addContainer(&StatsTestsVar);
|
||||
this->addContainer(&SupportTestsVar);
|
||||
this->addContainer(&BasicTestsVar);
|
||||
this->addContainer(&SVMTestsVar);
|
||||
this->addContainer(&BayesTestsVar);
|
||||
this->addContainer(&DistanceTestsVar);
|
||||
|
||||
}
|
||||
private:
|
||||
StatsTests StatsTestsVar;
|
||||
SupportTests SupportTestsVar;
|
||||
BasicTests BasicTestsVar;
|
||||
SVMTests SVMTestsVar;
|
||||
BayesTests BayesTestsVar;
|
||||
DistanceTests DistanceTestsVar;
|
||||
;
|
||||
};
|
||||
class BasicBenchmarks : public Client::Group
|
||||
{
|
||||
public:
|
||||
BasicBenchmarks(Testing::testID_t id):Client::Group(id)
|
||||
,BasicMathsBenchmarksF32Var(1)
|
||||
,BasicMathsBenchmarksQ31Var(2)
|
||||
,BasicMathsBenchmarksQ15Var(3)
|
||||
,BasicMathsBenchmarksQ7Var(4)
|
||||
|
||||
{
|
||||
this->addContainer(&BasicMathsBenchmarksF32Var);
|
||||
this->addContainer(&BasicMathsBenchmarksQ31Var);
|
||||
this->addContainer(&BasicMathsBenchmarksQ15Var);
|
||||
this->addContainer(&BasicMathsBenchmarksQ7Var);
|
||||
|
||||
}
|
||||
private:
|
||||
BasicMathsBenchmarksF32 BasicMathsBenchmarksF32Var;
|
||||
BasicMathsBenchmarksQ31 BasicMathsBenchmarksQ31Var;
|
||||
BasicMathsBenchmarksQ15 BasicMathsBenchmarksQ15Var;
|
||||
BasicMathsBenchmarksQ7 BasicMathsBenchmarksQ7Var;
|
||||
;
|
||||
};
|
||||
class DSPBenchmarks : public Client::Group
|
||||
{
|
||||
public:
|
||||
DSPBenchmarks(Testing::testID_t id):Client::Group(id)
|
||||
,BasicBenchmarksVar(1)
|
||||
|
||||
{
|
||||
this->addContainer(&BasicBenchmarksVar);
|
||||
|
||||
}
|
||||
private:
|
||||
BasicBenchmarks BasicBenchmarksVar;
|
||||
;
|
||||
};
|
||||
#include "Pooling.h"
|
||||
class NNTests : public Client::Group
|
||||
{
|
||||
public:
|
||||
NNTests(Testing::testID_t id):Client::Group(id)
|
||||
,FullyConnectedVar(1)
|
||||
,PoolingVar(2)
|
||||
|
||||
{
|
||||
this->addContainer(&FullyConnectedVar);
|
||||
this->addContainer(NULL);this->addContainer(&PoolingVar);
|
||||
|
||||
}
|
||||
private:
|
||||
FullyConnected FullyConnectedVar;
|
||||
;
|
||||
};
|
||||
class NNBenchmarks : public Client::Group
|
||||
{
|
||||
public:
|
||||
NNBenchmarks(Testing::testID_t id):Client::Group(id)
|
||||
,FullyConnectedBenchVar(1)
|
||||
|
||||
{
|
||||
this->addContainer(&FullyConnectedBenchVar);
|
||||
|
||||
}
|
||||
private:
|
||||
FullyConnectedBench FullyConnectedBenchVar;
|
||||
Pooling PoolingVar;
|
||||
;
|
||||
};
|
||||
class Root : public Client::Group
|
||||
{
|
||||
public:
|
||||
Root(Testing::testID_t id):Client::Group(id)
|
||||
,DSPTestsVar(1)
|
||||
,DSPBenchmarksVar(2)
|
||||
,NNTestsVar(3)
|
||||
,NNBenchmarksVar(4)
|
||||
,NNTestsVar(3)
|
||||
|
||||
{
|
||||
this->addContainer(&DSPTestsVar);
|
||||
this->addContainer(&DSPBenchmarksVar);
|
||||
this->addContainer(&NNTestsVar);
|
||||
this->addContainer(&NNBenchmarksVar);
|
||||
|
||||
this->addContainer(NULL);this->addContainer(NULL);this->addContainer(&NNTestsVar);
|
||||
this->addContainer(NULL);
|
||||
}
|
||||
private:
|
||||
DSPTests DSPTestsVar;
|
||||
DSPBenchmarks DSPBenchmarksVar;
|
||||
NNTests NNTestsVar;
|
||||
NNBenchmarks NNBenchmarksVar;
|
||||
NNTests NNTestsVar;
|
||||
;
|
||||
};
|
||||
|
||||
@ -1,181 +1,15 @@
|
||||
#include "Test.h"
|
||||
|
||||
#include "StatsTestsF32.h"
|
||||
StatsTestsF32::StatsTestsF32(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&StatsTestsF32::test_entropy_f32);
|
||||
this->addTest(2,(Client::test)&StatsTestsF32::test_logsumexp_f32);
|
||||
this->addTest(3,(Client::test)&StatsTestsF32::test_kullback_leibler_f32);
|
||||
this->addTest(4,(Client::test)&StatsTestsF32::test_logsumexp_dot_prod_f32);
|
||||
|
||||
}
|
||||
|
||||
#include "SupportTestsF32.h"
|
||||
SupportTestsF32::SupportTestsF32(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&SupportTestsF32::test_barycenter_f32);
|
||||
this->addTest(2,(Client::test)&SupportTestsF32::test_weighted_sum_f32);
|
||||
|
||||
}
|
||||
|
||||
#include "BasicTestsF32.h"
|
||||
BasicTestsF32::BasicTestsF32(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&BasicTestsF32::test_add_f32);
|
||||
this->addTest(2,(Client::test)&BasicTestsF32::test_add_f32);
|
||||
this->addTest(3,(Client::test)&BasicTestsF32::test_add_f32);
|
||||
this->addTest(4,(Client::test)&BasicTestsF32::test_sub_f32);
|
||||
this->addTest(5,(Client::test)&BasicTestsF32::test_sub_f32);
|
||||
this->addTest(6,(Client::test)&BasicTestsF32::test_sub_f32);
|
||||
this->addTest(7,(Client::test)&BasicTestsF32::test_mult_f32);
|
||||
this->addTest(8,(Client::test)&BasicTestsF32::test_mult_f32);
|
||||
this->addTest(9,(Client::test)&BasicTestsF32::test_mult_f32);
|
||||
this->addTest(10,(Client::test)&BasicTestsF32::test_negate_f32);
|
||||
this->addTest(11,(Client::test)&BasicTestsF32::test_negate_f32);
|
||||
this->addTest(12,(Client::test)&BasicTestsF32::test_negate_f32);
|
||||
this->addTest(13,(Client::test)&BasicTestsF32::test_offset_f32);
|
||||
this->addTest(14,(Client::test)&BasicTestsF32::test_offset_f32);
|
||||
this->addTest(15,(Client::test)&BasicTestsF32::test_offset_f32);
|
||||
this->addTest(16,(Client::test)&BasicTestsF32::test_scale_f32);
|
||||
this->addTest(17,(Client::test)&BasicTestsF32::test_scale_f32);
|
||||
this->addTest(18,(Client::test)&BasicTestsF32::test_scale_f32);
|
||||
this->addTest(19,(Client::test)&BasicTestsF32::test_dot_prod_f32);
|
||||
this->addTest(20,(Client::test)&BasicTestsF32::test_dot_prod_f32);
|
||||
this->addTest(21,(Client::test)&BasicTestsF32::test_dot_prod_f32);
|
||||
this->addTest(22,(Client::test)&BasicTestsF32::test_abs_f32);
|
||||
this->addTest(23,(Client::test)&BasicTestsF32::test_abs_f32);
|
||||
this->addTest(24,(Client::test)&BasicTestsF32::test_abs_f32);
|
||||
|
||||
}
|
||||
|
||||
#include "SVMF32.h"
|
||||
SVMF32::SVMF32(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&SVMF32::test_svm_linear_predict_f32);
|
||||
this->addTest(2,(Client::test)&SVMF32::test_svm_polynomial_predict_f32);
|
||||
this->addTest(3,(Client::test)&SVMF32::test_svm_rbf_predict_f32);
|
||||
this->addTest(4,(Client::test)&SVMF32::test_svm_sigmoid_predict_f32);
|
||||
this->addTest(5,(Client::test)&SVMF32::test_svm_rbf_predict_f32);
|
||||
|
||||
}
|
||||
|
||||
#include "BayesF32.h"
|
||||
BayesF32::BayesF32(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&BayesF32::test_gaussian_naive_bayes_predict_f32);
|
||||
|
||||
}
|
||||
|
||||
#include "DistanceTestsF32.h"
|
||||
DistanceTestsF32::DistanceTestsF32(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&DistanceTestsF32::test_braycurtis_distance_f32);
|
||||
this->addTest(2,(Client::test)&DistanceTestsF32::test_canberra_distance_f32);
|
||||
this->addTest(3,(Client::test)&DistanceTestsF32::test_chebyshev_distance_f32);
|
||||
this->addTest(4,(Client::test)&DistanceTestsF32::test_cityblock_distance_f32);
|
||||
this->addTest(5,(Client::test)&DistanceTestsF32::test_correlation_distance_f32);
|
||||
this->addTest(6,(Client::test)&DistanceTestsF32::test_cosine_distance_f32);
|
||||
this->addTest(7,(Client::test)&DistanceTestsF32::test_euclidean_distance_f32);
|
||||
this->addTest(8,(Client::test)&DistanceTestsF32::test_jensenshannon_distance_f32);
|
||||
this->addTest(9,(Client::test)&DistanceTestsF32::test_minkowski_distance_f32);
|
||||
|
||||
}
|
||||
|
||||
#include "DistanceTestsU32.h"
|
||||
DistanceTestsU32::DistanceTestsU32(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&DistanceTestsU32::test_dice_distance);
|
||||
this->addTest(2,(Client::test)&DistanceTestsU32::test_hamming_distance);
|
||||
this->addTest(3,(Client::test)&DistanceTestsU32::test_jaccard_distance);
|
||||
this->addTest(4,(Client::test)&DistanceTestsU32::test_kulsinski_distance);
|
||||
this->addTest(5,(Client::test)&DistanceTestsU32::test_rogerstanimoto_distance);
|
||||
this->addTest(6,(Client::test)&DistanceTestsU32::test_russellrao_distance);
|
||||
this->addTest(7,(Client::test)&DistanceTestsU32::test_sokalmichener_distance);
|
||||
this->addTest(8,(Client::test)&DistanceTestsU32::test_sokalsneath_distance);
|
||||
this->addTest(9,(Client::test)&DistanceTestsU32::test_yule_distance);
|
||||
|
||||
}
|
||||
|
||||
#include "BasicMathsBenchmarksF32.h"
|
||||
BasicMathsBenchmarksF32::BasicMathsBenchmarksF32(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&BasicMathsBenchmarksF32::vec_mult_f32);
|
||||
this->addTest(2,(Client::test)&BasicMathsBenchmarksF32::vec_add_f32);
|
||||
this->addTest(3,(Client::test)&BasicMathsBenchmarksF32::vec_sub_f32);
|
||||
this->addTest(4,(Client::test)&BasicMathsBenchmarksF32::vec_abs_f32);
|
||||
this->addTest(5,(Client::test)&BasicMathsBenchmarksF32::vec_negate_f32);
|
||||
this->addTest(6,(Client::test)&BasicMathsBenchmarksF32::vec_offset_f32);
|
||||
this->addTest(7,(Client::test)&BasicMathsBenchmarksF32::vec_scale_f32);
|
||||
this->addTest(8,(Client::test)&BasicMathsBenchmarksF32::vec_dot_f32);
|
||||
|
||||
}
|
||||
|
||||
#include "BasicMathsBenchmarksQ31.h"
|
||||
BasicMathsBenchmarksQ31::BasicMathsBenchmarksQ31(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&BasicMathsBenchmarksQ31::vec_mult_q31);
|
||||
this->addTest(2,(Client::test)&BasicMathsBenchmarksQ31::vec_add_q31);
|
||||
this->addTest(3,(Client::test)&BasicMathsBenchmarksQ31::vec_sub_q31);
|
||||
this->addTest(4,(Client::test)&BasicMathsBenchmarksQ31::vec_abs_q31);
|
||||
this->addTest(5,(Client::test)&BasicMathsBenchmarksQ31::vec_negate_q31);
|
||||
this->addTest(6,(Client::test)&BasicMathsBenchmarksQ31::vec_offset_q31);
|
||||
this->addTest(7,(Client::test)&BasicMathsBenchmarksQ31::vec_scale_q31);
|
||||
this->addTest(8,(Client::test)&BasicMathsBenchmarksQ31::vec_dot_q31);
|
||||
|
||||
}
|
||||
|
||||
#include "BasicMathsBenchmarksQ15.h"
|
||||
BasicMathsBenchmarksQ15::BasicMathsBenchmarksQ15(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&BasicMathsBenchmarksQ15::vec_mult_q15);
|
||||
this->addTest(2,(Client::test)&BasicMathsBenchmarksQ15::vec_add_q15);
|
||||
this->addTest(3,(Client::test)&BasicMathsBenchmarksQ15::vec_sub_q15);
|
||||
this->addTest(4,(Client::test)&BasicMathsBenchmarksQ15::vec_abs_q15);
|
||||
this->addTest(5,(Client::test)&BasicMathsBenchmarksQ15::vec_negate_q15);
|
||||
this->addTest(6,(Client::test)&BasicMathsBenchmarksQ15::vec_offset_q15);
|
||||
this->addTest(7,(Client::test)&BasicMathsBenchmarksQ15::vec_scale_q15);
|
||||
this->addTest(8,(Client::test)&BasicMathsBenchmarksQ15::vec_dot_q15);
|
||||
|
||||
}
|
||||
|
||||
#include "BasicMathsBenchmarksQ7.h"
|
||||
BasicMathsBenchmarksQ7::BasicMathsBenchmarksQ7(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&BasicMathsBenchmarksQ7::vec_mult_q7);
|
||||
this->addTest(2,(Client::test)&BasicMathsBenchmarksQ7::vec_add_q7);
|
||||
this->addTest(3,(Client::test)&BasicMathsBenchmarksQ7::vec_sub_q7);
|
||||
this->addTest(4,(Client::test)&BasicMathsBenchmarksQ7::vec_abs_q7);
|
||||
this->addTest(5,(Client::test)&BasicMathsBenchmarksQ7::vec_negate_q7);
|
||||
this->addTest(6,(Client::test)&BasicMathsBenchmarksQ7::vec_offset_q7);
|
||||
this->addTest(7,(Client::test)&BasicMathsBenchmarksQ7::vec_scale_q7);
|
||||
this->addTest(8,(Client::test)&BasicMathsBenchmarksQ7::vec_dot_q7);
|
||||
|
||||
}
|
||||
|
||||
#include "FullyConnected.h"
|
||||
FullyConnected::FullyConnected(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(2,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(3,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(4,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(5,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(6,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(7,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(8,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(9,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(10,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(11,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(12,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(13,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(14,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
this->addTest(15,(Client::test)&FullyConnected::test_fully_connected_tflite_s8);
|
||||
|
||||
}
|
||||
|
||||
#include "FullyConnectedBench.h"
|
||||
FullyConnectedBench::FullyConnectedBench(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&FullyConnectedBench::test_fully_connected_tflite_s8);
|
||||
#include "Pooling.h"
|
||||
Pooling::Pooling(Testing::testID_t id):Client::Suite(id)
|
||||
{
|
||||
this->addTest(1,(Client::test)&Pooling::test_avgpool_s8);
|
||||
this->addTest(2,(Client::test)&Pooling::test_avgpool_s8);
|
||||
this->addTest(3,(Client::test)&Pooling::test_avgpool_s8);
|
||||
this->addTest(4,(Client::test)&Pooling::test_avgpool_s8);
|
||||
this->addTest(5,(Client::test)&Pooling::test_avgpool_s8);
|
||||
this->addTest(6,(Client::test)&Pooling::test_avgpool_s8);
|
||||
this->addTest(7,(Client::test)&Pooling::test_avgpool_s8);
|
||||
this->addTest(8,(Client::test)&Pooling::test_avgpool_s8);
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
#include "Test.h"
|
||||
#include "Pattern.h"
|
||||
class Pooling:public Client::Suite
|
||||
{
|
||||
public:
|
||||
Pooling(Testing::testID_t id);
|
||||
void setUp(Testing::testID_t,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr);
|
||||
void tearDown(Testing::testID_t,Client::PatternMgr *mgr);
|
||||
private:
|
||||
#include "Pooling_decl.h"
|
||||
|
||||
Client::Pattern<q7_t> input;
|
||||
|
||||
Client::LocalPattern<q7_t> output;
|
||||
|
||||
// Reference patterns are not loaded when we are in dump mode
|
||||
Client::RefPattern<q7_t> ref;
|
||||
|
||||
int DIM_IN_X;
|
||||
int DIM_IN_Y;
|
||||
int DIM_OUT_X;
|
||||
int DIM_OUT_Y;
|
||||
int IN_CHANNEL;
|
||||
int DIM_FILTER_X;
|
||||
int DIM_FILTER_Y;
|
||||
int PAD_WIDTH;
|
||||
int PAD_HEIGHT;
|
||||
int STRIDE_X;
|
||||
int STRIDE_Y;
|
||||
int ACT_MIN;
|
||||
int ACT_MAX;
|
||||
|
||||
};
|
||||
@ -0,0 +1,202 @@
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffac
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffad
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffae
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffaf
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdc
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffdd
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffde
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
0xffffffdf
|
||||
@ -0,0 +1,2 @@
|
||||
0xffffffac
|
||||
0xffffffdc
|
||||
@ -0,0 +1,2 @@
|
||||
0xfffffff8
|
||||
0xfffffffa
|
||||
@ -0,0 +1,2 @@
|
||||
0x00000000
|
||||
0x00000030
|
||||
@ -0,0 +1,2 @@
|
||||
0x00000016
|
||||
0x00000030
|
||||
@ -0,0 +1,8 @@
|
||||
0xffffffac
|
||||
0xffffffd0
|
||||
0xffffffdc
|
||||
0xffffffd8
|
||||
0xffffffa8
|
||||
0xffffffe0
|
||||
0x00000008
|
||||
0xfffffff0
|
||||
@ -0,0 +1,3 @@
|
||||
0xffffffac
|
||||
0xffffffd0
|
||||
0xffffffdc
|
||||
@ -0,0 +1 @@
|
||||
0x0000007f
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,18 @@
|
||||
B
|
||||
8
|
||||
//-128
|
||||
0x80
|
||||
//-32
|
||||
0xe0
|
||||
//-96
|
||||
0xa0
|
||||
//-64
|
||||
0xc0
|
||||
//-80
|
||||
0xb0
|
||||
//-96
|
||||
0xa0
|
||||
//32
|
||||
0x20
|
||||
//-16
|
||||
0xf0
|
||||
@ -0,0 +1,18 @@
|
||||
B
|
||||
8
|
||||
//0
|
||||
0x0
|
||||
//-48
|
||||
0xd0
|
||||
//-16
|
||||
0xf0
|
||||
//-32
|
||||
0xe0
|
||||
//-24
|
||||
0xe8
|
||||
//-16
|
||||
0xf0
|
||||
//80
|
||||
0x50
|
||||
//-56
|
||||
0xc8
|
||||
@ -0,0 +1,18 @@
|
||||
B
|
||||
8
|
||||
//0
|
||||
0x0
|
||||
//-48
|
||||
0xd0
|
||||
//96
|
||||
0x60
|
||||
//32
|
||||
0x20
|
||||
//-24
|
||||
0xe8
|
||||
//-16
|
||||
0xf0
|
||||
//80
|
||||
0x50
|
||||
//56
|
||||
0x38
|
||||
@ -0,0 +1,18 @@
|
||||
B
|
||||
8
|
||||
//0
|
||||
0x0
|
||||
//48
|
||||
0x30
|
||||
//96
|
||||
0x60
|
||||
//32
|
||||
0x20
|
||||
//24
|
||||
0x18
|
||||
//16
|
||||
0x10
|
||||
//80
|
||||
0x50
|
||||
//56
|
||||
0x38
|
||||
@ -0,0 +1,18 @@
|
||||
B
|
||||
8
|
||||
//-128
|
||||
0x80
|
||||
//-32
|
||||
0xe0
|
||||
//-96
|
||||
0xa0
|
||||
//-64
|
||||
0xc0
|
||||
//-80
|
||||
0xb0
|
||||
//-96
|
||||
0xa0
|
||||
//32
|
||||
0x20
|
||||
//-16
|
||||
0xf0
|
||||
@ -0,0 +1,18 @@
|
||||
B
|
||||
8
|
||||
//-128
|
||||
0x80
|
||||
//-32
|
||||
0xe0
|
||||
//-96
|
||||
0xa0
|
||||
//-64
|
||||
0xc0
|
||||
//-80
|
||||
0xb0
|
||||
//-96
|
||||
0xa0
|
||||
//32
|
||||
0x20
|
||||
//-16
|
||||
0xf0
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,406 @@
|
||||
B
|
||||
202
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-84
|
||||
0xac
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-83
|
||||
0xad
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-82
|
||||
0xae
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-81
|
||||
0xaf
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-36
|
||||
0xdc
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-35
|
||||
0xdd
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-34
|
||||
0xde
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
//-33
|
||||
0xdf
|
||||
@ -0,0 +1,6 @@
|
||||
B
|
||||
2
|
||||
//-84
|
||||
0xac
|
||||
//-36
|
||||
0xdc
|
||||
@ -0,0 +1,6 @@
|
||||
B
|
||||
2
|
||||
//-8
|
||||
0xf8
|
||||
//-6
|
||||
0xfa
|
||||
@ -0,0 +1,6 @@
|
||||
B
|
||||
2
|
||||
//0
|
||||
0x0
|
||||
//48
|
||||
0x30
|
||||
@ -0,0 +1,6 @@
|
||||
B
|
||||
2
|
||||
//22
|
||||
0x16
|
||||
//48
|
||||
0x30
|
||||
@ -0,0 +1,18 @@
|
||||
B
|
||||
8
|
||||
//-84
|
||||
0xac
|
||||
//-48
|
||||
0xd0
|
||||
//-36
|
||||
0xdc
|
||||
//-40
|
||||
0xd8
|
||||
//-88
|
||||
0xa8
|
||||
//-32
|
||||
0xe0
|
||||
//8
|
||||
0x8
|
||||
//-16
|
||||
0xf0
|
||||
@ -0,0 +1,8 @@
|
||||
B
|
||||
3
|
||||
//-84
|
||||
0xac
|
||||
//-48
|
||||
0xd0
|
||||
//-36
|
||||
0xdc
|
||||
@ -0,0 +1,4 @@
|
||||
B
|
||||
1
|
||||
//127
|
||||
0x7f
|
||||
@ -0,0 +1,206 @@
|
||||
#include "Pooling.h"
|
||||
#include "Error.h"
|
||||
#include "arm_nnfunctions.h"
|
||||
#include "Test.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
void Pooling::test_avgpool_s8()
|
||||
{
|
||||
const q7_t *inp = input.ptr();
|
||||
q7_t *outp = output.ptr();
|
||||
|
||||
arm_avgpool_s8(
|
||||
DIM_IN_Y,
|
||||
DIM_IN_X,
|
||||
DIM_OUT_Y,
|
||||
DIM_OUT_X,
|
||||
STRIDE_Y,
|
||||
STRIDE_X,
|
||||
DIM_FILTER_Y,
|
||||
DIM_FILTER_X,
|
||||
PAD_HEIGHT,
|
||||
PAD_WIDTH,
|
||||
ACT_MIN,
|
||||
ACT_MAX,
|
||||
IN_CHANNEL,
|
||||
inp,
|
||||
outp);
|
||||
|
||||
ASSERT_EQ(ref,output);
|
||||
}
|
||||
|
||||
|
||||
void Pooling::setUp(Testing::testID_t id,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr)
|
||||
{
|
||||
|
||||
switch(id)
|
||||
{
|
||||
case Pooling::TEST_AVGPOOL_S8_1:
|
||||
input.reload(Pooling::INPUT1_S8_ID,mgr);
|
||||
ref.reload(Pooling::REF1_S8_ID,mgr);
|
||||
|
||||
this->DIM_IN_X= 4;
|
||||
this->DIM_IN_Y= 2;
|
||||
this->DIM_OUT_X= 2;
|
||||
this->DIM_OUT_Y= 1;
|
||||
this->IN_CHANNEL= 101;
|
||||
this->DIM_FILTER_X= 2;
|
||||
this->DIM_FILTER_Y= 2;
|
||||
this->PAD_WIDTH= 0;
|
||||
this->PAD_HEIGHT= 0;
|
||||
this->STRIDE_X= 2;
|
||||
this->STRIDE_Y= 2;
|
||||
this->ACT_MIN= -128;
|
||||
this->ACT_MAX= 127;
|
||||
|
||||
break;
|
||||
|
||||
case Pooling::TEST_AVGPOOL_S8_2:
|
||||
input.reload(Pooling::INPUT2_S8_ID,mgr);
|
||||
ref.reload(Pooling::REF2_S8_ID,mgr);
|
||||
|
||||
this->DIM_IN_X= 4;
|
||||
this->DIM_IN_Y= 2;
|
||||
this->DIM_OUT_X= 2;
|
||||
this->DIM_OUT_Y= 1;
|
||||
this->IN_CHANNEL= 1;
|
||||
this->DIM_FILTER_X= 2;
|
||||
this->DIM_FILTER_Y= 2;
|
||||
this->PAD_WIDTH= 0;
|
||||
this->PAD_HEIGHT= 0;
|
||||
this->STRIDE_X= 2;
|
||||
this->STRIDE_Y= 2;
|
||||
this->ACT_MIN= -128;
|
||||
this->ACT_MAX= 127;
|
||||
break;
|
||||
|
||||
case Pooling::TEST_AVGPOOL_S8_3:
|
||||
input.reload(Pooling::INPUT3_S8_ID,mgr);
|
||||
ref.reload(Pooling::REF3_S8_ID,mgr);
|
||||
|
||||
this->DIM_IN_X= 4;
|
||||
this->DIM_IN_Y= 2;
|
||||
this->DIM_OUT_X= 2;
|
||||
this->DIM_OUT_Y= 1;
|
||||
this->IN_CHANNEL= 1;
|
||||
this->DIM_FILTER_X= 2;
|
||||
this->DIM_FILTER_Y= 2;
|
||||
this->PAD_WIDTH= 0;
|
||||
this->PAD_HEIGHT= 0;
|
||||
this->STRIDE_X= 2;
|
||||
this->STRIDE_Y= 2;
|
||||
this->ACT_MIN= -8;
|
||||
this->ACT_MAX= 8;
|
||||
break;
|
||||
|
||||
case Pooling::TEST_AVGPOOL_S8_4:
|
||||
input.reload(Pooling::INPUT4_S8_ID,mgr);
|
||||
ref.reload(Pooling::REF4_S8_ID,mgr);
|
||||
|
||||
this->DIM_IN_X= 4;
|
||||
this->DIM_IN_Y= 2;
|
||||
this->DIM_OUT_X= 2;
|
||||
this->DIM_OUT_Y= 1;
|
||||
this->IN_CHANNEL= 1;
|
||||
this->DIM_FILTER_X= 2;
|
||||
this->DIM_FILTER_Y= 2;
|
||||
this->PAD_WIDTH= 0;
|
||||
this->PAD_HEIGHT= 0;
|
||||
this->STRIDE_X= 2;
|
||||
this->STRIDE_Y= 2;
|
||||
this->ACT_MIN= 0;
|
||||
this->ACT_MAX= 48;
|
||||
break;
|
||||
|
||||
case Pooling::TEST_AVGPOOL_S8_5:
|
||||
input.reload(Pooling::INPUT5_S8_ID,mgr);
|
||||
ref.reload(Pooling::REF5_S8_ID,mgr);
|
||||
|
||||
this->DIM_IN_X= 4;
|
||||
this->DIM_IN_Y= 2;
|
||||
this->DIM_OUT_X= 2;
|
||||
this->DIM_OUT_Y= 1;
|
||||
this->IN_CHANNEL= 1;
|
||||
this->DIM_FILTER_X= 2;
|
||||
this->DIM_FILTER_Y= 2;
|
||||
this->PAD_WIDTH= 0;
|
||||
this->PAD_HEIGHT= 0;
|
||||
this->STRIDE_X= 2;
|
||||
this->STRIDE_Y= 2;
|
||||
this->ACT_MIN= 0;
|
||||
this->ACT_MAX= 48;
|
||||
break;
|
||||
|
||||
case Pooling::TEST_AVGPOOL_S8_6:
|
||||
input.reload(Pooling::INPUT6_S8_ID,mgr);
|
||||
ref.reload(Pooling::REF6_S8_ID,mgr);
|
||||
|
||||
this->DIM_IN_X= 4;
|
||||
this->DIM_IN_Y= 2;
|
||||
this->DIM_OUT_X= 4;
|
||||
this->DIM_OUT_Y= 2;
|
||||
this->IN_CHANNEL= 1;
|
||||
this->DIM_FILTER_X= 2;
|
||||
this->DIM_FILTER_Y= 2;
|
||||
this->PAD_WIDTH= 0;
|
||||
this->PAD_HEIGHT= 0;
|
||||
this->STRIDE_X= 1;
|
||||
this->STRIDE_Y= 1;
|
||||
this->ACT_MIN= -128;
|
||||
this->ACT_MAX= 127;
|
||||
break;
|
||||
|
||||
case Pooling::TEST_AVGPOOL_S8_7:
|
||||
input.reload(Pooling::INPUT7_S8_ID,mgr);
|
||||
ref.reload(Pooling::REF7_S8_ID,mgr);
|
||||
|
||||
this->DIM_IN_X= 4;
|
||||
this->DIM_IN_Y= 2;
|
||||
this->DIM_OUT_X= 3;
|
||||
this->DIM_OUT_Y= 1;
|
||||
this->IN_CHANNEL= 1;
|
||||
this->DIM_FILTER_X= 2;
|
||||
this->DIM_FILTER_Y= 2;
|
||||
this->PAD_WIDTH= 0;
|
||||
this->PAD_HEIGHT= 0;
|
||||
this->STRIDE_X= 1;
|
||||
this->STRIDE_Y= 1;
|
||||
this->ACT_MIN= -128;
|
||||
this->ACT_MAX= 127;
|
||||
break;
|
||||
|
||||
case Pooling::TEST_AVGPOOL_S8_8:
|
||||
input.reload(Pooling::INPUT8_S8_ID,mgr);
|
||||
ref.reload(Pooling::REF8_S8_ID,mgr);
|
||||
|
||||
this->DIM_IN_X= 63;
|
||||
this->DIM_IN_Y= 63;
|
||||
this->DIM_OUT_X= 1;
|
||||
this->DIM_OUT_Y= 1;
|
||||
this->IN_CHANNEL= 1;
|
||||
this->DIM_FILTER_X= 63;
|
||||
this->DIM_FILTER_Y= 63;
|
||||
this->PAD_WIDTH= 0;
|
||||
this->PAD_HEIGHT= 0;
|
||||
this->STRIDE_X= 2;
|
||||
this->STRIDE_Y= 2;
|
||||
this->ACT_MIN= -128;
|
||||
this->ACT_MAX= 127;
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
output.create(ref.nbSamples(),Pooling::OUTPUT_S8_ID,mgr);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Pooling::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
|
||||
{
|
||||
output.dump(mgr);
|
||||
}
|
||||
@ -1,2 +1,2 @@
|
||||
OPTIMIZED,HARDFP,FASTMATH,NEON,UNROLL,ROUNDING,PLATFORM,CORE,COMPILER,VERSION
|
||||
1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
|
||||
|
Loading…
Reference in New Issue