Skip to content

[Feature Request] Add torch.Tensor support for InferenceSession input_feed #20481

@thiagocrepaldi

Description

@thiagocrepaldi

Describe the feature request

Having ONNX Runtime using torch.Tensor (in addition to the current numpy) tensors is useful for the scenarios in which numpy does not support the data type used in the original torch model, such as torch.bfloat16.

Describe scenario use case

Today, we are forced to transform the onnx graph to convert bfloat16 into float16 due to umpy's lack of support for bfloat16

Supporting torch.Tensor direcly also makes ORT closer to PyTorch's original model, without numpy as a middle man

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestrequest for unsupported feature or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions