Compare commits

...

1 Commits

Author SHA1 Message Date
cb07062211 [export] Skip the check instead of disable
Its unclear why we had disable in the first place. With
install_free_tensors, we are tracing into this hook. A better way would
be to place the tracer without any hook. For now, disable the checking
while dynamo is tracing.

ghstack-source-id: b32f59759e01ecfb7e9a32f5274f674894a64590
Pull Request resolved: https://github.com/pytorch/pytorch/pull/164084
2025-09-29 23:47:11 -07:00

View File

@ -241,8 +241,11 @@ def _check_input_constraints_pre_hook(self, args, kwargs):
_check_inputs_match(args, kwargs, self._in_spec)
return
# NOTE: this call is Dynamo disabled, as it used to be
_check_input_constraints_for_module(self, args, kwargs)
# NOTE: for some reason, Dynamo is tracing into this, we should see why and
# put compile at the right place. Until then, we can skip the input
# constraint checks.
if not torch.compiler.is_dynamo_compiling():
_check_input_constraints_for_module(self, args, kwargs)
def _unlift_inputs_as_getattr(