Skip to content

[Feature request] Support all floating dtypes for IsInf and IsNaN #5260

@justinchuby

Description

@justinchuby

System information

No response

What is the problem that this feature solves?

IsInf and IsNaN support a limited set of data types. This makes the converter's job harder when for example we need IsInf on FP16 or INT.

Alternatives considered

Manually add cast nodes in graphs.

Describe the feature

For broad compatibility, it would be great to make IsInf and IsNaN support all numeric data types.

For any floating point numbers FP8, FP16 etc., Inf and NaN should be well defined. For integers, they can always return False.

https://onnx.ai/onnx/operators/onnx__IsInf.html#l-onnx-doc-isinf
https://onnx.ai/onnx/operators/onnx__IsNaN.html#l-onnx-doc-isnan

Will this influence the current api (Y/N)?

No response

Feature Area

operators

Are you willing to contribute it (Y/N)

Yes

Notes

No response

Metadata

Metadata

Assignees

Labels

topic: enhancementRequest for new feature or operatortopic: operatorIssues related to ONNX operators

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions