Skip to content

Commit

Permalink
[WebNN EP] Change axis to axes for argMax/argMin
Browse files Browse the repository at this point in the history
In the latest spec, the axes option of WebNN's argMax and argMin requires the use of a sequence long type.
  • Loading branch information
peishenyan committed Dec 15, 2023
1 parent 2f8b86b commit f3b3b9b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ Status ArgMaxMinOpBuilder::AddToModelBuilderImpl(ModelBuilder& model_builder,
const auto select_last_index = helper.Get("select_last_index", 0);

axis = HandleNegativeAxis(axis, input_rank);
emscripten::val axes = emscripten::val::array();
axes.call<void>("push", static_cast<uint32_t>(axis));

emscripten::val options = emscripten::val::object();
options.set("axis", static_cast<int32_t>(axis));
options.set("axes", axes);
options.set("keepDimensions", keep_dims == 1);
options.set("selectLastIndex", select_last_index == 1);
emscripten::val output = emscripten::val::object();
Expand Down

0 comments on commit f3b3b9b

Please sign in to comment.