mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
[WebNN EP] Support PRelu op (#16756)
This commit is contained in:
parent
bb136f86c8
commit
eaea34f8e2
3 changed files with 5 additions and 0 deletions
|
|
@ -167,6 +167,7 @@ static const InlinedHashMap<std::string, std::string> op_map = {
|
|||
{"Not", "logicalNot"},
|
||||
{"Pad", "pad"},
|
||||
{"Pow", "pow"},
|
||||
{"PRelu", "prelu"},
|
||||
{"Reciprocal", "reciprocal"},
|
||||
{"ReduceMax", "reduceMax"},
|
||||
{"ReduceMean", "reduceMean"},
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ Status BinaryOpBuilder::AddToModelBuilderImpl(ModelBuilder& model_builder, const
|
|||
output = model_builder.GetBuilder().call<emscripten::val>("div", input0, input1);
|
||||
} else if (op_type == "Pow") {
|
||||
output = model_builder.GetBuilder().call<emscripten::val>("pow", input0, input1);
|
||||
} else if (op_type == "PRelu") {
|
||||
output = model_builder.GetBuilder().call<emscripten::val>("prelu", input0, input1);
|
||||
} else {
|
||||
return ORT_MAKE_STATUS(ONNXRUNTIME, INVALID_ARGUMENT,
|
||||
"BinaryOpBuilder::AddToModelBuilderImpl, unknown op: ", op_type);
|
||||
|
|
@ -59,6 +61,7 @@ void CreateBinaryOpBuilder(const std::string& op_type, OpBuilderRegistrations& o
|
|||
"Mul",
|
||||
"Div",
|
||||
"Pow",
|
||||
"PRelu",
|
||||
};
|
||||
|
||||
op_registrations.builders.push_back(std::make_unique<BinaryOpBuilder>());
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ static OpBuilderRegistrations CreateOpBuilderRegistrations() {
|
|||
CreateBinaryOpBuilder("Mul", op_registrations);
|
||||
CreateBinaryOpBuilder("Div", op_registrations);
|
||||
CreateBinaryOpBuilder("Pow", op_registrations);
|
||||
CreateBinaryOpBuilder("PRelu", op_registrations);
|
||||
}
|
||||
|
||||
{ // Ternary
|
||||
|
|
|
|||
Loading…
Reference in a new issue