Skip to content

Commit 1d841c7

Browse files
authored
Delegate IREE source fetching to shortfin/CMakeLists.txt. (#762)
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
1 parent 922b1c2 commit 1d841c7

5 files changed

+2
-58
lines changed

.github/workflows/ci-libshortfin.yml

-19
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ concurrency:
2525
cancel-in-progress: true
2626

2727
env:
28-
IREE_REPO_DIR: ${{ github.workspace }}/iree
2928
LIBSHORTFIN_DIR: ${{ github.workspace }}/shortfin/
3029

3130
jobs:
@@ -95,23 +94,6 @@ jobs:
9594
with:
9695
toolchain: stable
9796

98-
- name: Checkout IREE repo
99-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
100-
with:
101-
repository: iree-org/iree
102-
path: ${{ env.IREE_REPO_DIR }}
103-
submodules: false
104-
ref: iree-3.1.0rc20241220
105-
106-
- name: Initalize IREE submodules
107-
working-directory: ${{ env.IREE_REPO_DIR }}
108-
run : |
109-
git submodule update --init --depth 1 -- third_party/benchmark
110-
git submodule update --init --depth 1 -- third_party/cpuinfo/
111-
git submodule update --init --depth 1 -- third_party/flatcc
112-
git submodule update --init --depth 1 -- third_party/googletest
113-
git submodule update --init --depth 1 -- third_party/hip-build-deps/
114-
11597
- name: "Setup Python ${{ matrix.python-version }}"
11698
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
11799
with:
@@ -134,7 +116,6 @@ jobs:
134116
cmake -GNinja \
135117
-S. \
136118
-Bbuild \
137-
-DSHORTFIN_IREE_SOURCE_DIR="${{ env.IREE_REPO_DIR }}" \
138119
-DSHORTFIN_BUILD_PYTHON_BINDINGS=ON \
139120
${{matrix.cmake-options}}
140121
cmake --build build --target all

.github/workflows/ci_linux_x64_asan-libshortfin.yml

-19
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ env:
3636
PYTHON_VER: 3.12.7
3737
CACHE_ASAN_VER: 2
3838
CACHE_DEPS_VER: 1
39-
IREE_SOURCE_DIR: ${{ github.workspace }}/iree
4039
LIBSHORTFIN_DIR: ${{ github.workspace }}/shortfin/
4140

4241
jobs:
@@ -100,23 +99,6 @@ jobs:
10099
sudo apt update
101100
sudo apt install clang lld cmake ninja-build
102101
103-
- name: Checkout IREE repo
104-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
105-
with:
106-
repository: iree-org/iree
107-
path: ${{ env.IREE_SOURCE_DIR }}
108-
submodules: false
109-
ref: iree-3.1.0rc20241220
110-
111-
- name: Initalize IREE submodules
112-
working-directory: ${{ env.IREE_SOURCE_DIR }}
113-
run : |
114-
git submodule update --init --depth 1 -- third_party/benchmark
115-
git submodule update --init --depth 1 -- third_party/cpuinfo/
116-
git submodule update --init --depth 1 -- third_party/flatcc
117-
git submodule update --init --depth 1 -- third_party/googletest
118-
git submodule update --init --depth 1 -- third_party/hip-build-deps/
119-
120102
- name: Restore Python dependencies cache
121103
id: cache-python-deps-restore
122104
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
@@ -157,7 +139,6 @@ jobs:
157139
working-directory: ${{ env.LIBSHORTFIN_DIR }}
158140
run: |
159141
eval "$(pyenv init -)"
160-
SHORTFIN_IREE_SOURCE_DIR="${{ env.IREE_SOURCE_DIR }}" \
161142
SHORTFIN_ENABLE_ASAN=ON \
162143
SHORTFIN_DEV_MODE=ON \
163144
SHORTFIN_RUN_CTESTS=ON \

.github/workflows/ci_linux_x64_nogil-libshortfin.yml

-19
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ concurrency:
3232
cancel-in-progress: true
3333

3434
env:
35-
IREE_REPO_DIR: ${{ github.workspace }}/iree
3635
LIBSHORTFIN_DIR: ${{ github.workspace }}/shortfin/
3736

3837
jobs:
@@ -48,23 +47,6 @@ jobs:
4847
sudo apt update
4948
sudo apt install clang lld cmake ninja-build
5049
51-
- name: Checkout IREE repo
52-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
53-
with:
54-
repository: iree-org/iree
55-
path: ${{ env.IREE_REPO_DIR }}
56-
submodules: false
57-
ref: iree-3.1.0rc20241220
58-
59-
- name: Initalize IREE submodules
60-
working-directory: ${{ env.IREE_REPO_DIR }}
61-
run : |
62-
git submodule update --init --depth 1 -- third_party/benchmark
63-
git submodule update --init --depth 1 -- third_party/cpuinfo/
64-
git submodule update --init --depth 1 -- third_party/flatcc
65-
git submodule update --init --depth 1 -- third_party/googletest
66-
git submodule update --init --depth 1 -- third_party/hip-build-deps/
67-
6850
- name: Setup Python
6951
uses: deadsnakes/action@e640ac8743173a67cca4d7d77cd837e514bf98e8 # v3.2.0
7052
with:
@@ -87,7 +69,6 @@ jobs:
8769
-DCMAKE_CXX_COMPILER=clang++-18 \
8870
-DCMAKE_LINKER_TYPE=LLD \
8971
-DSHORTFIN_BUNDLE_DEPS=ON \
90-
-DSHORTFIN_IREE_SOURCE_DIR="${{ env.IREE_REPO_DIR }}" \
9172
-DSHORTFIN_BUILD_PYTHON_BINDINGS=ON
9273
cmake --build build --target all
9374
pip install -v -e build/

shortfin/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
4444
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
4545

4646
# Pins
47+
# Keep in sync with requirements-iree-compiler.txt.
4748
set(SHORTFIN_IREE_GIT_TAG "iree-3.1.0rc20241220")
4849

4950
# build options
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Keep in sync with "ref: iree-" in .github/workflows/* and GIT_TAG in CMakeLists.txt
1+
# Keep in sync with SHORTFIN_IREE_GIT_TAG in CMakeLists.txt
22
-f https://iree.dev/pip-release-links.html
33
iree-base-compiler==3.1.0rc20241204
44
iree-base-runtime==3.1.0rc20241204

0 commit comments

Comments
 (0)