Repository navigation
Commit 58fee31
committed
[Common] EP overlap: allocate NCCL EP handle scratch at compile time
NCCL EP allocates a group's handle scan scratch lazily, on the first handle
init or import. In a MaxText train step (XLA command buffers with
CUSTOM_CALL) the first overlap call that imports a handle ran inside a CUDA
graph capture, and the allocation failed: "EP combine_gemm_fwd failed: CUDA
error nccl_ep.cc:4370 'operation not permitted when stream is capturing'".
nvte_ep_overlap_compile, which already runs at trace time once per layer
configuration, now opens and closes a handle for the layer configuration
(EPBackend::warm_handle_scratch) so the scratch exists before any captured
call. No behaviour change otherwise.
Measured (4x GB300, DeepSeek-V3 proxy, 1 dense + 4 MoE layers, EP4, FP8 +
MXFP8 MoE, pdb 6, GA 2, command buffers incl. CUSTOM_CALL): before, arm B
failed at the first step; after, it runs (step 0.983 s, same as with
CUSTOM_CALL removed from the command buffers).
Depends on upstream PR NVIDIA#3906.
Signed-off-by: Deep Patel <deepatel@nvidia.com>1 parent 023680c commit 58fee31
3 files changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
344 | 359 | | |
345 | 360 | | |
346 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
639 | 642 | | |
640 | 643 | | |
641 | 644 | | |
| |||
0 commit comments