You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ET-VK] Support exporting graphs with symbolic shape ops + update view to accept sym_size args (#10997)
## Context
The ultimate goal is to be able to export the transformer models with dynamic shapes enabled so that batched prefill can be done.
With transformer models, when dynamic shapes are turned on, `sym_size` operators appear in the graph which are used to determine the `seq_len` of the inputs, i.e. how many tokens are being passed into the input sequence. The `sym_size` operator accepts a tensor and a dim, and extracts the size of the tensor at the specified dim as a symbolic integer.
In the transformer model, the `seq_len` symint is used as an argument to `view` operators.
This PR enables exporting graphs with symbolic integer nodes and in particular the `sym_size` operator, as well as handling when symints are used in a list of ints.
# Changes
* Miscellaneous fixes to fix errors that show occur when symint nodes are encountered
* Add C++ implementation of symint nodes and add registration for it
* Enable the view operator to handle when the sizes arg includes symints
Differential Revision: [D75019798](https://our.internmc.facebook.com/intern/diff/D75019798/)
0 commit comments