diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-06-16 01:02:06 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-06-16 01:02:06 +0000 |
commit | 23d39f5fb5824f6b3075ac86610515c6737cab50 (patch) | |
tree | 88c1c2aab87d56b4ff22ae8ad790a0227a97cc58 | |
parent | 7d1b3c218e111fc1055310a7d8beda213489fd84 (diff) | |
parent | e19d742a8f5809a542a096579d0e4830b6e356fe (diff) | |
download | ml-23d39f5fb5824f6b3075ac86610515c6737cab50.tar.gz |
Snap for 6592941 from e19d742a8f5809a542a096579d0e4830b6e356fe to rvc-release
Change-Id: I6a03d021c58a0264ab9e609ed2fc35fb84c5a2ad
-rw-r--r-- | nn/TEST_MAPPING | 12 | ||||
-rw-r--r-- | nn/runtime/test/TestMain.cpp | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/nn/TEST_MAPPING b/nn/TEST_MAPPING index f3eaa9940..74ff411c0 100644 --- a/nn/TEST_MAPPING +++ b/nn/TEST_MAPPING @@ -15,6 +15,18 @@ { // b/153876253, temporarily filter out failing l2_norm tests "include-filter": "-*l2_normalization_axis_corner_case*" + }, + { + // Restrict NeuralNetworksTest_static to run only a single + // pass consisting of: + // * useCpuOnly = 0 + // * computeMode = ComputeMode::ASYNC + // * allowSyncExecHal = 1 + // + // The value here is a bitmask indicating only "pass 10" + // should be run (1024 = 2^10). The bit conversions can be + // found in frameworks/ml/nn/runtime/test/TestMain.cpp. + "native-test-flag": "1024" } ] }, diff --git a/nn/runtime/test/TestMain.cpp b/nn/runtime/test/TestMain.cpp index a4fefae70..f89c7adbc 100644 --- a/nn/runtime/test/TestMain.cpp +++ b/nn/runtime/test/TestMain.cpp @@ -56,6 +56,11 @@ static uint64_t allowedPasses = ~uint64_t(0); // true, and if we are asked to set it to false, we return 0 ("success") without // running tests. static int test(bool useCpuOnly, Execution::ComputeMode computeMode, bool allowSyncExecHal = true) { + // NOTE: The test mapping configuration (frameworks/ml/nn/TEST_MAPPING) uses + // the value of 1024 to only run pass 10 of the test, corresponding to + // "useCpuOnly = 0, computeMode = ComputeMode::ASYNC, allowSyncExecHal = 1". + // If you change the bit representation here, also make the corresponding + // change to the TEST_MAPPING file to run the equivalent pass of the test. uint32_t passIndex = (useCpuOnly << 0) + (static_cast<uint32_t>(computeMode) << 1) + (allowSyncExecHal << 3); |