Skip to content

Commit 8c814fa

Browse files
authored
Merge branch 'main' into include-sharktank
2 parents 415ac3a + 0660b07 commit 8c814fa

17 files changed

+1145
-372
lines changed

.github/workflows/ci-libshortfin.yml

+19-6
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@ name: CI - shortfin
99
on:
1010
workflow_dispatch:
1111
pull_request:
12-
paths:
13-
- '.github/workflows/ci-libshortfin.yml'
14-
- 'shortfin/**'
1512
push:
1613
branches:
1714
- main
18-
paths:
19-
- '.github/workflows/ci-libshortfin.yml'
20-
- 'shortfin/**'
2115

2216
permissions:
2317
contents: read
@@ -152,3 +146,22 @@ jobs:
152146
run: |
153147
ctest --timeout 30 --output-on-failure --test-dir build
154148
pytest -s --durations=10
149+
150+
# Depends on all other jobs to provide an aggregate job status.
151+
ci_libshortfin_summary:
152+
if: always()
153+
runs-on: ubuntu-24.04
154+
needs:
155+
- build-and-test
156+
steps:
157+
- name: Getting failed jobs
158+
run: |
159+
echo '${{ toJson(needs) }}'
160+
FAILED_JOBS="$(echo '${{ toJson(needs) }}' \
161+
| jq --raw-output \
162+
'map_values(select(.result!="success" and .result!="skipped")) | keys | join(",")' \
163+
)"
164+
if [[ "${FAILED_JOBS}" != "" ]]; then
165+
echo "The following jobs failed: ${FAILED_JOBS}"
166+
exit 1
167+
fi

.github/workflows/ci-sharktank.yml

+20
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,23 @@ jobs:
191191
run: |
192192
pytest -v sharktank/ -m punet_quick \
193193
--durations=0
194+
195+
# Depends on other jobs to provide an aggregate job status.
196+
# TODO(#584): move test_with_data and test_integration to a pkgci integration test workflow?
197+
ci_sharktank_summary:
198+
if: always()
199+
runs-on: ubuntu-24.04
200+
needs:
201+
- test
202+
steps:
203+
- name: Getting failed jobs
204+
run: |
205+
echo '${{ toJson(needs) }}'
206+
FAILED_JOBS="$(echo '${{ toJson(needs) }}' \
207+
| jq --raw-output \
208+
'map_values(select(.result!="success" and .result!="skipped")) | keys | join(",")' \
209+
)"
210+
if [[ "${FAILED_JOBS}" != "" ]]; then
211+
echo "The following jobs failed: ${FAILED_JOBS}"
212+
exit 1
213+
fi

sharktank/sharktank/utils/export_artifacts.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def __init__(
9292
iree_hal_target_backends: str,
9393
attention_kernel: str,
9494
tensor_parallelism_size: int,
95+
block_seq_stride: Optional[int] = None,
9596
):
9697
self.sharktank_dir = str(
9798
Path(os.path.dirname(os.path.abspath(__file__))).parent.parent.parent
@@ -102,6 +103,7 @@ def __init__(
102103
self.iree_hal_target_backends = iree_hal_target_backends
103104
self.attention_kernel = attention_kernel
104105
self.tensor_parallelism_size = tensor_parallelism_size
106+
self.block_seq_stride = block_seq_stride
105107

106108
def timeit(func):
107109
def wrapper(*args, **kwargs):
@@ -184,6 +186,8 @@ def export_to_mlir(
184186
if self.attention_kernel in ["decomposed", "torch"]:
185187
export_args.append("--attention-kernel")
186188
export_args.append(self.attention_kernel)
189+
if self.block_seq_stride:
190+
export_args.append(f"--block-seq-stride={self.block_seq_stride}")
187191

188192
cwd = self.sharktank_dir
189193
cmd = subprocess.list2cmdline(export_args)
@@ -280,7 +284,6 @@ def iree_benchmark_vmfb(
280284
benchmark_args += [
281285
"iree-benchmark-module",
282286
"--hip_use_streams=true",
283-
"--hip_allow_inline_execution=true",
284287
"--device_allocator=caching",
285288
f"--module={vmfb_name}",
286289
]

0 commit comments

Comments
 (0)