diff --git a/Testing/Include/Benchmarks/FullyConnectedBench.h b/Testing/Include/Benchmarks/FullyConnectedBench.h index e3f30bc0..25f3621b 100644 --- a/Testing/Include/Benchmarks/FullyConnectedBench.h +++ b/Testing/Include/Benchmarks/FullyConnectedBench.h @@ -11,7 +11,7 @@ class FullyConnectedBench:public Client::Suite int repeatNb; Client::Pattern input; - Client::Pattern bias; + Client::Pattern bias; Client::Pattern weight; Client::LocalPattern output; Client::LocalPattern temp; @@ -19,7 +19,7 @@ class FullyConnectedBench:public Client::Suite Client::RefPattern ref; q7_t *inp; - q7_t *biasp; + q31_t *biasp; q7_t *weightp; q7_t *outp; q7_t *refp; diff --git a/Testing/Include/Tests/FullyConnected.h b/Testing/Include/Tests/FullyConnected.h index 85d59eff..8e4ddff3 100644 --- a/Testing/Include/Tests/FullyConnected.h +++ b/Testing/Include/Tests/FullyConnected.h @@ -21,7 +21,7 @@ class FullyConnected:public Client::Suite int32_t colDim; Client::Pattern input; - Client::Pattern bias; + Client::Pattern bias; Client::Pattern weight; Client::LocalPattern output; Client::LocalPattern temp; diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_1_10_4_bias_1.txt b/Testing/Patterns/NN/FullyConnected/TestCase_1_10_4_bias_1.txt index fe4aa565..e5068083 100644 --- a/Testing/Patterns/NN/FullyConnected/TestCase_1_10_4_bias_1.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_1_10_4_bias_1.txt @@ -1,10 +1,10 @@ -B +W 4 //04 -0x04 +0x00000004 //08 -0x08 +0x00000008 //12 -0x0c +0x0000000c //16 -0x10 \ No newline at end of file +0x00000010 \ No newline at end of file diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_1_10_4_bias_3.txt b/Testing/Patterns/NN/FullyConnected/TestCase_1_10_4_bias_3.txt index 1c4e16c6..f9eeaa85 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_1_10_4_bias_3.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_1_10_4_bias_3.txt @@ -1,10 +1,10 @@ -B +W 4 //01 -0x01 +0x00000001 //02 -0x02 +0x00000002 //03 -0x03 +0x00000003 //-3 -0xfd +0xfffffffd diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_1_8_8_bias_5.txt b/Testing/Patterns/NN/FullyConnected/TestCase_1_8_8_bias_5.txt index 07c94206..88132023 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_1_8_8_bias_5.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_1_8_8_bias_5.txt @@ -1,18 +1,18 @@ -B +W 8 //-3 -0xfd +0xfffffffd //01 -0x01 +0x00000001 //-2 -0xfe +0xfffffffe //02 -0x02 +0x00000002 //01 -0x01 +0x00000001 //08 -0x08 +0x00000008 //03 -0x03 +0x00000003 //02 -0x02 \ No newline at end of file +0x00000002 \ No newline at end of file diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_1_8_9_bias_2.txt b/Testing/Patterns/NN/FullyConnected/TestCase_1_8_9_bias_2.txt index 6217457f..0486078b 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_1_8_9_bias_2.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_1_8_9_bias_2.txt @@ -1,20 +1,20 @@ -B +W 9 //-3 -0xfd +0xfffffffd //01 -0x01 +0x00000001 //-2 -0xfe +0xfffffffe //02 -0x02 +0x00000002 //01 -0x01 +0x00000001 //08 -0x08 +0x00000008 //03 -0x03 +0x00000003 //02 -0x02 +0x00000002 //-4 -0xfc \ No newline at end of file +0xfffffffc \ No newline at end of file diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_1_9_1_bias_4.txt b/Testing/Patterns/NN/FullyConnected/TestCase_1_9_1_bias_4.txt index 68064699..628c2b38 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_1_9_1_bias_4.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_1_9_1_bias_4.txt @@ -1,4 +1,4 @@ -B +W 1 //-3 -0xfd +0xfffffffd diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_4_10_1_bias_10.txt b/Testing/Patterns/NN/FullyConnected/TestCase_4_10_1_bias_10.txt index 4c1055af..7830844c 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_4_10_1_bias_10.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_4_10_1_bias_10.txt @@ -1,4 +1,4 @@ -B +W 1 //04 -0x04 \ No newline at end of file +0x00000004 \ No newline at end of file diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_4_10_1_bias_8.txt b/Testing/Patterns/NN/FullyConnected/TestCase_4_10_1_bias_8.txt index 4c1055af..7830844c 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_4_10_1_bias_8.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_4_10_1_bias_8.txt @@ -1,4 +1,4 @@ -B +W 1 //04 -0x04 \ No newline at end of file +0x00000004 \ No newline at end of file diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_4_7_3_bias_14.txt b/Testing/Patterns/NN/FullyConnected/TestCase_4_7_3_bias_14.txt index 49e66bef..8a77f04d 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_4_7_3_bias_14.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_4_7_3_bias_14.txt @@ -1,8 +1,8 @@ -B +W 3 //00 -0x00 +0x00000000 //00 -0x00 +0x00000000 //00 -0x00 +0x00000000 diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_8_7_4_bias_15.txt b/Testing/Patterns/NN/FullyConnected/TestCase_8_7_4_bias_15.txt index 79734b1d..05fa8249 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_8_7_4_bias_15.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_8_7_4_bias_15.txt @@ -1,10 +1,10 @@ -B +W 4 //-2 -0xfe +0xfffffffe //01 -0x01 +0x00000001 //-1 -0xff +0xffffffff //03 -0x03 \ No newline at end of file +0x00000003 \ No newline at end of file diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_8_8_1_bias_11.txt b/Testing/Patterns/NN/FullyConnected/TestCase_8_8_1_bias_11.txt index 4c1055af..7830844c 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_8_8_1_bias_11.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_8_8_1_bias_11.txt @@ -1,4 +1,4 @@ -B +W 1 //04 -0x04 \ No newline at end of file +0x00000004 \ No newline at end of file diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_8_8_1_bias_7.txt b/Testing/Patterns/NN/FullyConnected/TestCase_8_8_1_bias_7.txt index 4c1055af..7830844c 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_8_8_1_bias_7.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_8_8_1_bias_7.txt @@ -1,4 +1,4 @@ -B +W 1 //04 -0x04 \ No newline at end of file +0x00000004 \ No newline at end of file diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_8_8_5_bias_13.txt b/Testing/Patterns/NN/FullyConnected/TestCase_8_8_5_bias_13.txt index 5a6ef863..ae0d3ece 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_8_8_5_bias_13.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_8_8_5_bias_13.txt @@ -1,12 +1,12 @@ -B +W 5 //-2 -0xfe +0xfffffffe //01 -0x01 +0x00000001 //-1 -0xff +0xffffffff //03 -0x03 +0x00000003 //00 -0x00 \ No newline at end of file +0x00000000 \ No newline at end of file diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_9_6_1_bias_6.txt b/Testing/Patterns/NN/FullyConnected/TestCase_9_6_1_bias_6.txt index 0890a321..265df35b 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_9_6_1_bias_6.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_9_6_1_bias_6.txt @@ -1,4 +1,4 @@ -B +W 1 //04 -0x04 +0x00000004 diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_9_6_1_bias_9.txt b/Testing/Patterns/NN/FullyConnected/TestCase_9_6_1_bias_9.txt index 0890a321..265df35b 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_9_6_1_bias_9.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_9_6_1_bias_9.txt @@ -1,4 +1,4 @@ -B +W 1 //04 -0x04 +0x00000004 diff --git a/Testing/Patterns/NN/FullyConnected/TestCase_9_8_4_bias_12.txt b/Testing/Patterns/NN/FullyConnected/TestCase_9_8_4_bias_12.txt index 0ed95bb9..9b65edb1 100755 --- a/Testing/Patterns/NN/FullyConnected/TestCase_9_8_4_bias_12.txt +++ b/Testing/Patterns/NN/FullyConnected/TestCase_9_8_4_bias_12.txt @@ -1,10 +1,10 @@ -B +W 4 //-2 -0xfe +0xfffffffe //01 -0x01 +0x00000001 //-1 -0xff +0xffffffff //00 -0x00 +0x00000000 diff --git a/Testing/Source/Benchmarks/FullyConnectedBench.cpp b/Testing/Source/Benchmarks/FullyConnectedBench.cpp index e064edef..2107c156 100644 --- a/Testing/Source/Benchmarks/FullyConnectedBench.cpp +++ b/Testing/Source/Benchmarks/FullyConnectedBench.cpp @@ -26,7 +26,7 @@ ,output_mult ,output_shift ,output_offset - ,(const int8_t*)biasp + ,(const int32_t*)biasp ,(int8_t*)outp ,-128 ,127 diff --git a/Testing/Source/Tests/FullyConnected.cpp b/Testing/Source/Tests/FullyConnected.cpp index 17329d48..380d2045 100644 --- a/Testing/Source/Tests/FullyConnected.cpp +++ b/Testing/Source/Tests/FullyConnected.cpp @@ -20,7 +20,7 @@ void printPattern(char *s,Client::AnyPattern pat) { q7_t *inp=input.ptr(); - q7_t *biasp=bias.ptr(); + q31_t *biasp=bias.ptr(); q7_t *weightp=weight.ptr(); q7_t *outp=output.ptr(); q7_t *refp=ref.ptr(); @@ -36,7 +36,7 @@ void printPattern(char *s,Client::AnyPattern pat) ,output_mult ,output_shift ,output_offset - ,(const int8_t*)biasp + ,(const int32_t*)biasp ,(int8_t*)outp ,act_min ,act_max