mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
[WebNN EP] Add outputDataType option for the ArgMax/ArgMin ops (#21385)
### Description WebNN spec introduces a new option: `outputDataType` to `argMax` and `argMin` ops, it's default value is `int32`, we should explicitly set it to `int64` for WebNN EP. Spec CR: "Add outputDataType to argmin/argmax" https://github.com/webmachinelearning/webnn/pull/730
This commit is contained in:
parent
a6c5e2cd20
commit
17e9ea6235
1 changed files with 5 additions and 0 deletions
|
|
@ -50,6 +50,11 @@ Status ArgMaxMinOpBuilder::AddToModelBuilderImpl(ModelBuilder& model_builder,
|
|||
options.set("axes", axes);
|
||||
options.set("keepDimensions", keep_dims == 1);
|
||||
options.set("selectLastIndex", select_last_index == 1);
|
||||
// TODO: use WebNN's opSupportLimits API to check the backend's supported output data types.
|
||||
// If the backend doesn't support int64 output, we should use default int32 output data type
|
||||
// then do a type casting (int32 -> int64) for the output. Refer to the CoreML EP for how to
|
||||
// support int64 output.
|
||||
options.set("outputDataType", "int64");
|
||||
emscripten::val output = emscripten::val::object();
|
||||
|
||||
const auto& op_type = node.OpType();
|
||||
|
|
|
|||
Loading…
Reference in a new issue