A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 22:35 UTC
[compile][startup] Disable C++ compilation of symbolic shapes (#20836)
Signed-off-by: Animesh Jain <anijain@umich.edu>
Animesh Jain committed
Aug 1, 2025 at 10:38 UTC
9659bc7f271ec640da780b5ca739e261764b954b
1 file changed
+9
-2
vllm/compilation/decorators.py
+9
-2
@@ -267,8 +267,15 @@ def _support_torch_compile(
267
code.co_filename)
268
return inline_call(parent, func, args, kwargs)
269
270
- with patch.object(InliningInstructionTranslator, 'inline_call',
271
- patched_inline_call):
270
+ # Disable the C++ compilation of symbolic shape guards. C++-fication
271
+ # of symbolic shape guards can improve guard overhead. But, since
272
+ # vllm skip guards anyways, setting this flag to False can improve
273
+ # compile time.
274
+ with torch._dynamo.config.patch("enable_cpp_symbolic_shape_guards",
275
+ False), patch.object(
276
+ InliningInstructionTranslator,
277
+ 'inline_call',
278
+ patched_inline_call):
279
output = self.compiled_callable(*args, **kwargs)
280
return output
281