Skip to content

[XLA:CPU] Optimize StackFrames Proto index access and Dynamically Cap MultiModuleDriver parallel compilation concurrency#44243

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_931295728
Open

[XLA:CPU] Optimize StackFrames Proto index access and Dynamically Cap MultiModuleDriver parallel compilation concurrency#44243
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_931295728

Conversation

@copybara-service

Copy link
Copy Markdown

[XLA:CPU] Optimize StackFrames Proto index access and Dynamically Cap MultiModuleDriver parallel compilation concurrency

  • Rewrote StackFrames::IsPrefix to traverse stack frames directly via .parent_frame_id() protobuf indexes rather than allocating full HloStackFrame structural copies on every hop, resolving extreme compile-time O(N) memory allocation hotspots during call graph metadata propagation.
  • Capped MultiModuleDriver::Compile parallel submodule compilation to dynamically match the dimensions of CompileOptions::thread_pool (or a safe fallback limit of 8 concurrent LLVM compilations) to prevent Out-Of-Memory (OOM) hard freezes and virtual memory thrashing when compiling massively split models (like torax) under FAST_COMPILE.

@copybara-service copybara-service Bot force-pushed the test_931295728 branch 2 times, most recently from 51ce453 to c1d4a6f Compare June 12, 2026 22:35
… MultiModuleDriver parallel compilation concurrency

- Rewrote `StackFrames::IsPrefix` to traverse stack frames directly via `.parent_frame_id()` protobuf indexes rather than allocating full `HloStackFrame` structural copies on every hop, resolving extreme compile-time O(N) memory allocation hotspots during call graph metadata propagation.
- Capped `MultiModuleDriver::Compile` parallel submodule compilation to dynamically match the dimensions of `CompileOptions::thread_pool` (or a safe fallback limit of 8 concurrent LLVM compilations) to prevent Out-Of-Memory (OOM) hard freezes and virtual memory thrashing when compiling massively split models (like `torax`) under `FAST_COMPILE`.

PiperOrigin-RevId: 931295728
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.

1 participant