onnxruntime
129210f1 - [QNN EP] Add Support for MaxPool rank-3 input QNN EP (#24735)

Commit
266 days ago
[QNN EP] Add Support for MaxPool rank-3 input QNN EP (#24735) - Currently QNN EP only supports MaxPool for rank 4. - This change adds support for rank 3 input by adding Reshapes before and after the Op to ensure that the MaxPool gets input rank 4. - Updated all attributes if converting rank 3 input to rank 4 by updating stride, pads, dilations and kernel size. - Added unit tests which takes input rank 3 to validate MaxPool on NPU. ### Description This change extends the support of QNN EP's MaxPool operation to handle input tensors of rank 3. To achieve this, Reshape Ops are added before and after the MaxPool Op to ensure that the input to MaxPool is always of rank 4, as required. Additionally, the attributes such as stride, pads, dilations, and kernel size are updated accordingly to accommodate the conversion of rank 3 inputs to rank 4. Unit tests have been added to validate the functionality of MaxPool on NPU with rank 3 inputs. ### Motivation and Context This change is required to enhance the flexibility and usability of QNN EP's MaxPool operation by supporting a broader range of input tensor ranks. Previously, the operation was limited to only supporting rank 4 inputs, which restricted the support in certain scenarios. By adding support for rank 3 inputs, this change solves the problem of limited compatibility and enhances the overall functionality and makes sure that the MaxPool op offloads to the NPU (QNN HTP Backend)
Author
Parents
Loading