[Model Runner V2] Use MRV2 for all models by default (#53183)
Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user