[WebNN EP] Support int64 output data type for CoreML backend #21401
Labels
ep:WebNN
WebNN execution provider
feature request
request for unsupported feature or enhancement
platform:mobile
issues related to ONNX Runtime mobile; typically submitted using template
Describe the feature request
WebNN CoreML backend doesn't support int64 data type, however some ops from ONNX produce int64 output, e.g. ArgMax, ArgMin, etc., CoreML's AragMax reproduces int32 output.
That means we should check the dimension size being reduced is within int32 range, then do type casting (int32 -> int64) for the output.
The node of such op must be the output of a subgraph model, as its next node is int64 input which is not supported by CoreML backend, and it will fall back, unless it is a special case: ArgMax-Cast (from int64 to int32).
Following actions can be taken into account:
Besides, how CoreML EP handles int64 data type would be a good reference.
Describe scenario use case
N/A
The text was updated successfully, but these errors were encountered: