Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into ci-python-runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottTodd committed May 20, 2024
2 parents 91cc366 + dc61fcc commit 0166b2e
Show file tree
Hide file tree
Showing 3,019 changed files with 161,856 additions and 106,412 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.0
6.5.0
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@
# Avoid duplicating dependency requirement information
!runtime/bindings/python/iree/runtime/build_requirements.txt
!integrations/tensorflow/test/requirements.txt
# Share Swiftshader installation script with user instructions
!build_tools/third_party/swiftshader/build_vk_swiftshader.sh
# Keep the Bazel version in only one place
!.bazelversion
24 changes: 13 additions & 11 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,13 @@
# Experimental
# It's experimental, but we still don't want any old directory added here.
/experimental/ @benvanik @stellaraccident
/experimental/cpu_ukernel/ @bjacob
/experimental/cuda2/ @antiagainst
/experimental/dispatch_profiler/ @manishucsd
/experimental/rocm/ @benvanik
/experimental/web/ @ScottTodd
/experimental/webgpu/ @benvanik @ScottTodd

# Infra Top-Level Directories
/build_tools/ @ScottTodd @pzread
/build_tools/benchmarks/ @antiagainst @pzread
/build_tools/python/ @pzread
/build_tools/ @ScottTodd
/build_tools/benchmarks/ @antiagainst
/build_tools/python_deploy/ @stellaraccident
/build_tools/scripts/ @ScottTodd
/build_tools/third_party/ @ScottTodd @stellaraccident
Expand All @@ -51,8 +47,6 @@
# llvm-external-projects
/llvm-external-projects/ @stellaraccident
/llvm-external-projects/iree-dialects/ @MaheshRavishankar
/llvm-external-projects/iree-dialects/**/Dialect/LinalgExt/ @hanhanW @MaheshRavishankar
/llvm-external-projects/iree-dialects/test/iree_linalgext @hanhanW @MaheshRavishankar

# Other Top-Level Directories
/docs/ @ScottTodd
Expand All @@ -64,20 +58,28 @@
/compiler/src/iree/compiler/Codegen/ @MaheshRavishankar
/compiler/src/iree/compiler/Codegen/Common @hanhanW @dcaballe
/compiler/src/iree/compiler/Codegen/Common/GPU @antiagainst @qedawkins
/compiler/src/iree/compiler/Codegen/Dialect/GPU @antiagainst @qedawkins
/compiler/src/iree/compiler/Codegen/LLVMCPU/ @dcaballe @hanhanW @MaheshRavishankar
/compiler/src/iree/compiler/Codegen/LLVMGPU/ @MaheshRavishankar
/compiler/src/iree/compiler/Codegen/SPIRV/ @antiagainst @MaheshRavishankar
/compiler/src/iree/compiler/Codegen/LLVMGPU/ @MaheshRavishankar @qedawkins @kuhar
/compiler/src/iree/compiler/Codegen/SPIRV/ @antiagainst @MaheshRavishankar @kuhar
/compiler/src/iree/compiler/Codegen/TransformStrategies/ @qedawkins @MaheshRavishankar
/compiler/src/iree/compiler/ConstEval/ @hanhanW @stellaraccident
/compiler/src/iree/compiler/Dialect/Flow/ @hanhanW @MaheshRavishankar
/compiler/src/iree/compiler/Dialect/Vulkan/ @antiagainst
/compiler/src/iree/compiler/Dialect/LinalgExt/ @hanhanW @MaheshRavishankar
/compiler/src/iree/compiler/Dialect/Vulkan/ @antiagainst @kuhar
/compiler/src/iree/compiler/GlobalOptimization/ @hanhanW
/compiler/src/iree/compiler/InputConversion/ @MaheshRavishankar @stellaraccident
/compiler/src/iree/compiler/Preprocessing/ @qedawkins @MaheshRavishankar

# Compiler Plugins
/compiler/plugins/input/StableHLO/ @hanhanW @MaheshRavishankar @rsuderman
/compiler/plugins/input/TOSA/ @MaheshRavishankar @rsuderman
/compiler/plugins/target/ROCM/ @kuhar

# Runtime
/runtime/src/iree/ @benvanik
/runtime/src/iree/hal/cts/ @ScottTodd
/runtime/src/iree/hal/drivers/cuda/ @antiagainst
/runtime/src/iree/hal/drivers/hip/ @antiagainst @nithinsubbiah
/runtime/src/iree/hal/drivers/metal/ @antiagainst
/runtime/src/iree/hal/drivers/vulkan/ @antiagainst @ScottTodd
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
value: |
:star2: Thanks for taking the time to report this issue! :star2:
Please search through [other recent issues](https://github.com/openxla/iree/issues) to see if your report overlaps with an existing issue.
Please search through [other recent issues](https://github.com/iree-org/iree/issues) to see if your report overlaps with an existing issue.
- type: textarea
id: what-happened
attributes:
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
blank_issues_enabled: true
contact_links:
- name: 📄 Blank Issue
url: https://github.com/openxla/iree/issues/new
url: https://github.com/iree-org/iree/issues/new
about: If you know what you're doing (especially collaborators)
- name: 📧 Send an email to our mailing list
url: https://groups.google.com/forum/#!forum/iree-discuss
about: For announcements and asynchronous discussion
- name: 🗣 Start a discussion on GitHub
url: https://github.com/openxla/iree/discussions
url: https://github.com/iree-org/iree/discussions
about: An alternative platform for asynchronous discussion
- name: 💬 Join us on Discord
url: https://discord.gg/26P4xW4
url: https://discord.gg/wEWh6Z9nMU
about: For realtime communication with the team and collaborators
4 changes: 4 additions & 0 deletions .github/dco.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Developer Certificate of Origin configuration
# https://github.com/dcoapp/app
require:
members: false
6 changes: 3 additions & 3 deletions .github/workflows/ARTIFACT_SUMMARY_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

```sh
# Compiler and host tools archive:
export BUILD_DIR_URL="${BUILD_DIR_GCS_ARTIFACT}"
export INSTALL_DIR_URL="${INSTALL_DIR_GCS_ARTIFACT}"
# Directory of e2e test artifacts:
export E2E_TEST_ARTIFACTS_DIR_URL="${E2E_TEST_ARTIFACTS_GCS_ARTIFACT_DIR}"
# Directory of benchmark tool binaries:
export BENCHMARK_TOOLS_DIR_URL="${BENCHMARK_TOOLS_GCS_ARTIFACT_DIR}"
# Directory of execution benchmark results and traces:
# Directory of execution benchmark results:
export EXECUTION_BENCHMARK_RESULTS_DIR_URL="${EXECUTION_BENCHMARK_RESULTS_GCS_ARTIFACT_DIR}"
# Compilation benchmark results:
export COMPILATION_BENCHMARK_RESULTS_URL="${COMPILATION_BENCHMARK_RESULTS_GCS_ARTIFACT}"
Expand Down Expand Up @@ -37,7 +37,7 @@ gcloud storage cp -r "${E2E_TEST_ARTIFACTS_GCS_ARTIFACT_DIR}/*" /tmp/iree_e2e_te
```

```sh
# Download execution benchmark results and traces
# Download execution benchmark results
mkdir /tmp/iree_benchmark_results
gcloud storage cp -r "${EXECUTION_BENCHMARK_RESULTS_GCS_ARTIFACT_DIR}/*" /tmp/iree_benchmark_results
```
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/benchmark_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ on:
GCS path to the uploaded compilation benchmark results.
value: ${{ jobs.compilation_benchmarks.outputs.compile-stats-results-gcs-artifact }}

permissions:
contents: read

env:
# This duplicates the variable from ci.yml. The variable needs to be in env
# instead of the outputs of setup because it contains the run attempt and we
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/benchmark_execution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ on:
Empty if no benchmark runs.
value: ${{ jobs.run_benchmarks.outputs.benchmark-results-gcs-artifact-dir }}

permissions:
contents: read

env:
# This duplicates the variable from ci.yml. The variable needs to be in env
# instead of the outputs of setup because it contains the run attempt and we
Expand Down Expand Up @@ -160,9 +163,7 @@ jobs:
BENCHMARK_TOOLS_DIR: ${{ env.PLATFORM_ARCH }}-benchmark-tools-dir
run: |
tar -xf ${BENCHMARK_TOOLS_ARCHIVE}
echo "normal-benchmark-tools-dir=${BENCHMARK_TOOLS_DIR}/build/tools" >> "${GITHUB_OUTPUT}"
echo "traced-benchmark-tools-dir=${BENCHMARK_TOOLS_DIR}/build-traced/tools" >> "${GITHUB_OUTPUT}"
echo "tracy-capture-tool=${BENCHMARK_TOOLS_DIR}/build-traced/tracy-capture" >> "${GITHUB_OUTPUT}"
echo "benchmark-tools-dir=${BENCHMARK_TOOLS_DIR}/build/tools" >> "${GITHUB_OUTPUT}"
- name: "Determine Shard Suffix"
id: sharding
run: |
Expand All @@ -175,13 +176,10 @@ jobs:
env:
IREE_EXECUTION_BENCHMARK_CONFIG: ${{ steps.download-assets.outputs.benchmark-config }}
IREE_DOCKER_WRAPPER: ./build_tools/github_actions/docker_run.sh
IREE_NORMAL_BENCHMARK_TOOLS_DIR: ${{ steps.unpack-tools.outputs.normal-benchmark-tools-dir }}
IREE_TRACED_BENCHMARK_TOOLS_DIR: ${{ steps.unpack-tools.outputs.traced-benchmark-tools-dir }}
IREE_TRACY_CAPTURE_TOOL: ${{ steps.unpack-tools.outputs.tracy-capture-tool }}
IREE_BENCHMARK_TOOLS_DIR: ${{ steps.unpack-tools.outputs.benchmark-tools-dir }}
IREE_TARGET_DEVICE_NAME: ${{ env.DEVICE_NAME }}
IREE_SHARD_INDEX: ${{ matrix.benchmark.shard.index }}
IREE_BENCHMARK_RESULTS: ${{ env.BENCHMARK_RESULTS_DIR }}/benchmark-results-${{ matrix.benchmark.device_name }}${{ steps.sharding.outputs.suffix }}.json
IREE_BENCHMARK_TRACES: ${{ env.BENCHMARK_RESULTS_DIR }}/benchmark-traces-${{ matrix.benchmark.device_name }}${{ steps.sharding.outputs.suffix }}.tar.gz
run: |
mkdir -p ${BENCHMARK_RESULTS_DIR}
export IREE_E2E_TEST_ARTIFACTS_DIR="${E2E_TEST_ARTIFACTS_GCS_ARTIFACT_DIR/gs:\/\//https://storage.googleapis.com/}"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/benchmark_large.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ jobs:
with:
runner-group: ${{ needs.setup.outputs.runner-group }}
runner-env: ${{ needs.setup.outputs.runner-env }}
build-dir: ${{ needs.build_all.outputs.build-dir }}
build-dir-archive: ${{ needs.build_all.outputs.build-dir-archive }}
build-dir-gcs-artifact: ${{ needs.build_all.outputs.build-dir-gcs-artifact }}
install-dir: ${{ needs.build_all.outputs.install-dir }}
install-dir-archive: ${{ needs.build_all.outputs.install-dir-archive }}
install-dir-gcs-artifact: ${{ needs.build_all.outputs.install-dir-gcs-artifact }}

build_e2e_test_artifacts:
needs: [setup, build_all]
Expand All @@ -70,9 +70,9 @@ jobs:
with:
runner-group: ${{ needs.setup.outputs.runner-group }}
runner-env: ${{ needs.setup.outputs.runner-env }}
build-dir: ${{ needs.build_all.outputs.build-dir }}
build-dir-archive: ${{ needs.build_all.outputs.build-dir-archive }}
build-dir-gcs-artifact: ${{ needs.build_all.outputs.build-dir-gcs-artifact }}
install-dir: ${{ needs.build_all.outputs.install-dir }}
install-dir-archive: ${{ needs.build_all.outputs.install-dir-archive }}
install-dir-gcs-artifact: ${{ needs.build_all.outputs.install-dir-gcs-artifact }}
benchmark-presets: cuda-large,comp-stats-large,x86_64-large
build-default-benchmark-suites: 0
# Please keep the shard count default value in sync with on.workflow_dispatch.shard-count.default
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: Benchmark Trigger
# When a benchmark label is added, this cancels and then re-runs the CI
# workflow. When the workflow is re-run, it will pick up the latest PR
# description and labels. See
# https://github.com/openxla/iree/issues/10042#issuecomment-1449250094 for
# https://github.com/iree-org/iree/issues/10042#issuecomment-1449250094 for
# more background.
#
# This workflow is running on the base branch the PR targets.
Expand Down
103 changes: 57 additions & 46 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,21 @@ on:
required: true
type: string
outputs:
build-dir:
description: |
Local path that stores compiled artifacts.
value: ${{ jobs.build_all.outputs.build-dir }}
build-dir-archive:
description: |
Local path to the zipped build directory.
value: ${{ jobs.build_all.outputs.build-dir-archive }}
build-dir-gcs-artifact:
description: |
GCS path to the uploaded build archive.
value: ${{ jobs.build_all.outputs.build-dir-gcs-artifact }}
install-dir:
description: Local install directory path.
value: ${{ jobs.build_all.outputs.install-dir }}
install-dir-archive:
description: Name of the zipped install directory.
value: ${{ jobs.build_all.outputs.install-dir-archive }}
install-dir-gcs-artifact:
description: GCS path to the uploaded install archive.
value: ${{ jobs.build_all.outputs.install-dir-gcs-artifact }}
install-dir-gcs-url:
description: GCS URL of the uploaded install archive.
value: ${{ jobs.build_all.outputs.install-dir-gcs-url }}

permissions:
contents: read

env:
# This duplicates the variable from ci.yml. The variable needs to be in env
Expand All @@ -42,6 +45,7 @@ env:
# last ran in. It therefore can't be passed in via inputs because the env
# context isn't available there.
GCS_DIR: gs://iree-github-actions-${{ github.event_name == 'pull_request' && 'presubmit' || 'postsubmit' }}-artifacts/${{ github.run_id }}/${{ github.run_attempt }}
GCS_URL: https://storage.googleapis.com/iree-github-actions-${{ github.event_name == 'pull_request' && 'presubmit' || 'postsubmit' }}-artifacts/${{ github.run_id }}/${{ github.run_attempt }}

jobs:
build_all:
Expand All @@ -53,12 +57,17 @@ jobs:
- os-family=Linux
env:
BUILD_DIR: full-build-dir
INSTALL_DIR: full-build-dir/install
outputs:
# Pass through the build directory as output so it's available to
# dependent jobs.
build-dir: ${{ env.BUILD_DIR }}
build-dir-archive: ${{ steps.archive.outputs.build-dir-archive }}
build-dir-gcs-artifact: ${{ steps.upload.outputs.build-dir-gcs-artifact }}
install-dir: ${{ env.INSTALL_DIR }}
# Pass the install directory as output for other jobs to use.
# TODO(#16203): replace this with iree-dist packages
# The install directory provides a similar set of files and existing
# jobs are already configured to use the build directory, so this is
# an intermediate step towards a fully package-based CI setup.
install-dir-archive: ${{ steps.install-archive.outputs.install-dir-archive }}
install-dir-gcs-artifact: ${{ steps.install-upload.outputs.install-dir-gcs-artifact }}
install-dir-gcs-url: ${{ steps.install-upload.outputs.install-dir-gcs-url }}
steps:
- name: "Checking out repository"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
Expand All @@ -71,38 +80,40 @@ jobs:
./build_tools/github_actions/docker_run.sh \
--env "IREE_CCACHE_GCP_TOKEN=$(gcloud auth application-default print-access-token)" \
--env "IREE_WRITE_REMOTE_CCACHE=${IREE_WRITE_REMOTE_CCACHE}" \
--env "CCACHE_NAMESPACE=gcr.io/iree-oss/base@sha256:796fb81a11ff7e7d057c93de468b74e48b6a9641aa19b7f7673c2772e8ea3b33" \
gcr.io/iree-oss/base@sha256:796fb81a11ff7e7d057c93de468b74e48b6a9641aa19b7f7673c2772e8ea3b33 \
./build_tools/cmake/build_all.sh \
"${BUILD_DIR}"
# The archive step below doesn't include these files. Remove them first to
# save disk space.
# TODO(#10739): This step can be removed once we enlarge the disk sapce.
- name: "Removing unused files"
--env "CCACHE_NAMESPACE=gcr.io/iree-oss/base@sha256:dc314b4fe30fc1315742512891357bffed4d1b62ffcb46258b1e0761c737b446" \
--env "IREE_BUILD_SETUP_PYTHON_VENV=${BUILD_DIR}/.venv" \
gcr.io/iree-oss/base@sha256:dc314b4fe30fc1315742512891357bffed4d1b62ffcb46258b1e0761c737b446 \
./build_tools/cmake/build_all.sh "${BUILD_DIR}"
# TODO(scotttodd): trim build/tests to exclude integration tests (tests/ folder, check tests)
# that coverage should move to a test_cpu job (matrix with test_gpu?)
- name: "Testing IREE"
run: |
./build_tools/github_actions/docker_run.sh \
gcr.io/iree-oss/base@sha256:dc314b4fe30fc1315742512891357bffed4d1b62ffcb46258b1e0761c737b446 \
./build_tools/cmake/ctest_all.sh "${BUILD_DIR}"
- name: "Testing iree-dialects"
run: |
find "${BUILD_DIR}" -type f -name "*.a" -o -type f -name "*.o" \
-print \
-delete
# Things get more complicated here than when we're just building the
# runtime. The build directory is way bigger. We're also using on our own
# runners on GCE. So uploading to GitHub actions artifact storage hosted
# on Azure is dirt slow. We drop static libraries and object files, which
# aren't needed for testing. Then we do some minimal compression locally
# *in parallel* and upload to GCS. This can be further optimized.
# Especially decompression is still pretty slow. See #9881.
- name: "Creating build dir archive"
id: archive
./build_tools/github_actions/docker_run.sh \
gcr.io/iree-oss/base@sha256:dc314b4fe30fc1315742512891357bffed4d1b62ffcb46258b1e0761c737b446 \
./build_tools/cmake/test_iree_dialects.sh "${BUILD_DIR}"
# TODO(#16203): If this (or iree-dist) is small enough, just use GitHub
# artifacts instead of `tar` commands and GCS
- name: "Creating install dir archive"
id: install-archive
env:
BUILD_DIR_ARCHIVE: ${{ env.BUILD_DIR }}.tar.zst
INSTALL_DIR_ARCHIVE: install_dir.tar.zst
run: |
tar -I 'zstd -T0' \
-cf ${BUILD_DIR_ARCHIVE} ${BUILD_DIR}
echo "build-dir-archive=${BUILD_DIR_ARCHIVE}" >> "${GITHUB_OUTPUT}"
- name: "Uploading build dir archive"
id: upload
-cf ${INSTALL_DIR_ARCHIVE} ${INSTALL_DIR}
echo "install-dir-archive=${INSTALL_DIR_ARCHIVE}" >> "${GITHUB_OUTPUT}"
- name: "Uploading install dir archive"
id: install-upload
env:
BUILD_DIR_ARCHIVE: ${{ steps.archive.outputs.build-dir-archive }}
BUILD_DIR_GCS_ARTIFACT: ${{ env.GCS_DIR }}/${{ steps.archive.outputs.build-dir-archive }}
INSTALL_DIR_ARCHIVE: ${{ steps.install-archive.outputs.install-dir-archive }}
INSTALL_DIR_GCS_ARTIFACT: ${{ env.GCS_DIR }}/${{ steps.install-archive.outputs.install-dir-archive }}
INSTALL_DIR_GCS_URL: ${{ env.GCS_URL }}/${{ steps.install-archive.outputs.install-dir-archive }}
run: |
gcloud storage cp "${BUILD_DIR_ARCHIVE}" "${BUILD_DIR_GCS_ARTIFACT}"
echo "build-dir-gcs-artifact=${BUILD_DIR_GCS_ARTIFACT}" >> "${GITHUB_OUTPUT}"
gcloud storage cp "${INSTALL_DIR_ARCHIVE}" "${INSTALL_DIR_GCS_ARTIFACT}"
echo "install-dir-gcs-artifact=${INSTALL_DIR_GCS_ARTIFACT}" >> "${GITHUB_OUTPUT}"
echo "install-dir-gcs-url=${INSTALL_DIR_GCS_URL}" >> "${GITHUB_OUTPUT}"
Loading

0 comments on commit 0166b2e

Please sign in to comment.