Rename op elementwiseIf to where (#18657)

WebNN latest spec uses `where`.
This commit is contained in:
Wanming Lin 2023-12-07 06:56:26 +08:00 committed by GitHub
parent 9768a727e1
commit c4b8120c5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -212,7 +212,7 @@ static const InlinedHashMap<std::string, WebnnOpInfo> op_map = {
{"Tanh", {"tanh", true}},
{"Transpose", {"transpose", true}},
{"Unsqueeze", {"reshape", true}},
{"Where", {"elementwiseIf", false}},
{"Where", {"where", false}},
};
inline bool CheckSingleOp(const std::string& op_type, const emscripten::val& wnn_builder_,

View file

@ -32,7 +32,7 @@ Status TernaryOpBuilder::AddToModelBuilderImpl(ModelBuilder& model_builder, cons
emscripten::val input2 = model_builder.GetOperand(node.InputDefs()[2]->Name());
emscripten::val output = emscripten::val::object();
if (op_type == "Where") {
output = model_builder.GetBuilder().call<emscripten::val>("elementwiseIf", input0, input1, input2);
output = model_builder.GetBuilder().call<emscripten::val>("where", input0, input1, input2);
} else {
return ORT_MAKE_STATUS(ONNXRUNTIME, INVALID_ARGUMENT,
"TernaryOpBuilder::AddToModelBuilderImpl, unknown op: ", op_type);