microsoft / microsoft/onnxruntime

[Feature Request] Support for Int64 datatype for shape tensor in Expand Op in ORT-QNN EP

Open
#22,320 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ep:QNN feature request
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the feature request

Currently Int64 shape tensor is not handled in Expand Op builder and below error is thrown: [expand_op_builder.cc](https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/providers/qnn/builder/opbuilder/expand_op_builder.cc#L126). Support is required to cast and handle this datatype in ORT QNN EP.

### Describe scenario use case

Currently we are getting below error if the input model has Int64 as shape tensor in Expand node.
```
[V:onnxruntime:, qnn_execution_provider.cc:521 onnxruntime::QNNExecutionProvider::GetSupportedNodes] Validation FAILED for 1 nodes in NodeUnit (Expand) :

Operator type: Expand Node name: Expand_1 Node index: 1

REASON : Type not supported.
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in onnxruntime/core/providers/qnn/builder/opbuilder/expand_op_builder.cc at the validation around line 126, where Int64 shape tensors are rejected. Trace how Expand shape tensors are handled in the ORT-QNN execution provider and verify an Expand node with an Int64 shape tensor no longer reports the shown Type not supported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.