Skip to content

custom op's SUPPORTED_TENSOR_TYPES does not include int4 and uint4 #23205

@BoarQing

Description

@BoarQing

Describe the issue

We implemented VitisAI custom ops' that support all tensor types by returning ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED when GetInputType() is called. But if the input contains int4 tensor it would fail here.

Status status(ONNXRUNTIME, INVALID_GRAPH,
"This is an invalid model. "
"Type Error: Type '" +
*input_type + "' of input parameter (" + input_def->Name() +
") of operator (" + op.Name() + ") in node (" + node_name + ") is invalid.");
return status;

#23204 should fix this issue.

To reproduce

Create a custom op that return ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED when GetInputType() is called and add an input tensor of int4.

Urgency

No response

Platform

Windows

OS Version

Windows 11

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

main

ONNX Runtime API

C++

Architecture

X64

Execution Provider

Vitis AI

Execution Provider Library Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:VitisAIissues related to Vitis AI execution provider

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions