[JAX] Warmup FFIs with "initialize" stage#2800
Draft
jberchtold-nvidia wants to merge 2 commits intoNVIDIA:mainfrom
Draft
[JAX] Warmup FFIs with "initialize" stage#2800jberchtold-nvidia wants to merge 2 commits intoNVIDIA:mainfrom
jberchtold-nvidia wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
Signed-off-by: Jeremy Berchtold <jberchtold@nvidia.com>
for more information, see https://pre-commit.ci
Collaborator
Author
|
/te-ci L1 jax |
Contributor
Greptile SummaryThis PR extends the JAX backend of TransformerEngine by adding XLA FFI "initialize" stage handlers for the softmax, quantization, attention, GEMM, and router custom-call operations, completing warmup coverage that already existed for norm and activation layers. Key changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant XLA as XLA/JAX Runtime
participant Init as InitializeFFI (new)
participant Wrap as wrapInStreamCapture
participant CUDA as CUDA Driver
participant Exec as FFI execute (existing)
XLA->>Init: call during initialize stage
Init->>Wrap: forward all args
Wrap->>CUDA: cudaStreamBeginCapture
Wrap->>Exec: call original FFI function
Note over Exec,CUDA: kernels captured and JIT-compiled
Exec-->>Wrap: Error_Type
Wrap->>CUDA: cudaStreamEndCapture
Wrap->>CUDA: cudaGraphDestroy
Note over Wrap: warmup complete
Wrap-->>Init: Error_Type
Init-->>XLA: return
XLA->>Exec: call during execute stage
Exec->>CUDA: launch pre-compiled kernels
CUDA-->>Exec: done
Exec-->>XLA: return
Reviews (1): Last reviewed commit: "[pre-commit.ci] auto fixes from pre-comm..." | Re-trigger Greptile |
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.
Description
Please include a brief summary of the changes, relevant motivation and context.
Fixes # (issue)
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: