Skip to content

Treat incomplete cache groups as misses - #10411

Merged
Jokeren merged 1 commit into
triton-lang:mainfrom
yinli-systems:kevin/cache-group-integrity
May 29, 2026
Merged

Jokeren merged 1 commit into
triton-lang:mainfrom
yinli-systems:kevin/cache-group-integrity

Conversation

@yinli-systems

Copy link
Copy Markdown
Contributor

New contributor declaration

  • I am not making a trivial change, such as fixing a typo in a comment.

  • I have written a PR description following these rules.

  • I have run pre-commit run --from-ref origin/main --to-ref HEAD.

  • Select one of the following.

    • I have added tests.
      • /test for lit tests
      • /unittest for C++ tests
      • /python/test for end-to-end tests
    • This PR does not need a test because FILL THIS IN.
  • Select one of the following.

    • I have not added any lit tests.
    • The lit tests I have added follow these best practices,
      including the "tests should be minimal" section. (Usually running Python code
      and using the instructions it generates is not minimal.)

Summary

Make local and remote cache group reads reject incomplete groups instead of returning a partial mapping. A partial group can make compilation treat a corrupted cache entry as a cache hit, only to fail later when loading the missing binary or IR artifact.

What changed

  • Return None from FileCacheManager.get_group() if any recorded child path is missing.
  • Return None from RemoteCacheManager.get_group() if the remote backend does not return all recorded children.
  • Add regression coverage for both local and remote cache managers.

Testing

  • pre-commit run --from-ref origin/main --to-ref HEAD
  • Added Python unit coverage in python/test/unit/runtime/test_cache.py

@yinli-systems
yinli-systems requested a review from ptillet as a code owner May 29, 2026 03:06
@yinli-systems

Copy link
Copy Markdown
Contributor Author

Thanks for the review and approval. CI is green now and the branch is clean. Could a maintainer please merge this when convenient?

@Jokeren
Jokeren merged commit 83adb20 into triton-lang:main May 29, 2026
10 checks passed
ngocson2vn pushed a commit to ngocson2vn/triton that referenced this pull request Jul 5, 2026
# New contributor declaration
- [x] I am not making a trivial change, such as fixing a typo in a
comment.

- [x] I have written a PR description following these
[rules](https://cbea.ms/git-commit/#why-not-how).

- [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`.

- Select one of the following.
  - [x] I have added tests.
    - `/test` for `lit` tests
    - `/unittest` for C++ tests
    - `/python/test` for end-to-end tests
  - [ ] This PR does not need a test because `FILL THIS IN`.

- Select one of the following.
  - [x] I have not added any `lit` tests.
- [ ] The `lit` tests I have added follow these [best
practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices),
including the "tests should be minimal" section. (Usually running Python
code
    and using the instructions it generates is not minimal.)

## Summary

Make local and remote cache group reads reject incomplete groups instead
of returning a partial mapping. A partial group can make compilation
treat a corrupted cache entry as a cache hit, only to fail later when
loading the missing binary or IR artifact.

## What changed

- Return `None` from `FileCacheManager.get_group()` if any recorded
child path is missing.
- Return `None` from `RemoteCacheManager.get_group()` if the remote
backend does not return all recorded children.
- Add regression coverage for both local and remote cache managers.

## Testing

- `pre-commit run --from-ref origin/main --to-ref HEAD`
- Added Python unit coverage in `python/test/unit/runtime/test_cache.py`

Co-authored-by: Kevin-Li-2025 <[email protected]>
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