File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
extension/android/benchmark Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 4
4
pull_request :
5
5
paths :
6
6
- .github/workflows/upload-android-test-specs.yml
7
- - examples/demo-apps/ android/LlamaDemo /android-llm-device-farm-test-spec.yml
7
+ - extension/ android/benchmark /android-llm-device-farm-test-spec.yml
8
8
push :
9
9
branches :
10
10
- main
11
11
paths :
12
12
- .github/workflows/upload-android-test-specs.yml
13
- - examples/demo-apps/ android/LlamaDemo /android-llm-device-farm-test-spec.yml
13
+ - extension/ android/benchmark /android-llm-device-farm-test-spec.yml
14
14
15
15
concurrency :
16
16
group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}
30
30
${{ github.repository }}/${{ github.run_id }}/artifact
31
31
retention-days : 1
32
32
if-no-files-found : error
33
- path : examples/demo-apps/ android/LlamaDemo /android-llm-device-farm-test-spec.yml
33
+ path : extension/ android/benchmark /android-llm-device-farm-test-spec.yml
34
34
35
35
validate-android-test-spec :
36
36
needs : upload-android-test-spec-for-validation
75
75
76
76
- name : Upload the spec to S3 ossci-android bucket
77
77
shell : bash
78
- working-directory : examples/demo-apps/ android/LlamaDemo /
78
+ working-directory : extension/ android/benchmark /
79
79
env :
80
80
SPEC_FILE : android-llm-device-farm-test-spec.yml
81
81
run : |
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ phases:
76
76
# Run the new generic benchmark activity https://developer.android.com/tools/adb#am
77
77
- echo "Run LLM benchmark"
78
78
- |
79
- adb -s $DEVICEFARM_DEVICE_UDID shell am start -W -n com.example.executorchllamademo/.LlmBenchmarkRunner \
79
+ adb -s $DEVICEFARM_DEVICE_UDID shell am start -W -n org.pytorch.minibench/.LlmBenchmarkActivity \
80
80
--es "model_dir" "/data/local/tmp/llama" \
81
81
--es "tokenizer_path" "/data/local/tmp/llama/tokenizer.bin"
82
82
@@ -89,12 +89,12 @@ phases:
89
89
MAX_ATTEMPT=10
90
90
while [ -z "${BENCHMARK_RESULTS}" ] && [ $ATTEMPT -lt $MAX_ATTEMPT ]; do
91
91
echo "Waiting for benchmark results..."
92
- BENCHMARK_RESULTS=$(adb -s $DEVICEFARM_DEVICE_UDID shell run-as com.example.executorchllamademo cat files/benchmark_results.json)
92
+ BENCHMARK_RESULTS=$(adb -s $DEVICEFARM_DEVICE_UDID shell run-as org.pytorch.minibench cat files/benchmark_results.json)
93
93
sleep 30
94
94
((ATTEMPT++))
95
95
done
96
96
97
- adb -s $DEVICEFARM_DEVICE_UDID shell run-as com.example.executorchllamademo ls -la files/
97
+ adb -s $DEVICEFARM_DEVICE_UDID shell run-as org.pytorch.minibench ls -la files/
98
98
# Trying to pull the file using adb ends up with permission error, but this works too, so why not
99
99
echo "${BENCHMARK_RESULTS}" > $DEVICEFARM_LOG_DIR/benchmark_results.json
100
100
You can’t perform that action at this time.
0 commit comments