Skip to content

Commit

Permalink
Fix JAX-IREE:CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
mariecwhite committed Jan 9, 2024
1 parent e6a66b0 commit 628374b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 30 deletions.
62 changes: 33 additions & 29 deletions .github/workflows/run_comparative_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ name: Comparative Benchmarks
on:
# Will only run when manually triggered.
workflow_dispatch:
pull_request:

concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
Expand Down Expand Up @@ -189,7 +190,7 @@ jobs:
gcloud storage cp "${RESULTS_PATH}" "${RESULTS_GCS_DIR}/"
benchmark_on_c2-standard-60:
needs: [setup, build_xla_tools]
needs: [setup]
timeout-minutes: 1440
runs-on:
- self-hosted # must come first
Expand All @@ -200,9 +201,12 @@ jobs:
BENCHMARK_GCS_DIR: ${{ needs.setup.outputs.benchmark-gcs-dir }}
RESULTS_DIR: results-dir
TARGET_DEVICE: c2-standard-60
XLA_TOOLS_DIR: ${{ needs.build_xla_tools.outputs.xla-tools-dir }}
XLA_TOOLS_DIR_ARCHIVE: ${{ needs.build_xla_tools.outputs.xla-tools-dir-archive }}
XLA_TOOLS_DIR_GCS_ARTIFACT: ${{ needs.build_xla_tools.outputs.xla-tools-dir-gcs-artifact }}
# XLA_TOOLS_DIR: ${{ needs.build_xla_tools.outputs.xla-tools-dir }}
# XLA_TOOLS_DIR_ARCHIVE: ${{ needs.build_xla_tools.outputs.xla-tools-dir-archive }}
# XLA_TOOLS_DIR_GCS_ARTIFACT: ${{ needs.build_xla_tools.outputs.xla-tools-dir-gcs-artifact }}
XLA_TOOLS_DIR: xla-tools-dir
XLA_TOOLS_DIR_ARCHIVE: xla-tools-dir.tgz
XLA_TOOLS_DIR_GCS_ARTIFACT: gs://openxla-github-actions-presubmit-artifacts/7436462898/1/comparative-benchmark-artifacts/xla-tools-dir.tgz
steps:
- name: "Checking out PR repository"
uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v2.5.0
Expand All @@ -215,31 +219,31 @@ jobs:
run: |
gcloud storage cp "${XLA_TOOLS_DIR_GCS_ARTIFACT}" "${XLA_TOOLS_DIR_ARCHIVE}"
tar -xvf "${XLA_TOOLS_DIR_ARCHIVE}"
- name: "Benchmarking XLA-HLO:CPU"
env:
XLA_HLO_RESULTS_JSON: xla-hlo.json
RESULTS_GCS_DIR: ${{ steps.setup.outputs.results-gcs-dir }}
run: |
RESULTS_PATH="${RESULTS_DIR}/${XLA_HLO_RESULTS_JSON}"
docker run --mount="type=bind,src="${PWD}",target=/work" --workdir="/work" \
--env "OOBI_XLA_TOOLS_DIR=${XLA_TOOLS_DIR}" \
"gcr.io/iree-oss/openxla-benchmark/base-python3.10@sha256:e19b4743fe06d0d779fb8a47e5d37112e1a25319dce8e1f381d73a99ed29dac2" \
./comparative_benchmark/xla_hlo/benchmark_all.sh \
"${TARGET_DEVICE}"\
"${RESULTS_PATH}"
gcloud storage cp "${RESULTS_PATH}" "${RESULTS_GCS_DIR}/"
- name: "Benchmarking JAX-XLA:CPU"
env:
JAX_XLA_RESULTS_JSON: jax-xla.json
RESULTS_GCS_DIR: ${{ steps.setup.outputs.results-gcs-dir }}
run: |
RESULTS_PATH="${RESULTS_DIR}/${JAX_XLA_RESULTS_JSON}"
docker run --mount="type=bind,src="${PWD}",target=/work" --workdir="/work" \
"gcr.io/iree-oss/openxla-benchmark/base-python3.10@sha256:e19b4743fe06d0d779fb8a47e5d37112e1a25319dce8e1f381d73a99ed29dac2" \
./comparative_benchmark/jax/benchmark_xla.sh \
"${TARGET_DEVICE}"\
"${RESULTS_PATH}"
gcloud storage cp "${RESULTS_PATH}" "${RESULTS_GCS_DIR}/"
# - name: "Benchmarking XLA-HLO:CPU"
# env:
# XLA_HLO_RESULTS_JSON: xla-hlo.json
# RESULTS_GCS_DIR: ${{ steps.setup.outputs.results-gcs-dir }}
# run: |
# RESULTS_PATH="${RESULTS_DIR}/${XLA_HLO_RESULTS_JSON}"
# docker run --mount="type=bind,src="${PWD}",target=/work" --workdir="/work" \
# --env "OOBI_XLA_TOOLS_DIR=${XLA_TOOLS_DIR}" \
# "gcr.io/iree-oss/openxla-benchmark/base-python3.10@sha256:e19b4743fe06d0d779fb8a47e5d37112e1a25319dce8e1f381d73a99ed29dac2" \
# ./comparative_benchmark/xla_hlo/benchmark_all.sh \
# "${TARGET_DEVICE}"\
# "${RESULTS_PATH}"
# gcloud storage cp "${RESULTS_PATH}" "${RESULTS_GCS_DIR}/"
# - name: "Benchmarking JAX-XLA:CPU"
# env:
# JAX_XLA_RESULTS_JSON: jax-xla.json
# RESULTS_GCS_DIR: ${{ steps.setup.outputs.results-gcs-dir }}
# run: |
# RESULTS_PATH="${RESULTS_DIR}/${JAX_XLA_RESULTS_JSON}"
# docker run --mount="type=bind,src="${PWD}",target=/work" --workdir="/work" \
# "gcr.io/iree-oss/openxla-benchmark/base-python3.10@sha256:e19b4743fe06d0d779fb8a47e5d37112e1a25319dce8e1f381d73a99ed29dac2" \
# ./comparative_benchmark/jax/benchmark_xla.sh \
# "${TARGET_DEVICE}"\
# "${RESULTS_PATH}"
# gcloud storage cp "${RESULTS_PATH}" "${RESULTS_GCS_DIR}/"
- name: "Benchmarking JAX-IREE:CPU"
env:
JAX_IREE_RESULTS_JSON: jax-iree.json
Expand Down
2 changes: 1 addition & 1 deletion comparative_benchmark/jax/benchmark_iree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ echo "PJRT_NAMES_AND_LIBRARY_PATHS: ${PJRT_NAMES_AND_LIBRARY_PATHS}"
echo "IREE_CUDA_DEPS_DIR: ${IREE_CUDA_DEPS_DIR}"

# Build.
bazel build iree/integrations/pjrt/...
bazel build --copt="-Wno-error=macro-redefined" --copt="-Wno-error=defaulted-function-deleted" iree/integrations/pjrt/...

popd
popd
Expand Down

0 comments on commit 628374b

Please sign in to comment.