/test/mlts/benchmark/src/com/android/nn/crashtest/app/ |
D | NNParallelTestActivity.java | 90 final Intent intent = getIntent(); in onResume() local 92 final int[] testList = intent.getIntArrayExtra(EXTRA_TEST_LIST); in onResume() 94 final int threadCount = intent.getIntExtra(EXTRA_THREAD_COUNT, 10); in onResume() 95 final long testDurationMillis = intent.getLongExtra(EXTRA_TEST_DURATION_MILLIS, in onResume() 97 final boolean runInSeparateProcess = intent.getBooleanExtra(EXTRA_RUN_IN_SEPARATE_PROCESS, in onResume() 99 mTestName = intent.getStringExtra(EXTRA_TEST_NAME) != null in onResume() 100 ? intent.getStringExtra(EXTRA_TEST_NAME) : "no-name"; in onResume() 104 String acceleratorName = intent.getStringExtra(EXTRA_ACCELERATOR_NAME); in onResume() 105 boolean ignoreUnsupportedModels = intent.getBooleanExtra(EXTRA_IGNORE_UNSUPPORTED_MODELS, in onResume() 107 boolean mmapModel = intent.getBooleanExtra(EXTRA_MEMORY_MAP_MODEL, false); in onResume() [all …]
|
D | NNMemoryMappedModelCompilationTest.java | 119 Intent intent = new Intent(); in compileSupportedModelsMemoryMappedOnNThreadsFor() local 121 …intent.putExtra(NNParallelTestActivity.EXTRA_TEST_LIST, IntStream.range(0, modelsCount).toArray()); in compileSupportedModelsMemoryMappedOnNThreadsFor() 122 intent.putExtra(NNParallelTestActivity.EXTRA_THREAD_COUNT, threadCount); in compileSupportedModelsMemoryMappedOnNThreadsFor() 123 intent.putExtra(NNParallelTestActivity.EXTRA_TEST_DURATION_MILLIS, testDuration.toMillis()); in compileSupportedModelsMemoryMappedOnNThreadsFor() 124 intent.putExtra(NNParallelTestActivity.EXTRA_RUN_IN_SEPARATE_PROCESS, true); in compileSupportedModelsMemoryMappedOnNThreadsFor() 125 intent.putExtra(NNParallelTestActivity.EXTRA_TEST_NAME, mTestName.getMethodName()); in compileSupportedModelsMemoryMappedOnNThreadsFor() 126 intent.putExtra(NNParallelTestActivity.EXTRA_ACCELERATOR_NAME, mAcceleratorName); in compileSupportedModelsMemoryMappedOnNThreadsFor() 127 intent.putExtra(NNParallelTestActivity.EXTRA_RUN_MODEL_COMPILATION_ONLY, true); in compileSupportedModelsMemoryMappedOnNThreadsFor() 128 intent.putExtra(NNParallelTestActivity.EXTRA_MEMORY_MAP_MODEL, true); in compileSupportedModelsMemoryMappedOnNThreadsFor() 129 intent.putExtra(NNParallelTestActivity.EXTRA_IGNORE_UNSUPPORTED_MODELS, true); in compileSupportedModelsMemoryMappedOnNThreadsFor() [all …]
|
D | NNPerformanceDegradationTestActivity.java | 35 protected String getTestName(Intent intent) { in getTestName() argument 36 return intent.getStringExtra(PerformanceDegradationTest.TEST_NAME); in getTestName() 40 protected long getTestDurationMillis(Intent intent) { in getTestDurationMillis() argument 41 final float testBenchmarkRuntimeSeconds = intent.getFloatExtra( in getTestDurationMillis() 44 final float testBenchmarkWarmupTimeSeconds = intent.getFloatExtra( in getTestDurationMillis() 56 protected CrashTestCoordinator.CrashTestIntentInitializer getIntentInitializer(Intent intent) { in getIntentInitializer() argument 57 return PerformanceDegradationTest.intentInitializer(intent); in getIntentInitializer()
|
D | NNClientEarlyTerminationTest.java | 131 Intent intent = new Intent(); in compileSupportedModelsOnNThreadsFor() local 132 intent.putExtra( in compileSupportedModelsOnNThreadsFor() 135 intent.putExtra(NNParallelTestActivity.EXTRA_THREAD_COUNT, threadCount); in compileSupportedModelsOnNThreadsFor() 136 intent.putExtra(NNParallelTestActivity.EXTRA_TEST_DURATION_MILLIS, testDuration.toMillis()); in compileSupportedModelsOnNThreadsFor() 137 intent.putExtra(NNParallelTestActivity.EXTRA_RUN_IN_SEPARATE_PROCESS, true); in compileSupportedModelsOnNThreadsFor() 138 intent.putExtra(NNParallelTestActivity.EXTRA_TEST_NAME, mTestName.getMethodName()); in compileSupportedModelsOnNThreadsFor() 139 intent.putExtra(NNParallelTestActivity.EXTRA_ACCELERATOR_NAME, mAcceleratorName); in compileSupportedModelsOnNThreadsFor() 140 intent.putExtra(NNParallelTestActivity.EXTRA_IGNORE_UNSUPPORTED_MODELS, true); in compileSupportedModelsOnNThreadsFor() 141 intent.putExtra(NNParallelTestActivity.EXTRA_RUN_MODEL_COMPILATION_ONLY, true); in compileSupportedModelsOnNThreadsFor() 142 return intent; in compileSupportedModelsOnNThreadsFor()
|
D | NNCrashTestActivity.java | 42 protected abstract String getTestName(Intent intent); in getTestName() argument 44 protected abstract long getTestDurationMillis(Intent intent); in getTestDurationMillis() argument 46 …ected abstract CrashTestCoordinator.CrashTestIntentInitializer getIntentInitializer(Intent intent); in getIntentInitializer() argument 55 final Intent intent = getIntent(); in onResume() local 57 mDuration = Duration.ofMillis(getTestDurationMillis(intent)); in onResume() 59 getIntentInitializer(intent), in onResume() 61 /*separateProcess=*/true, getTestName(intent)); in onResume()
|
D | NNRandomGraphTestActivity.java | 35 protected String getTestName(Intent intent) { in getTestName() argument 36 return intent.getStringExtra(RandomGraphTest.TEST_NAME); in getTestName() 40 protected long getTestDurationMillis(Intent intent) { in getTestDurationMillis() argument 41 return intent.getLongExtra( in getTestDurationMillis() 46 protected CrashTestCoordinator.CrashTestIntentInitializer getIntentInitializer(Intent intent) { in getIntentInitializer() argument 47 return RandomGraphTest.intentInitializer(intent); in getIntentInitializer()
|
D | NNParallelInferenceTest.java | 117 Intent intent = new Intent(); in runAllModelsOnNThreadsForOnAccelerator() local 120 intent.putExtra( in runAllModelsOnNThreadsForOnAccelerator() 122 intent.putExtra(NNParallelTestActivity.EXTRA_THREAD_COUNT, threadCount); in runAllModelsOnNThreadsForOnAccelerator() 123 intent.putExtra(NNParallelTestActivity.EXTRA_TEST_DURATION_MILLIS, testDuration.toMillis()); in runAllModelsOnNThreadsForOnAccelerator() 124 intent.putExtra(NNParallelTestActivity.EXTRA_RUN_IN_SEPARATE_PROCESS, in runAllModelsOnNThreadsForOnAccelerator() 126 intent.putExtra(NNParallelTestActivity.EXTRA_TEST_NAME, mTestName.getMethodName()); in runAllModelsOnNThreadsForOnAccelerator() 128 intent.putExtra(NNParallelTestActivity.EXTRA_ACCELERATOR_NAME, acceleratorName); in runAllModelsOnNThreadsForOnAccelerator() 129 intent.putExtra(NNParallelTestActivity.EXTRA_IGNORE_UNSUPPORTED_MODELS, true); in runAllModelsOnNThreadsForOnAccelerator() 131 return intent; in runAllModelsOnNThreadsForOnAccelerator()
|
D | NNMultiProcessTestActivity.java | 38 protected String getTestName(Intent intent) { in getTestName() argument 39 return intent.getStringExtra(RunModelsInMultipleProcesses.TEST_NAME); in getTestName() 43 protected long getTestDurationMillis(Intent intent) { in getTestDurationMillis() argument 44 return intent.getLongExtra( in getTestDurationMillis() 49 protected CrashTestCoordinator.CrashTestIntentInitializer getIntentInitializer(Intent intent) { in getIntentInitializer() argument 50 return RunModelsInMultipleProcesses.intentInitializer(intent); in getIntentInitializer()
|
/test/mlts/benchmark/src/com/android/nn/crashtest/core/test/ |
D | RandomGraphTest.java | 114 return intent -> { in intentInitializer() 115 intent.putExtra(GRAPH_SIZE, graphSize); in intentInitializer() 116 intent.putExtra(DIMENSIONS_RANGE, dimensionsRange); in intentInitializer() 117 intent.putExtra(MODELS_COUNT, modelsCount); in intentInitializer() 118 intent.putExtra(PAUSE_BETWEEN_MODELS_MS, pauseBetweenModelsMillis); in intentInitializer() 119 intent.putExtra(COMPILATION_ONLY, compilationOnly); in intentInitializer() 120 intent.putExtra(DEVICE_NAME, deviceName); in intentInitializer() 121 intent.putExtra(MAX_TEST_DURATION, maxTestDurationMillis); in intentInitializer() 122 intent.putExtra(TEST_NAME, testName); in intentInitializer()
|
D | RunModelsInParallel.java | 74 return intent -> { in intentInitializer() 75 intent.putExtra(MODELS, models); in intentInitializer() 76 intent.putExtra(DURATION, duration.toMillis()); in intentInitializer() 77 intent.putExtra(THREADS, threadCount); in intentInitializer() 78 intent.putExtra(TEST_NAME, testName); in intentInitializer() 79 intent.putExtra(ACCELERATOR_NAME, acceleratorName); in intentInitializer() 80 intent.putExtra(IGNORE_UNSUPPORTED_MODELS, ignoreUnsupportedModels); in intentInitializer() 81 intent.putExtra(RUN_MODEL_COMPILATION_ONLY, runModelCompilationOnly); in intentInitializer() 82 intent.putExtra(MEMORY_MAP_MODEL, mmapModel); in intentInitializer()
|
D | RunModelsInMultipleProcesses.java | 69 return intent -> { in intentInitializer() 70 intent.putExtra(TEST_NAME, testName); in intentInitializer() 71 intent.putExtra(MODEL_NAME, modelName); in intentInitializer() 72 intent.putExtra(PROCESSES, processCount); in intentInitializer() 73 intent.putExtra(THREADS, threadCount); in intentInitializer() 74 intent.putExtra(TEST_DURATION, duration.toMillis()); in intentInitializer() 75 intent.putExtra(NNAPI_DEVICE_NAME, nnApiDeviceName); in intentInitializer() 76 intent.putExtra(JUST_COMPILE, justCompileModel); in intentInitializer() 77 intent.putExtra(CLIENT_FAILURE_RATE_PERCENT, clientFailureRatePercent); in intentInitializer()
|
D | PerformanceDegradationTest.java | 72 return intent -> { in intentInitializer() 73 intent.putExtra(WARMUP_SECONDS, warmupTimeSeconds); in intentInitializer() 74 intent.putExtra(RUN_TIME_SECONDS, runTimeSeconds); in intentInitializer() 75 intent.putExtra(ACCELERATOR_NAME, acceleratorName); in intentInitializer() 76 intent.putExtra(THREAD_COUNT, threadCount); in intentInitializer() 77 intent.putExtra(MAX_PERFORMANCE_DEGRADATION, maxPerformanceDegradationPercent); in intentInitializer() 78 intent.putExtra(TEST_NAME, testName); in intentInitializer()
|
D | CrashingCrashTest.java | 40 return intent -> { in intentInitializer() 41 intent.putExtra(SLEEP_TIME, sleepTime); in intentInitializer() 42 intent.putExtra(SEGV, causeSegv); in intentInitializer()
|
D | NoOpCrashTest.java | 33 return intent -> { in intentInitializer() 34 intent.putExtra(SLEEP_TIME, sleepTime); in intentInitializer()
|
/test/mlts/benchmark/src/com/android/nn/benchmark/app/ |
D | NNControls.java | 107 Intent intent = new Intent(this, NNBenchmark.class); in makeBasicLaunchIntent() local 108 intent.putExtra(NNBenchmark.EXTRA_ENABLE_LONG, mSettings[SETTING_LONG_RUN]); in makeBasicLaunchIntent() 109 intent.putExtra(NNBenchmark.EXTRA_ENABLE_PAUSE, mSettings[SETTING_PAUSE]); in makeBasicLaunchIntent() 110 intent.putExtra(NNBenchmark.EXTRA_DISABLE_NNAPI, mSettings[SETTING_DISABLE_NNAPI]); in makeBasicLaunchIntent() 111 intent.putExtra(NNBenchmark.EXTRA_MAX_ITERATIONS, 1); in makeBasicLaunchIntent() 112 return intent; in makeBasicLaunchIntent() 135 Intent intent = makeBasicLaunchIntent(); in btnRun() local 136 intent.putExtra(NNBenchmark.EXTRA_TESTS, testList); in btnRun() 137 startActivityForResult(intent, 0); in btnRun()
|
D | NNBenchmark.java | 97 Intent intent = new Intent(); in onBenchmarkFinish() local 98 intent.putExtra(EXTRA_RESULTS_TESTS, mTestList); in onBenchmarkFinish() 99 intent.putExtra(EXTRA_RESULTS_RESULTS, mProcessor.getTestResults()); in onBenchmarkFinish() 100 setResult(RESULT_OK, intent); in onBenchmarkFinish()
|
D | BenchmarkTestBase.java | 115 public void onReceive(Context context, Intent intent) { in waitUntilCharged() 116 int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1); in waitUntilCharged() 117 int scale = intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1); in waitUntilCharged() 134 int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1); in waitUntilCharged()
|
/test/mlts/benchmark/src/com/android/nn/crashtest/core/ |
D | CrashTestService.java | 89 public IBinder onBind(Intent intent) { in onBind() argument 94 .requireNonNull(intent.getStringExtra(EXTRA_KEY_CRASH_TEST_CLASS)); in onBind() 98 crashTest.init(getApplicationContext(), intent, in onBind() local 136 public boolean onUnbind(Intent intent) { in onUnbind() argument
|
D | CrashTestCoordinator.java | 46 void addIntentParams(Intent intent); in addIntentParams() argument
|