summaryrefslogtreecommitdiff
path: root/nn/runtime/test/TestOpenmpSettings.cpp
AgeCommit message (Collapse)Author
2019-07-31clang-format for frameworks/ml/nnMichael Butler
This CL formats all of frameworks/ml/nn/* with the following commands: $ $CLANG_DIR/clang-format --style=file -i `find $NNAPI_DIR -name "*.cpp"` $ $CLANG_DIR/clang-format --style=file -i `find $NNAPI_DIR -name "*.h"` where: * "NNAPI_DIR" is "$ANDROID_BUILD_TOP/frameworks/ml/nn" * "CLANG_DIR" is "$ANDROID_BUILD_TOP/prebuilts/clang/host/linux-x86/clang-stable/bin" Bug: N/A Test: mma Change-Id: Idddbc7ecaeab76fb0bbee4250830333752a1f29b
2018-06-04Openmp blocktime 1->20ms to keep cores enabledMika Raento
With 1ms blocktime the benchmark app shows 3x performance degradation on Pixel 2 in float benchmarks (against no blocktime setting). In testing, 10ms was enough to give results comparable to no setting. 20ms was chosen as to have a 2x margin of safety while not keeping the threads busywaiting unnecessarily long. Bug: 109645291 Test: NeuralNetworksTest_static/*Openmp* Test: Run benchmark app multiple times Change-Id: Id2a909f6aefdbe29dd746019c2c9541e31d8c754
2018-05-18Deflakify Openmp testMika Raento
Accept 0 as the initial blocktime value. On-device kmp_get_blocktime returns 0 instead of 200 about 10% of time. Bug: 79908763 Test: NeuralNetworksTest_static Change-Id: I03e2e95175c6342ff1e85436fd7ce6b03d440bda
2018-05-11Reduce OpenMP thread busywait time (200 to 1 ms)Mika Raento
Reduce the time OpenMP threads used by Eigen busywait for new work after completing a piece. This is 200ms by default, which meant that we tried to continuously run 8 threads for 200ms after completing operations using Eigen - starving both our other work and the rest of the system. Bug: 79159165 Test: mm Test: cherry-picked to systrace branch and look at traces Test: NeuralNetworksTest_static Change-Id: I3f21aea6d96c785dd7c47493a739b76876420f7d