Open
Description
Found this is testing,
Works:
TCustomFloat = TypeVar("TCustomFloat", bound=Union[FLOAT16, FLOAT, DOUBLE, BFLOAT16])
@onnxscript.script(custom_domain)
def test_custom_op(x: TCustomFloat, y: TCustomFloat) -> TCustomFloat:
return op.Add(x, y)
No:
def test_something(self):
TCustomFloat = TypeVar("TCustomFloat", bound=Union[FLOAT16, FLOAT, DOUBLE, BFLOAT16])
@onnxscript.script(custom_domain)
def test_custom_op(x: TCustomFloat, y: TCustomFloat) -> TCustomFloat:
return op.Add(x, y)