@@ -13,6 +13,9 @@ phases:
1313
1414      # Download the model from S3
1515      - curl -s --fail '{{ model_path }}' -o model.zip
16+       - curl -s --fail '{{ binary_path }}' -o xnn_executor_runner
17+ 
18+ 
1619      - unzip model.zip && ls -la
1720
1821      # Copy the model to sdcard. This prints too much progress info when the files
@@ -21,9 +24,12 @@ phases:
2124      - adb -s $DEVICEFARM_DEVICE_UDID push *.model /sdcard > /dev/null && echo OK
2225      - adb -s $DEVICEFARM_DEVICE_UDID push *.pte /sdcard > /dev/null && echo OK
2326
27+       - adb -s $DEVICEFARM_DEVICE_UDID push xnn_executor_runner /sdcard > /dev/null && echo OK
28+ 
2429      # Prepare the model and the tokenizer
2530      - adb -s $DEVICEFARM_DEVICE_UDID shell "ls -la /sdcard/"
2631      - adb -s $DEVICEFARM_DEVICE_UDID shell "mkdir -p /data/local/tmp/minibench/"
32+       - adb -s $DEVICEFARM_DEVICE_UDID shell "mv /sdcard/xnn_executor_runner /data/local/tmp/minibench/"
2733      - adb -s $DEVICEFARM_DEVICE_UDID shell "mv /sdcard/*.bin /data/local/tmp/minibench/"
2834      - adb -s $DEVICEFARM_DEVICE_UDID shell "mv /sdcard/*.model /data/local/tmp/minibench/"
2935      - adb -s $DEVICEFARM_DEVICE_UDID shell "mv /sdcard/*.pte /data/local/tmp/minibench/"
@@ -33,6 +39,8 @@ phases:
3339      - adb -s $DEVICEFARM_DEVICE_UDID shell "ls -la /data/local/tmp/minibench/"
3440      - adb -s $DEVICEFARM_DEVICE_UDID shell "run-as org.pytorch.minibench rm -rf files"
3541
42+       - adb -s $DEVICEFARM_DEVICE_UDID shell chmod +x /data/local/tmp/minibench/xnn_executor_runner
43+ 
3644  test:
3745    commands:
3846      # By default, the following ADB command is used by Device Farm to run your Instrumentation test.
@@ -117,6 +125,9 @@ phases:
117125          adb -s $DEVICEFARM_DEVICE_UDID shell am start -W -n org.pytorch.minibench/.BenchmarkActivity \
118126            --es "model_dir" "/data/local/tmp/minibench"
119127        fi
128+         adb -s $DEVICEFARM_DEVICE_UDID shell /data/local/tmp/minibench/xnn_executor_runner --model_path /data/local/tmp/minibench/*.pte --prof_result_path /data/local/tmp/prof_result.bin
129+         adb -s $DEVICEFARM_DEVICE_UDID pull /data/local/tmp/prof_result.bin
130+         python -m profiler.profiler_results_cli --prof_results_bin prof_result.bin
120131
121132
122133  post_test:
0 commit comments