Skip to content

[CI] Share MLIR cache across GPU jobs#890

Merged
coderfeli merged 2 commits into
ROCm:mainfrom
Phil-amd:ci/main-only-mlir-cache
Jul 24, 2026
Merged

[CI] Share MLIR cache across GPU jobs#890
coderfeli merged 2 commits into
ROCm:mainfrom
Phil-amd:ci/main-only-mlir-cache

Conversation

@Phil-amd

@Phil-amd Phil-amd commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

  • use a stable MLIR cache key derived from platform, an explicit environment version, the LLVM revision, and the LLVM build script
  • add a prepare-mlir job that builds LLVM once on a cold miss and validates the result with a FlyDSL build
  • persist the shared cache only from main; use a one-day workflow artifact to fan out cold PR builds
  • make single- and multi-GPU jobs restore the shared cache or consume the prepared artifact instead of compiling LLVM independently

Why

The previous key included the full workflow and the runner label. Unrelated workflow edits invalidated the cache, while each GPU runner and PR produced a separate approximately 2.1 GB entry. Those scoped copies consumed cache capacity and could evict the reusable main-branch cache.

Test plan

  • Run actionlint on .github/workflows/flydsl.yaml
  • Confirm a cold PR run compiles LLVM only in prepare-mlir
  • Confirm GPU matrix jobs consume the prepared artifact and do not compile LLVM
  • After merge, confirm main saves the shared cache and a subsequent PR hits it

@Phil-amd
Phil-amd force-pushed the ci/main-only-mlir-cache branch from fa0a93b to 19802d8 Compare July 23, 2026 09:53
@Phil-amd Phil-amd mentioned this pull request Jul 23, 2026
2 tasks
Build LLVM once on cache misses and persist reusable caches only from main.
@Phil-amd
Phil-amd force-pushed the ci/main-only-mlir-cache branch from 19802d8 to a5f8236 Compare July 23, 2026 10:27
@Phil-amd Phil-amd changed the title [CI] Save MLIR caches only from main [CI] Share MLIR cache across GPU jobs Jul 23, 2026
@coderfeli
coderfeli requested a review from gyohuangxin July 23, 2026 10:31
@coderfeli
coderfeli merged commit 6e935ee into ROCm:main Jul 24, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants