pytorch
56a93ed5 - Store constraints and example inputs in the graph module as metadata in export (#99961)

Commit
1 year ago
Store constraints and example inputs in the graph module as metadata in export (#99961) Metadata to store in the GraphModule: - input shape constraints - example inputs - other inline constraints The saved constraints (in mem) will be used directly after export to convert constraints to runtime assertion which is a separate pass after export. The requirement of saved constraints: 1. Be able to locate where the constraints is from 2. Should not break the exported graph module serialization. Examples of saved constraints ``` input_shape_constraints: {'t_id': 140266058179792, 'dim': 0, 'min': 6, 'max': oo} {'t_id': 140266058179792, 'dim': 0, 'min': 2, 'max': 10} inline_constraints: i1: ValueRanges(lower=2, upper=5) ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/99961 Approved by: https://github.com/tugsbayasgalan
Author
Committer
Parents
Loading