microsoft / microsoft/onnxruntime

[Feature Request] [C#] Add support for System.Half for input/output tensors

Open
#25,392 2 comments 0 reactions 0 assignees View on GitHub
api:CSharp feature request
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the feature request

.NET5+ has built-in type System.Half which is similar or equal to OnnxRuntime Float16 type.

### Describe scenario use case

OnnxRuntime allows to use System.Numerics.Tensors for .NET8+ so I heavily rely on it to manipulate input/output data. It also allows you to convert to/from System.Half type but unfortunately OnnxRuntime doesn't support it.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the C# input and output tensor handling relevant to OnnxRuntime's System.Half and Float16 types. The issue names no repository files or tests, so first locate those entry points and their existing type-coverage tests. Done means System.Half works for both input and output tensors, including the .NET8+ System.Numerics.Tensors scenario described.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.