mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-11 22:34:53 +08:00
Revert "[export] Skip the check instead of disable (#164084)"
This reverts commit c2768d0f5af840a94c342ed9eac3e26c819aa3f0. Reverted https://github.com/pytorch/pytorch/pull/164084 on behalf of https://github.com/yangw-dev due to broke internal tests ([comment](https://github.com/pytorch/pytorch/pull/164084#issuecomment-3348862668))
This commit is contained in:
@ -219,6 +219,7 @@ def _convert_guards_code_to_fn(
|
||||
return guards_fn
|
||||
|
||||
|
||||
@torch._dynamo.disable
|
||||
def _check_input_constraints_for_module(self, args, kwargs):
|
||||
flat_args_with_path = _check_inputs_match(args, kwargs, self._in_spec)
|
||||
_check_input_constraints_for_graph(
|
||||
@ -240,11 +241,8 @@ def _check_input_constraints_pre_hook(self, args, kwargs):
|
||||
_check_inputs_match(args, kwargs, self._in_spec)
|
||||
return
|
||||
|
||||
# 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)
|
||||
# NOTE: this call is Dynamo disabled, as it used to be
|
||||
_check_input_constraints_for_module(self, args, kwargs)
|
||||
|
||||
|
||||
def _unlift_inputs_as_getattr(
|
||||
|
||||
Reference in New Issue
Block a user