Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ONNX] Support converting fx graph with symbolic shape to ONNX #96350

Closed

Commits on Mar 8, 2023

  1. [ONNX] Support dynamic axes

    [ghstack-poisoned]
    titaiwangms committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    4c1d6e0 View commit details
    Browse the repository at this point in the history
  2. Update on "[ONNX] Support dynamic axes"

    [ghstack-poisoned]
    titaiwangms committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    22b362f View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2023

  1. Update on "[ONNX] Support dynamic axes"

    [ghstack-poisoned]
    titaiwangms committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    7ccc994 View commit details
    Browse the repository at this point in the history
  2. Update on "[ONNX] Support dynamic axes"

    [ghstack-poisoned]
    titaiwangms committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    6bc993a View commit details
    Browse the repository at this point in the history
  3. Update on "[ONNX] Support dynamic axes"

    [ghstack-poisoned]
    titaiwangms committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    8a6d9ad View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2023

  1. Update on "[ONNX] Support dynamic axes"

    [ghstack-poisoned]
    titaiwangms committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    9bd0919 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2023

  1. Update on "[ONNX] Support dynamic axes"

    [ghstack-poisoned]
    titaiwangms committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    455a3fb View commit details
    Browse the repository at this point in the history
  2. Update on "[ONNX] Support dynamic axes"

    [ghstack-poisoned]
    titaiwangms committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    d41603e View commit details
    Browse the repository at this point in the history
  3. Update on "[ONNX] Support dynamic axes"

    [ghstack-poisoned]
    titaiwangms committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    54bb992 View commit details
    Browse the repository at this point in the history
  4. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    [ghstack-poisoned]
    titaiwangms committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    c957d8a View commit details
    Browse the repository at this point in the history
  5. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    [ghstack-poisoned]
    titaiwangms committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    2b09207 View commit details
    Browse the repository at this point in the history
  6. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    [ghstack-poisoned]
    titaiwangms committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    3ea2434 View commit details
    Browse the repository at this point in the history
  7. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    [ghstack-poisoned]
    titaiwangms committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    06fdede View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch to avoid affecting what we have on static export.
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter.
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added.
    4. sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    
    [ghstack-poisoned]
    titaiwangms committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    5fdae17 View commit details
    Browse the repository at this point in the history
  2. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch to avoid affecting what we have on static export.
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter.
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added.
    4. sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    
    [ghstack-poisoned]
    titaiwangms committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    35f192f View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2023

  1. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch to avoid affecting what we have on static export.
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter.
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added.
    4. sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    
    [ghstack-poisoned]
    titaiwangms committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    5e116ac View commit details
    Browse the repository at this point in the history
  2. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch to avoid affecting what we have on static export.
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter.
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added.
    4. sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    
    [ghstack-poisoned]
    titaiwangms committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    bef15c0 View commit details
    Browse the repository at this point in the history
  3. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch to avoid affecting what we have on static export.
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter.
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added.
    4. sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    
    [ghstack-poisoned]
    titaiwangms committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    49195a4 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2023

  1. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch to avoid affecting what we have on static export.
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter.
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added.
    4. sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    
    [ghstack-poisoned]
    titaiwangms committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    471a0dc View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch to avoid affecting what we have on static export.
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter.
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added.
    4. sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    
    [ghstack-poisoned]
    titaiwangms committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    d60f5b3 View commit details
    Browse the repository at this point in the history
  2. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch to avoid affecting what we have on static export.
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter.
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added.
    4. sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    
    [ghstack-poisoned]
    titaiwangms committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    fe4542b View commit details
    Browse the repository at this point in the history
  3. Update on "[ONNX] Support dynamic axes"

    Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch to avoid affecting what we have on static export.
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter.
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added.
    4. sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    
    [ghstack-poisoned]
    titaiwangms committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    b8a67e3 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. Update on "[ONNX] Support converting fx graph with symbolic shape to …

    …ONNX"
    
    
    ~~Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch between symbolic tracing (dynamic sizes) and fake mode (static). Set it to default True, as most of our tests are happy with sumbolic tracing. Except GPT2 stays with fake mode with error: microsoft/onnxscript#523
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter. This can be removed once tests are integrated with #96479
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added to support SymFloat/SymInt. (FIXME: #97201). sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    4. Fully deprecated FakeTensorProp as make_fx() should provide all node meta info.
    5. Put complicated fx.Node related ArgumentType into _type_utils.py
    
    [ghstack-poisoned]
    titaiwangms committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    6abe6bc View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2023

  1. Update on "[ONNX] Support converting fx graph with symbolic shape to …

    …ONNX"
    
    
    ~~Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch between symbolic tracing (dynamic sizes) and fake mode (static). Set it to default True, as most of our tests are happy with sumbolic tracing. Except GPT2 stays with fake mode with error: microsoft/onnxscript#523
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter. This can be removed once tests are integrated with #96479
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added to support SymFloat/SymInt. (FIXME: #97201). sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    4. Fully deprecated FakeTensorProp as make_fx() should provide all node meta info.
    5. Put complicated fx.Node related ArgumentType into _type_utils.py
    
    [ghstack-poisoned]
    titaiwangms committed Mar 24, 2023
    Configuration menu
    Copy the full SHA
    84f05a2 View commit details
    Browse the repository at this point in the history
  2. Update on "[ONNX] Support converting fx graph with symbolic shape to …

    …ONNX"
    
    
    ~~Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch between symbolic tracing (dynamic sizes) and fake mode (static). Set it to default True, as most of our tests are happy with sumbolic tracing. Except GPT2 stays with fake mode with error: microsoft/onnxscript#523
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter. This can be removed once tests are integrated with #96479
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added to support SymFloat/SymInt. (FIXME: #97201). sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    4. Fully deprecated FakeTensorProp as make_fx() should provide all node meta info.
    5. Put complicated fx.Node related ArgumentType into _type_utils.py
    
    [ghstack-poisoned]
    titaiwangms committed Mar 24, 2023
    Configuration menu
    Copy the full SHA
    87e3ea0 View commit details
    Browse the repository at this point in the history
  3. Update on "[ONNX] Support converting fx graph with symbolic shape to …

    …ONNX"
    
    
    ~~Need microsoft/onnxscript#484
    
    Support dynamic export on fx-ONNX exporter. Essentially, we set inputs size and nodes all dynamic in torchscript, and leverage on `aten::sym_size` to catch dynamic size between each Op.
    
    1. Add `dynamic_axes` switch between symbolic tracing (dynamic sizes) and fake mode (static). Set it to default True, as most of our tests are happy with sumbolic tracing. Except GPT2 stays with fake mode with error: microsoft/onnxscript#523
    2. Add test_fx_dynamic_onnruntime.py to test on some addhoc we have from old exporter. This can be removed once tests are integrated with #96479
    3. Since `aten::sym_size` are operated with built-in function, a built-in function mapping is added to support SymFloat/SymInt. (FIXME: #97201). sym_size output value is also fx.Node, and can be found in `fx_name_to_onnxscipt_value`, so it's operation stays the same as other ONNX ops in ONNX graph.
    4. Fully deprecated FakeTensorProp as make_fx() should provide all node meta info.
    5. Put complicated fx.Node related ArgumentType into _type_utils.py
    
    [ghstack-poisoned]
    titaiwangms committed Mar 24, 2023
    Configuration menu
    Copy the full SHA
    030c219 View commit details
    Browse the repository at this point in the history