onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

[QNN EP] Support NonZero.

Open minfhong-qti opened this issue 1 month ago • 0 comments

Description

  • Implement NonZero op builder and regsiter QDQ selector.
  • Implement ShapeNonZero QNN preprocess to fix shape. Test: UTs.

Motivation and Context

Unlike ONNX NonZero which normally has dynamic output shape, QNN defines NonZero to always have maximum output size to avoid the dynamic shape. In order to meet QNN's expectation, the model with NonZero node must be preprocessed first to fix the shape beforehand. Additionally, QNN NonZero has shape in [#elements, rank] and thus an extra Transpose is required.

minfhong-qti avatar Nov 21 '25 04:11 minfhong-qti