pytorch
4f9aa7cb - [export] Error when constraining on static values (#101655)

Commit
1 year ago
[export] Error when constraining on static values (#101655) Fixes https://github.com/pytorch/pytorch/issues/100415 Results in the following error: ``` Traceback (most recent call last): File "/scratch/angelayi/work/pytorch/test/export/test_export.py", line 572, in test_export_constrain_static export(f, example_inputs, constraints) File "/scratch/angelayi/work/pytorch/torch/_export/__init__.py", line 348, in export method_name_to_graph_module[compile_spec.method_name] = _export( File "/scratch/angelayi/work/pytorch/torch/_export/__init__.py", line 119, in _export raise UserError(UserErrorType.CONSTRAIN_VIOLATION, str(e)) torch._dynamo.exc.UserError: File "/scratch/angelayi/work/pytorch/test/export/test_export.py", line 561, in f constrain_as_value(c, min=1, max=3) It appears that you're trying to set a constraint on a value which we evaluated to have a static value of 3. Scroll up to see where this constraint was set. ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/101655 Approved by: https://github.com/avikchaudhuri
Author
Committer
Parents
Loading