blob: 08e12b6a1d077de078058634629970b3a75b3ef0 [file] [log] [blame]
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
steps:
- label: "build"
commands:
- "docker run --user=$(id -u):$(id -g) --volume=\\$PWD:\\$IREE_DOCKER_WORKDIR --workdir=\\$IREE_DOCKER_WORKDIR --rm gcr.io/iree-oss/cmake-android@sha256:15d3266ae4865f7642a4ef4d76e5181f0dc3482a7cfba9021b6b55be524208ec build_tools/kokoro/gcp_ubuntu/cmake/android/build.sh arm64-v8a"
- "gsutil cp gs://iree-model-artifacts/iree-mobile-bert-artifacts-6fe4616e0ab9958eb18f368960a31276f1362029.tar.gz ."
- "tar -xzf iree-mobile-bert-artifacts-6fe4616e0ab9958eb18f368960a31276f1362029.tar.gz"
- "docker run --user=$(id -u):$(id -g) --volume=\\$PWD:\\$IREE_DOCKER_WORKDIR --workdir=\\$IREE_DOCKER_WORKDIR --rm gcr.io/iree-oss/cmake-android@sha256:15d3266ae4865f7642a4ef4d76e5181f0dc3482a7cfba9021b6b55be524208ec build_tools/mako/compile_android_modules.sh --model=tmp/iree/modules/MobileBertSquad/iree_input.mlir --targets=vulkan-spirv,vmla,dylib-llvm-aot --prefix=mobile-bert"
- "tar -czvf model-artifacts.tgz build/iree/tools/iree-benchmark-module mobile-bert-*.vmfb tmp/iree/modules/MobileBertSquad/iree_vmla/traces/serving_default/flagfile"
agents:
- "build=true"
env:
IREE_DOCKER_WORKDIR: "/usr/src/github/iree"
branches: "main"
artifact_paths: "model-artifacts.tgz"
- wait
- label: "benchmark on snapdragon-855 (adreno-640) (Pixel 4)"
commands:
- "buildkite-agent artifact download --step build model-artifacts.tgz ./"
- "tar xzvf model-artifacts.tgz"
- "adb shell mkdir -p /data/local/tmp/benchmark_tmpdir"
- "adb push build/iree/tools/iree-benchmark-module /data/local/tmp/benchmark_tmpdir"
- "adb push mobile-bert-*.vmfb /data/local/tmp/benchmark_tmpdir"
- "adb push tmp/iree/modules/MobileBertSquad/iree_vmla/traces/serving_default/flagfile /data/local/tmp/benchmark_tmpdir"
- "build_tools/mako/benchmark_modules_on_android.sh --targets=vulkan-spirv,vmla,dylib-llvm-aot --benchmark_key=5538704950034432 --model=mobile-bert --git_hash=$(git rev-parse HEAD)"
- "adb shell rm -rf /data/local/tmp/benchmark_tmpdir"
agents:
- "android-soc=snapdragon-855"
- "android-version=11"
- "queue=benchmark-android"
env:
IREE_DOCKER_WORKDIR: "/usr/src/github/iree"
branches: "main"
artifact_paths: "mako-*.log"
timeout_in_minutes: "15"
- label: "benchmark on exynos-990 (S20)"
commands:
- "buildkite-agent artifact download --step build model-artifacts.tgz ./"
- "tar xzvf model-artifacts.tgz"
- "adb shell mkdir -p /data/local/tmp/benchmark_tmpdir"
- "adb push build/iree/tools/iree-benchmark-module /data/local/tmp/benchmark_tmpdir"
- "adb push mobile-bert-*.vmfb /data/local/tmp/benchmark_tmpdir"
- "adb push tmp/iree/modules/MobileBertSquad/iree_vmla/traces/serving_default/flagfile /data/local/tmp/benchmark_tmpdir"
- "build_tools/mako/benchmark_modules_on_android.sh --targets=vulkan-spirv,vmla,dylib-llvm-aot --benchmark_key=4699630718681088 --model=mobile-bert --git_hash=$(git rev-parse HEAD)"
- "adb shell rm -rf /data/local/tmp/benchmark_tmpdir"
agents:
- "android-soc=exynos-990"
- "android-version=10"
- "queue=benchmark-android"
env:
IREE_DOCKER_WORKDIR: "/usr/src/github/iree"
branches: "main"
artifact_paths: "mako-*.log"
timeout_in_minutes: "15"
- wait
- label: "upload data to Mako"
commands:
- "gsutil cp gs://iree-benchmark-artifacts/uploader ."
- "chmod +x uploader"
- "buildkite-agent artifact download mako-*.log ./"
- "ls mako-*.log | xargs -n 1 ./uploader --file_path"
- "rm mako-*.log"
agents:
- "test-android=false"
- "build=false"
- "mako-uploader=true"
- "test-desktop-gpu=false"
branches: "main"