Skip to content

[QNN EP] Fix "Zero tensor size!" for RandomUniformLike / RandomNormalLike#415

Draft
qti-niscmami wants to merge 1 commit into
mainfrom
dev/qti-niscmami/fix_randomlike_zero_tensor
Draft

[QNN EP] Fix "Zero tensor size!" for RandomUniformLike / RandomNormalLike#415
qti-niscmami wants to merge 1 commit into
mainfrom
dev/qti-niscmami/fix_randomlike_zero_tensor

Conversation

@qti-niscmami
Copy link
Copy Markdown
Collaborator

Description

Register the ONNX x input as a QnnTensorWrapper (APP_WRITE when it
is a fused-subgraph input) in the RandomUniformLike and
RandomNormalLike op builders, without adding it to the QNN node's
input_names. The QNN op still consumes only the synthesized static
*_shape tensor (and optional *_ort_qnn_ep_seed).

Motivation and Context

QNN's RandomUniformLike / RandomNormalLike ops only take a static
shape tensor.

The ONNX x input is used purely for shape inference at
compile time. The op builders correctly bake x's shape into a static
input, but never registered x itself as a tensor wrapper. ORT's
runtime input plumbing iterates the fused EP subgraph's inputs (which
still include x) and looks each one up in the wrapper map; with no
wrapper for x, the resulting list was empty and SetupTensors failed
its tensor_count == 0 guard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant