c3fb81d018487e2e85dcdfa8abbb6ab76f1ceafe |
|
30-May-2018 |
Miao Wang <miaowang@google.com> |
Guard concurrent scratch_buffer and gemmlowp::GemmContext access - scrach_buffer is a file scoped static intended to minimize the allocation cost for Conv2D computations when possible. - In order to make it thread safe for multi-threaded execution, we need to make sure no concucrrent access to it. - Similarly for gemmlowp::GemmContext used in Conv2D and FullyConnected. - The mutex lock is added to prevent concurrent executions that may access the static scratch buffer and static gemmlowp::GemmContext. Bug: 80430825 Bug: 80465406 Test: NeuralNetworksTest_mt_static Test: NeuralNetworksApiBenchmark no visible performance impact Merged-In: I6b0df63a03d1f16a1e43a0c1062a997bfbe8f3f2 Change-Id: I6b0df63a03d1f16a1e43a0c1062a997bfbe8f3f2 (cherry picked from commit 9c63a9c428e5489bc8d118f52687a12206967208)
/frameworks/ml/nn/common/operations/Conv2D.cpp
|
6e1812de773691c1a42dbc1d1906ca158a5d4951 |
|
13-Apr-2018 |
Przemyslaw Szczepaniak <pszczepaniak@google.com> |
Fix Conv2D crash in 64bit binary. tflite::optimized_ops::Conv uses signed int for offsets, if the scratch buffer is larger than 0x7fff_ffff, it will overflow and cause a segfault. + Added a flag for excluding tests depending on non-public api Bug: 77982879 Test: NeuralNetworksTest Change-Id: Ia5b561b626259bdcc5cbbb9482f0ae7dff8e345f
/frameworks/ml/nn/common/operations/Conv2D.cpp
|
9447966379a4b3fba92f4dfda65aaba6b0482f1a |
|
06-Apr-2018 |
Przemyslaw Szczepaniak <pszczepaniak@google.com> |
Make convFloat32 and convQuant8 not segfault when asking too much memory. Added check for 32 bit overflow due to largish conv size for 32 bit binaries. Added new[] operator return value check. Fixed guard unique_ptr type from Type to Type[]. Test: NeuralNetworksTest Bug: 73663843 Change-Id: Iab72337b7c78e79987b4f897393a05b34b4b79f9
/frameworks/ml/nn/common/operations/Conv2D.cpp
|
eea11acb2a183642f0c5687b283f975844ea99c2 |
|
28-Mar-2018 |
Przemyslaw Szczepaniak <pszczepaniak@google.com> |
Fix memory leak in convQuant8 convQuant8 is not freeing its heap allocated im2colData buffer in case where GetQuantizedConvolutionMultipler or QuantizeMultiplierSmallerThanOne was false. Test: WIP, working on the test case, will upload shortly. Bug: 73663843 Change-Id: I8a54f95d48f8c42734484b16f40069f43bb26e44
/frameworks/ml/nn/common/operations/Conv2D.cpp
|
d9c5ba866bb0575cbb894c672e0a800844ccf6f8 |
|
15-Dec-2017 |
Miao Wang <miaowang@google.com> |
Refactor CPU operations - Share the same internal implementation as TF Lite. Test: mm Test: NeuralNetworksTest pass Change-Id: I4f0f035087eca1d45d651249bd7f9933a5787bfe
/frameworks/ml/nn/common/operations/Conv2D.cpp
|
8eb598abd0e77333688e97f7ed89b0dd60d144fa |
|
29-Sep-2017 |
Miao Wang <miaowang@google.com> |
Allow Conv2D and FullyConnected use multiple thread. Bug: 63905942 Test: mm Test: NeuralNetworksTest pass Change-Id: Iff6f248df4f33c296bb42cba1b68296ca301bf34
/frameworks/ml/nn/common/operations/Conv2D.cpp
|
04e2cd01293be976ae5cdfd92588b9e1189392a0 |
|
25-Sep-2017 |
Miao Wang <miaowang@google.com> |
Allow anisotropic strides for 2d conv and pooling operations. - The original implementation forces stride_height == stride_width. - This CL relaxes the restriction and allows anisotropic strides for CONV_2D, DEPTHWISE_CONV_2D, AVERAGE_POOL_2D, L2_POOL_2D, MAX_POOL_2D Bug: 63905942 Test: mm Test: NeuralNetworksTest pass Change-Id: I6e941896501aa64b13d08774e4529e717ee756f0
/frameworks/ml/nn/common/operations/Conv2D.cpp
|
be2b22578baf949d7be42ba002cee94304daf53c |
|
22-Sep-2017 |
Miao Wang <miaowang@google.com> |
Use softer error reporting instead of CHECK* - CHECK(x) checks whether condition x holds and LOG(FATAL) if not, which will result in calling abort(). - This change uses nnOpsCheck which would log the failing condition and return false to the runtime, allowing graceful failures. Bug: 63905942 Test: NeuralNetworkTests pass Change-Id: I8b1217f777638f974c91fa429449e39d37218af6
/frameworks/ml/nn/common/operations/Conv2D.cpp
|
1b69ceeb5920503f18b6c6c1233b1fa481b6e634 |
|
11-Sep-2017 |
Miao Wang <miaowang@google.com> |
Move all op preparation functions to OperationsUtils. - All op operations are moved to OperationUtils. - Add a helper function to derive implict padding scheme from explicit paddings. - Make all prepare function return false when seeing error. Bug: 63905942 Test: NeuralNetworkTests Change-Id: I16538dbd731a5ca1e6de5e0d0b269e9f386f4d29
/frameworks/ml/nn/common/operations/Conv2D.cpp
|
6cd685f64bd82c003b8d0943fc6b7b8e0730b939 |
|
10-Sep-2017 |
Miao Wang <miaowang@google.com> |
Making padding explicit, instead of SAME / VALID - Use explicit padding {padding_left, padding_right, padding_top, padding_bottom} for applicable ops. - Updated the corresponding tests. Bug: 63905942 Test: mm Test: updated NeuralNetworkTest pass Change-Id: Ifb8ccf59fbe5766dffe1537aa5357192a7c88a70
/frameworks/ml/nn/common/operations/Conv2D.cpp
|
55cef2193279a646292fdeb355399627dd8990c8 |
|
09-Sep-2017 |
Miao Wang <miaowang@google.com> |
Explicitly add "_2D" to applicable ops, and add fused activation function enum. - Add the fused activation enum to explicitly set the expectation that only the included ones are supported for fused ops. - Add "_2D" to CONV, DEPTHWISE_CONV, AVG_POOL, MAX_POOL, and L2_POOL, since they are only supposed to do 2D computation. - Updated the tests and the stack to plumbing the changes through. Bug: 63905942 Test: mm Test: NeuralNetworksTests pass for both CPU path and sample hidl driver. Change-Id: I60aeabab1d193d26d938c0d1d3ffdd519740d222
/frameworks/ml/nn/common/operations/Conv2D.cpp
|
27e9be3904b034e422ee9b6ab70b35ea994d2b39 |
|
03-Aug-2017 |
Miao Wang <miaowang@google.com> |
Initial implementation of the following quantized ops. - CONV_QUANT8 - DEPTHWISE_CONV_QUANT8 - AVERAGE_POOL_QUANT8 - MAX_POOL_QUANT8 - LOGISTIC_QUANT8 Additionally, added functions to plumb through quantization parameters. Bug: 63905942 Test: mm Test: end-to-end MobileNet quantized test pass Change-Id: Ib2753c68bf2c51467ae1c158b45541bcfdf10789
/frameworks/ml/nn/common/operations/Conv2D.cpp
|
eb1f88846f147d1d80ee0d688fe4635b89a40ffa |
|
26-Jul-2017 |
Miao Wang <miaowang@google.com> |
Implement the following operations for Android NN runtime. - CONV_FLOAT32 - DEPTHWISE_CONV_FLOAT32 - AVERAGE_POOL_FLOAT32 - L2_POOL_FLOAT32 - MAX_POOL_FLOAT32 - RELU_FLOAT32 - RELU6_FLOAT32 - TANH_FLOAT32 - LOGISTIC_FLOAT32 Bug: 63905942 Test: mm Test: End-to-end test with MobileNet pass Change-Id: I3eaa9794c7cdffd01792d26c5d6497c8d56d8605
/frameworks/ml/nn/common/operations/Conv2D.cpp
|