Skip to content

Commit

Permalink
Run benchmarks on Pixel-8-Pro
Browse files Browse the repository at this point in the history
  • Loading branch information
mariecwhite committed Dec 12, 2023
1 parent 14533a8 commit ca9244f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/run_mobile_comparative_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ jobs:
- os-family=Linux
env:
BENCHMARK_ARTIFACTS_DIR: android-benchmark-artifacts-dir
TARGET_DEVICE: pixel-6-pro
TARGET_DEVICE: pixel-8-pro
IREE_INSTALL_DIR: ${{ needs.build_iree.outputs.iree-install-dir }}
IREE_INSTALL_DIR_ARCHIVE: ${{ needs.build_iree.outputs.iree-install-dir-archive }}
IREE_INSTALL_DIR_GCS_ARTIFACT: ${{ needs.build_iree.outputs.iree-install-dir-gcs-artifact }}
Expand Down Expand Up @@ -364,17 +364,17 @@ jobs:
echo "benchmark-artifacts-dir-gcs-artifact=${BENCHMARK_ARTIFACTS_DIR_GCS_ARTIFACT}" >> "${GITHUB_OUTPUT}"
benchmark_on_pixel-6-pro:
benchmark_on_pixel-8-pro:
needs: [setup, build_iree, compile_models_for_android, build_tflite]
runs-on:
- self-hosted # must come first
- runner-group=${{ needs.setup.outputs.runner-group }}
- environment=prod
- machine-type=pixel-6-pro
- machine-type=pixel-8-pro
env:
BENCHMARK_GCS_DIR: ${{ needs.setup.outputs.benchmark-gcs-dir }}
RESULTS_DIR: results-dir
TARGET_DEVICE: pixel-6-pro
TARGET_DEVICE: pixel-8-pro
IREE_ANDROID_TOOLS_DIR: ${{ needs.build_iree.outputs.iree-android-tools-dir }}
IREE_ANDROID_TOOLS_DIR_ARCHIVE: ${{ needs.build_iree.outputs.iree-android-tools-dir-archive }}
IREE_ANDROID_TOOLS_DIR_GCS_ARTIFACT: ${{ needs.build_iree.outputs.iree-android-tools-dir-gcs-artifact }}
Expand Down
2 changes: 1 addition & 1 deletion experimental/iree/benchmark_iree_android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fi
"${TD}/../../comparative_benchmark/scripts/create_results_json.sh" "${OUTPUT_PATH}"

# A num_threads to cpu_ids map. We use the biggest cores for each configuration.
THREAD_CONFIG="{1: '0', 4: '0,1,2,3'}"
THREAD_CONFIG="{1: '0', 4: '1,2,3,4', 5: '0,1,2,3,4'}"

"${TD}/run_benchmarks.py" \
--target_device="${TARGET_DEVICE}" \
Expand Down
2 changes: 1 addition & 1 deletion experimental/iree/compile_workloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

IREE_COMPILE_COMMON_FLAGS = [
"--iree-hal-target-backends=llvm-cpu",
"--iree-llvmcpu-link-embedded=false",
"--iree-llvmcpu-link-embedded=true",
"--iree-input-demote-f64-to-f32=false",
"--iree-input-demote-i64-to-i32=false",
"--iree-llvmcpu-debug-symbols=false",
Expand Down
2 changes: 2 additions & 0 deletions experimental/iree/compile_workloads.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ if [ "${TARGET_DEVICE_NAME}" = "c2-standard-60" ]; then
BENCHMARK_NAMES=("${CASCADE_LAKE_BENCHMARKS[@]}")
elif [ "${TARGET_DEVICE_NAME}" = "pixel-6-pro" ]; then
BENCHMARK_NAMES=("${ANDROID_BENCHMARKS[@]}")
elif [ "${TARGET_DEVICE_NAME}" = "pixel-8-pro" ]; then
BENCHMARK_NAMES=("${ANDROID_BENCHMARKS[@]}")
else
echo "Unsupported target device ${TARGET_DEVICE}."
exit 1
Expand Down
5 changes: 4 additions & 1 deletion experimental/tflite/benchmark_tflite_android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ declare -a BENCHMARK_NAMES=(

# Thread-to-taskset config. Here we run 1 thread on the largest core, and 4 threads on the 4 largest (2 big, 2 medium) cores.
# Assumes the benchmarks run on Pixel-6-Pro.
THREAD_CONFIG="{1: '80', 4: 'F0'}"
THREAD_CONFIG="{1: '80', 4: 'F0', 5: '1F0'}"
ITERATIONS=5

for benchmark_name in "${BENCHMARK_NAMES[@]}"; do
Expand All @@ -83,3 +83,6 @@ for benchmark_name in "${BENCHMARK_NAMES[@]}"; do
--root_dir="${ROOT_DIR}" \
--verbose
done

# Cleanup.
adb shell rm -rf "${ROOT_DIR}"

0 comments on commit ca9244f

Please sign in to comment.