[TPU Raiden] Backend Tier Extension (Part 3/4): Python Framework Bindings & Integration Tests (JAX & PyTorch) - #942
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
copybara-service
Bot
force-pushed
the
test_983222668
branch
2 times, most recently
from
September 18, 2026 21:42
bd51de7 to
7e0cac7
Compare
…ings & Integration Tests (JAX & PyTorch)
Exposes secondary storage configuration to PyTorch and JAX serving runtimes, enabling end-to-end offload (store.save) and recall (store.load) between KVCacheStore (Coordinator) and KVCacheManager (Worker).
Key changes:
- Native Bindings: Binds BackendConfig, ParallelismConfig, and BlockStatus::SHARED_STORAGE in nanobind (_tpu_raiden_torch, _tpu_raiden_jax) and common.py.
- Worker & Coordinator APIs: Accepts optional backend_configs in PyTorch and JAX KVCacheManager and KVCacheStore, registering backends at initialization.
- JAX NumaAware Support: Forwards D2hWriteToBackend, H2dReadFromBackend, and GetKVBackend across sub-managers.
- E2E TPU Hardware Tests:
- PyTorch (kv_cache_store_mpmd_secondary_storage_e2e_test_gf): 4-rank MPMD test where independent per-rank workers manage shards:
- Writer step: Offloads KV tensors from HBM to storage and verifies per-rank shard directories (tp4_r0..tp4_r3) and .bin files are created.
- Reader step: Discovers on-disk shards, verifies cold lookup returns SHARED_STORAGE, recalls blocks into HBM across 4 TPU chips verifying bit-for-bit correctness, and confirms status promotion to HOST_AND_HBM.
- JAX (kv_cache_store_secondary_storage_e2e_test_gf): Single KVCacheManager managing shards across TPU devices executing the same workflow:
- Writer step: Offloads KV tensors to disk and verifies shard .bin files are created.
- Reader step: Clears cache, verifies cold lookup returns SHARED_STORAGE, recalls blocks from storage, and confirms bit-for-bit tensor restoration on TPU hardware.
PiperOrigin-RevId: 983222668
copybara-service
Bot
force-pushed
the
test_983222668
branch
from
September 18, 2026 21:56
7e0cac7 to
e7d5179
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[TPU Raiden] Backend Tier Extension (Part 3/4): Python Framework Bindings & Integration Tests (JAX & PyTorch)
Exposes secondary storage configuration to PyTorch and JAX serving runtimes, enabling end-to-end offload (store.save) and recall (store.load) between KVCacheStore (Coordinator) and KVCacheManager (Worker).
Key changes: