Skip to content

Add warp cache for post-merge - #6809

Merged
kellyguo11 merged 5 commits into
isaac-sim:developfrom
StafaH:mh/warp_cache_try2
Jul 31, 2026
Merged

kellyguo11 merged 5 commits into
isaac-sim:developfrom
StafaH:mh/warp_cache_try2

Conversation

@StafaH

@StafaH StafaH commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Better implementation for the proposed warp cache for faster CI testing. Follows a pattern from the newton repo.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump extension.toml — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@StafaH
StafaH requested a review from a team July 30, 2026 20:09
Comment on lines +810 to +812
if: >-
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
needs.build.result == 'success'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Manual dispatch publishes isolated cache

When a maintainer dispatches this workflow from a non-default branch, the warmer publishes up to 5 GB into that branch's cache scope, which normal pull requests cannot restore and which consumes the repository-wide cache quota.

Suggested change
if: >-
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
needs.build.result == 'success'
if: >-
(github.event_name == 'push' ||
(github.event_name == 'workflow_dispatch' && github.ref_name == github.event.repository.default_branch)) &&
needs.build.result == 'success'

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

{
echo "restore-keys<<EOF"
echo "${scoped}-"
echo "${prefix}-"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Fallback crosses Isaac Sim versions

The broad ${prefix}- fallback omits the Isaac Sim version even though an Isaac Sim upgrade invalidates every Warp kernel, so version transitions download a multi-gigabyte stale cache before recompiling it.

Suggested change
echo "${prefix}-"

@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a shared Warp kernel cache to accelerate containerized CI tests.

  • Introduces a composite action that derives cache keys from runner/GPU properties, the Isaac Sim version, and source content.
  • Mounts restored cache data into test containers and reports cache growth.
  • Adds a dedicated push/manual-dispatch warmer that compiles a representative task set and publishes bounded cache artifacts.
  • Enables cache restoration for the primary Isaac Lab task, core, Newton, and PhysX test jobs.

Confidence Score: 4/5

The branch guard on the cache warmer should be fixed before merging because a non-default-branch manual run can consume substantial shared cache quota with an artifact ordinary pull requests cannot use.

The new caching flow is otherwise internally coordinated, but workflow_dispatch is not restricted to the default branch and the restore prefixes also permit costly cross-version cache downloads.

Files Needing Attention: .github/workflows/build.yaml and .github/actions/warp-cache-key/action.yml

Important Files Changed

Filename Overview
.github/actions/run-package-tests/action.yml Adds cache-key resolution, restoration, coverage reporting, size enforcement, and publication around package tests.
.github/actions/run-tests/action.yml Mounts the selected host cache directory into test containers and verifies that Warp uses it.
.github/actions/warp-cache-key/action.yml Computes GPU-, platform-, version-, and source-aware keys, but its broad fallback can restore invalid cross-version artifacts.
.github/workflows/build.yaml Enables cache restoration and adds the warmer, whose unrestricted manual-dispatch branch selection can publish unusable branch-scoped caches.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Push["Default-branch push or manual dispatch"] --> Warm["warm-warp-cache"]
  Warm --> Compile["Run selected environment tests"]
  Compile --> Save["Publish bounded Warp cache"]
  PR["PR test jobs"] --> Key["Compute version/GPU/source key"]
  Key --> Restore["Restore shared cache"]
  Restore --> Mount["Bind mount as WARP_CACHE_PATH"]
  Mount --> Tests["Run package tests"]
  Tests --> Coverage["Report cache growth"]
Loading

Reviews (1): Last reviewed commit: "Add warp cache for post-merge" | Re-trigger Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

The shared Warp cache plumbing is coherent, but two cache-scope boundaries are broader than documented: manual runs can publish from non-default branches, and restore fallback can select caches from incompatible IsaacSim versions.

  • Design and architecture: Centralizing cache keys and paths in one composite action keeps readers and writers aligned, while clean cache generation and the publication size cap limit uncontrolled growth. However, the unversioned restore fallback defeats the stated IsaacSim/Warp invalidation boundary and can download a multi-gigabyte cache that cannot be reused.
  • API: The new cache inputs are additive and disabled by default, and the host-directory argument is threaded consistently. The documented restriction that save mode is only used on the default branch is not enforced because workflow_dispatch permits arbitrary refs.
  • Implementation: The bind mount, WARP_CACHE_PATH validation, measurement, and success-gated save paths are implemented consistently. Before merge, restrict the warmer's manual-dispatch save path to the default branch and remove the restore prefix that crosses IsaacSim versions; otherwise branch-scoped entries waste repository quota and incompatible restores distort coverage reporting.

Minor fixes needed. Posted 2 actionable findings inline.

Automated review; human maintainers own approval decisions.

continue-on-error: true
needs: [build, config]
if: >-
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning · Implementation — Cache save not restricted to default branch

The warp-cache input documents that save may be used "only on the default branch, since caches written from a pull request are scoped to that pull request". This condition also allows workflow_dispatch, which can be launched from any ref, so a manual run on a feature branch publishes a branch-scoped entry (up to warp-cache-max-mb) that no other run can read while still consuming the repository cache quota and triggering LRU eviction. Add an explicit branch guard on the save path.

{
echo "restore-keys<<EOF"
echo "${scoped}-"
echo "${prefix}-"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Suggestion · Design Architecture — Restore fallback crosses IsaacSim versions

The ${prefix}- fallback omits ISAACSIM_VERSION, contradicting this action's own statement that "a new IsaacSim ships a new Warp and invalidates every kernel". After a version bump, a job downloads a multi-gigabyte cache that Warp cannot reuse, and the non-zero restored size makes the coverage step report "compiled N% beyond the warm cache" instead of a cold run. Keep only the version-scoped ${scoped}- restore prefix.

@kellyguo11
kellyguo11 merged commit 312a9c8 into isaac-sim:develop Jul 31, 2026
73 of 75 checks passed
@StafaH
StafaH deleted the mh/warp_cache_try2 branch August 3, 2026 21:51
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
# Description

Better implementation for the proposed warp cache for faster CI testing.
Follows a pattern from the newton repo.

## Checklist

- [ ] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package (do **not** edit
`CHANGELOG.rst` or bump `extension.toml` — CI handles that)
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants