Revert "kill allow_complex_guards_as_runtime_asserts (#160198)"

This reverts commit 69d91b94ba5366f4444d8cb8fd3dab4de4f04d3d.

Reverted https://github.com/pytorch/pytorch/pull/160198 on behalf of https://github.com/jeffdaily due to let's revert again instead of waiting for forward fix, see earlier comments ([comment](https://github.com/pytorch/pytorch/pull/160198#issuecomment-3235165462))
This commit is contained in:
PyTorch MergeBot
2025-08-28 22:50:37 +00:00
parent fffa62fa12
commit 47742081c9
9 changed files with 67 additions and 47 deletions

View File

@ -158,7 +158,7 @@ def export_for_training(
dynamic_shapes,
strict=strict,
preserve_module_call_signature=preserve_module_call_signature,
prefer_deferred_runtime_asserts_over_guards=prefer_deferred_runtime_asserts_over_guards,
allow_complex_guards_as_runtime_asserts=prefer_deferred_runtime_asserts_over_guards,
)
@ -282,7 +282,7 @@ def export(
strict=strict,
preserve_module_call_signature=preserve_module_call_signature,
pre_dispatch=True,
prefer_deferred_runtime_asserts_over_guards=prefer_deferred_runtime_asserts_over_guards,
allow_complex_guards_as_runtime_asserts=prefer_deferred_runtime_asserts_over_guards,
)
except Exception as e:
draft_export_msg = (