[Model Runner V2] Use MRV2 for all models by default (#53183)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
Nick Hill
2026-08-27 11:59:34 -07:00
committed by GitHub
parent a18dbe49ad
commit 4aab2b0ebe
5 changed files with 122 additions and 117 deletions
+9
View File
@@ -591,6 +591,15 @@ def _support_torch_compile(
**kwargs,
)
# Tensors that enter the graph through the forward context rather than
# model args (e.g. the MoE padding mask) need their batch dim marked
# dynamic too, otherwise AOT-compiled artifacts bake a static guard
# for the compile-time batch size.
if is_forward_context_available():
is_padding = get_forward_context().is_padding
if is_padding is not None:
torch._dynamo.mark_dynamic(is_padding, 0)
original_code_object = self.original_code_object()
logger.debug("Start compiling function %s", original_code_object)