[Feature Request] Improve Xnnpack execution provider capabilities and structure by calling the Xnnpack subgraph API instead of the operator AI when creating Xnnpack layer/kernel #24133
Labels
ep:Xnnpack
issues related to XNNPACK EP
feature request
request for unsupported feature or enhancement
Describe the feature request
Xnnpack execution provider currently calls the Xnnpack operatior APIs directly when creating a Xnnpack layer/kernel. For example: when creating conv layer the function "xnn_create_convolution2d_nhwc_f32" is called directly from conv_base.cc:CreateXnnpackKernel().
I gather it would be better for Xnnpack execution provider to use the Xnnpack subgraph API instead by calling the "define_" functions to create an xnnpack supported layer instead. For example: xnn_define_convolution_2d() which is part of the Xnnpack subgraph API.
Note that the Xnnpack runtime/execution capabilities does not have to be used (like Executorch and LiteRT does). Just use the Xnnpack subgraph API to handle creating of the Xnnpack layers.
By taking this approach the Xnnpack execution provider can be simplified since:
Note that when using the subgraph API to create Xnnpack layers the actual created layer (xnn_operator type) object needs to be extracted from the subgraph object as follows: subgraph->nodes[x] ->op. (xnn_subgraph->xnn_node->xnn_operator)
Describe scenario use case
See above
The text was updated successfully, but these errors were encountered: