Skip to content

Overloaded custom operators in Python are broken #812

Open
@borisfom

Description

@borisfom

Is overload supported in Python?
When I try doing something like :

@onnx_op(op_type="CustomAdd", inputs=[PyOp.dt_float], outputs =[PyOp.dt_float])
def custom_add_float32(x, y):
    return np.add(x, y)

@onnx_op(op_type="CustomAdd", inputs=[PyOp.dt_float16], outputs=[PyOp.dt_float16])
def custom_add_float16(x, y):
    return np.add(x, y)

I am getting errors:

terminate called after throwing an instance of 'std::runtime_error'
  what():  Type float16 not supported by python customops api

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions