Skip to content

Eager Compiler for Torch Compile#11803

Merged
ispobock merged 4 commits intosgl-project:mainfrom
Oasis-Git:eagle-mode
Oct 18, 2025
Merged

Eager Compiler for Torch Compile#11803
ispobock merged 4 commits intosgl-project:mainfrom
Oasis-Git:eagle-mode

Conversation

@Oasis-Git
Copy link
Collaborator

@Oasis-Git Oasis-Git commented Oct 18, 2025

Motivation

To support piecewise cuda graph, previous compile backend sglang applies torch default compile backend as Inductor pattern compiler. While this compiler introduce better performance for native torch operations, it introduces a lot of additional issues especially with sgl kernels and cuda implementation of custom ops. Thus in the pr we hope to switch the compiler mode back to eager in which torch only capture fx.graph but not compile it further. It will introduce some benefits such as:

  1. Better Support For Kernels/Ops: Developers will skip many compile issues before using piecewise cuda graph. From the perspective of performance with eager mode compiler we can natively support original kernel design and custom ops implementation.
  2. Zero Compile Cost: The compilation takes much time for warmup and with eager mode compiler this process can be skipped.

Modifications

Introduction of Eager Compiler Implementation and corresponding server args support

Accuracy Tests

Benchmarking and Profiling

Checklist

Signed-off-by: Oasis-Git <ayw.sirius19@gmail.com>
Signed-off-by: Oasis-Git <ayw.sirius19@gmail.com>
Signed-off-by: Oasis-Git <ayw.sirius19@gmail.com>
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@Oasis-Git Oasis-Git changed the title Eagle Compiler for Torch Compile Eager Compiler for Torch Compile Oct 18, 2025
Signed-off-by: Oasis-Git <ayw.sirius19@gmail.com>
@ispobock ispobock merged commit 1d72652 into sgl-project:main Oct 18, 2025
93 of 110 checks passed
@Oasis-Git Oasis-Git deleted the eagle-mode branch October 18, 2025 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants