Skip to content

Commit

Permalink
Delegate IREE source fetching to shortfin/CMakeLists.txt. (#762)
Browse files Browse the repository at this point in the history
This simplification will help with
#760.

Pros:

* Now there are fewer places that use a ref pin
* Workflows are now simpler

Cons: 

* ~~Workflows will be several seconds slower since FetchContent always
fetches all submodules~~
* The `SHORTFIN_IREE_SOURCE_DIR` option is no longer tested
  • Loading branch information
ScottTodd authored Jan 7, 2025
1 parent 922b1c2 commit 1d841c7
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 58 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/ci-libshortfin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ concurrency:
cancel-in-progress: true

env:
IREE_REPO_DIR: ${{ github.workspace }}/iree
LIBSHORTFIN_DIR: ${{ github.workspace }}/shortfin/

jobs:
Expand Down Expand Up @@ -95,23 +94,6 @@ jobs:
with:
toolchain: stable

- name: Checkout IREE repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: iree-org/iree
path: ${{ env.IREE_REPO_DIR }}
submodules: false
ref: iree-3.1.0rc20241220

- name: Initalize IREE submodules
working-directory: ${{ env.IREE_REPO_DIR }}
run : |
git submodule update --init --depth 1 -- third_party/benchmark
git submodule update --init --depth 1 -- third_party/cpuinfo/
git submodule update --init --depth 1 -- third_party/flatcc
git submodule update --init --depth 1 -- third_party/googletest
git submodule update --init --depth 1 -- third_party/hip-build-deps/
- name: "Setup Python ${{ matrix.python-version }}"
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
Expand All @@ -134,7 +116,6 @@ jobs:
cmake -GNinja \
-S. \
-Bbuild \
-DSHORTFIN_IREE_SOURCE_DIR="${{ env.IREE_REPO_DIR }}" \
-DSHORTFIN_BUILD_PYTHON_BINDINGS=ON \
${{matrix.cmake-options}}
cmake --build build --target all
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/ci_linux_x64_asan-libshortfin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ env:
PYTHON_VER: 3.12.7
CACHE_ASAN_VER: 2
CACHE_DEPS_VER: 1
IREE_SOURCE_DIR: ${{ github.workspace }}/iree
LIBSHORTFIN_DIR: ${{ github.workspace }}/shortfin/

jobs:
Expand Down Expand Up @@ -100,23 +99,6 @@ jobs:
sudo apt update
sudo apt install clang lld cmake ninja-build
- name: Checkout IREE repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: iree-org/iree
path: ${{ env.IREE_SOURCE_DIR }}
submodules: false
ref: iree-3.1.0rc20241220

- name: Initalize IREE submodules
working-directory: ${{ env.IREE_SOURCE_DIR }}
run : |
git submodule update --init --depth 1 -- third_party/benchmark
git submodule update --init --depth 1 -- third_party/cpuinfo/
git submodule update --init --depth 1 -- third_party/flatcc
git submodule update --init --depth 1 -- third_party/googletest
git submodule update --init --depth 1 -- third_party/hip-build-deps/
- name: Restore Python dependencies cache
id: cache-python-deps-restore
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
Expand Down Expand Up @@ -157,7 +139,6 @@ jobs:
working-directory: ${{ env.LIBSHORTFIN_DIR }}
run: |
eval "$(pyenv init -)"
SHORTFIN_IREE_SOURCE_DIR="${{ env.IREE_SOURCE_DIR }}" \
SHORTFIN_ENABLE_ASAN=ON \
SHORTFIN_DEV_MODE=ON \
SHORTFIN_RUN_CTESTS=ON \
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/ci_linux_x64_nogil-libshortfin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ concurrency:
cancel-in-progress: true

env:
IREE_REPO_DIR: ${{ github.workspace }}/iree
LIBSHORTFIN_DIR: ${{ github.workspace }}/shortfin/

jobs:
Expand All @@ -48,23 +47,6 @@ jobs:
sudo apt update
sudo apt install clang lld cmake ninja-build
- name: Checkout IREE repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: iree-org/iree
path: ${{ env.IREE_REPO_DIR }}
submodules: false
ref: iree-3.1.0rc20241220

- name: Initalize IREE submodules
working-directory: ${{ env.IREE_REPO_DIR }}
run : |
git submodule update --init --depth 1 -- third_party/benchmark
git submodule update --init --depth 1 -- third_party/cpuinfo/
git submodule update --init --depth 1 -- third_party/flatcc
git submodule update --init --depth 1 -- third_party/googletest
git submodule update --init --depth 1 -- third_party/hip-build-deps/
- name: Setup Python
uses: deadsnakes/action@e640ac8743173a67cca4d7d77cd837e514bf98e8 # v3.2.0
with:
Expand All @@ -87,7 +69,6 @@ jobs:
-DCMAKE_CXX_COMPILER=clang++-18 \
-DCMAKE_LINKER_TYPE=LLD \
-DSHORTFIN_BUNDLE_DEPS=ON \
-DSHORTFIN_IREE_SOURCE_DIR="${{ env.IREE_REPO_DIR }}" \
-DSHORTFIN_BUILD_PYTHON_BINDINGS=ON
cmake --build build --target all
pip install -v -e build/
Expand Down
1 change: 1 addition & 0 deletions shortfin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

# Pins
# Keep in sync with requirements-iree-compiler.txt.
set(SHORTFIN_IREE_GIT_TAG "iree-3.1.0rc20241220")

# build options
Expand Down
2 changes: 1 addition & 1 deletion shortfin/requirements-iree-compiler.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Keep in sync with "ref: iree-" in .github/workflows/* and GIT_TAG in CMakeLists.txt
# Keep in sync with SHORTFIN_IREE_GIT_TAG in CMakeLists.txt
-f https://iree.dev/pip-release-links.html
iree-base-compiler==3.1.0rc20241204
iree-base-runtime==3.1.0rc20241204

0 comments on commit 1d841c7

Please sign in to comment.