Skip to content

Commit

Permalink
Added opjson and bug fix for scatternd_onnx_v16 (#678)
Browse files Browse the repository at this point in the history
Fixed typing error of missed param in this op's clone function

Type: Code Improvement

Signed-off-by: Feiyue Chen <[email protected]>
  • Loading branch information
chenfeiyue-cfy authored Jan 12, 2024
1 parent 0d8ca44 commit b4b4f00
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions include/tim/vx/ops/scatternd_onnx_v16.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"ScatterND_ONNX_V16":{
"parameters":
[
{"name":"reduction",
"dtype": "tim::vx::ops::ScatterND_ONNX_V16::ReductionType",
"Optional": "true",
"default":"tim::vx::ops::ScatterND_ONNX_V16::REDUCTION_NONE",
"range": ["tim::vx::ops::ScatterND_ONNX_V16::REDUCTION_NONE",
"tim::vx::ops::ScatterND_ONNX_V16::REDUCTION_ADD",
"tim::vx::ops::ScatterND_ONNX_V16::REDUCTION_MUL",
"tim::vx::ops::ScatterND_ONNX_V16::REDUCTION_MAX",
"tim::vx::ops::ScatterND_ONNX_V16::REDUCTION_MIN"]
}
]
}
}
2 changes: 1 addition & 1 deletion src/tim/vx/ops/scatternd_onnx_v16.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ScatterND_ONNX_V16::ScatterND_ONNX_V16(Graph* graph, ReductionType reduction)
}

std::shared_ptr<Operation> ScatterND_ONNX_V16::Clone(std::shared_ptr<Graph>& graph) const {
return graph->CreateOperation<ScatterND_ONNX_V16>();
return graph->CreateOperation<ScatterND_ONNX_V16>(this->reduction_);
}

} // namespace ops
Expand Down

0 comments on commit b4b4f00

Please sign in to comment.