Skip to content

[Mobile] NNAPI cannot Split without num_outputs #24274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Ebola-Chan-bot opened this issue Apr 2, 2025 · 1 comment
Closed

[Mobile] NNAPI cannot Split without num_outputs #24274

Ebola-Chan-bot opened this issue Apr 2, 2025 · 1 comment
Labels
api:CSharp issues related to the C# API .NET Pull requests that update .net code platform:mobile issues related to ONNX Runtime mobile; typically submitted using template

Comments

@Ebola-Chan-bot
Copy link

Ebola-Chan-bot commented Apr 2, 2025

Describe the issue

NNAPI on Android cannot perform Split version 18 without num_outputs attribute:

[ErrorCode:Fail] op_builder_helpers.cc:144 AddNnapiSplit count [0] does not evenly divide dimension 0 [2]

I investigated op_builder_helpers.cc:14. Looks like the logic sets num_outputs to zero as default if not specified. However Split works totally differently depending on whether num_outputs is specified or not.

To reproduce

Install OnnxRuntime from NuGet. Exception throws when creating InferenceSession with this model and NNAPI provider:

验证模型.zip

Image
Illustrated by netron

This model works fine on Windows CUDA or CPU.

Urgency

No response

Platform

Android

OS Version

HarmonyOS 4.2

ONNX Runtime Installation

Released Package

Compiler Version (if 'Built from Source')

No response

Package Name (if 'Released Package')

Microsoft.ML.OnnxRuntime

ONNX Runtime Version or Commit ID

1.21.0

ONNX Runtime API

C#

Architecture

X64

Execution Provider

NNAPI

Execution Provider Library Version

No response

@Ebola-Chan-bot Ebola-Chan-bot added the platform:mobile issues related to ONNX Runtime mobile; typically submitted using template label Apr 2, 2025
@github-actions github-actions bot added .NET Pull requests that update .net code api:CSharp issues related to the C# API labels Apr 2, 2025
@snnn
Copy link
Member

snnn commented Apr 4, 2025

It is a bot.

@snnn snnn closed this as completed Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:CSharp issues related to the C# API .NET Pull requests that update .net code platform:mobile issues related to ONNX Runtime mobile; typically submitted using template
Projects
None yet
Development

No branches or pull requests

2 participants