Skip to content

Commit

Permalink
update pr unbind
Browse files Browse the repository at this point in the history
  • Loading branch information
jiuyuedeyu156 committed May 28, 2024
1 parent 2012e95 commit 5029e64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions paddle2onnx/mapper/tensor/fill_constant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int32_t FillConstantMapper::GetMinOpset(bool verbose) {
onnx_dtype != ONNX_NAMESPACE::TensorProto::DOUBLE &&
onnx_dtype != ONNX_NAMESPACE::TensorProto::BOOL
) {
Error() << "Only support int32/int64/float32/float64 data type in "
Error() << "Only support int32/int64/float32/float64/bool data type in "
"fill_constant operator."
<< std::endl;
return -1;
Expand Down Expand Up @@ -135,7 +135,7 @@ void FillConstantMapper::Opset9() {
data[0] = static_cast<double>(value);
auto ptr = reinterpret_cast<char*>(data.data());
tensor->set_raw_data(std::string(ptr, sizeof(double)));
}else if (onnx_dtype == ONNX_NAMESPACE::TensorProto::BOOL) {
} else if (onnx_dtype == ONNX_NAMESPACE::TensorProto::BOOL) {
std::vector<double> data(1);
data[0] = static_cast<bool>(value);
auto ptr = reinterpret_cast<char*>(data.data());
Expand Down
3 changes: 0 additions & 3 deletions paddle2onnx/mapper/tensor/reduce_prod.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ int32_t ReduceMapperProd::GetMinOpset(bool verbose) {
}

void ReduceMapperProd::Opset18() {
//Assert(false, "ReduceMapperProd don't support opset18 now");
#if 1
auto axis_name_ = "dim";
GetAttr("keep_dim", &keep_dim_);
GetAttr("reduce_all", &reduce_all_);
Expand Down Expand Up @@ -65,7 +63,6 @@ void ReduceMapperProd::Opset18() {
}
auto out_info = GetOutput("Out");
helper_->AutoCast(out_node_name, out_info[0].name, x_info[0].dtype, out_info[0].dtype);
#endif
}


Expand Down

0 comments on commit 5029e64

Please sign in to comment.