Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjun committed May 15, 2023
1 parent a4c9542 commit e56ffb1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions paddle/fluid/inference/tensorrt/op_teller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,25 @@ struct SimpleOpTypeSetTeller : public Teller {
}
}

if (op_type == "pow") {
auto* block = desc.Block();
if (block == nullptr) {
VLOG(3) << "The block desc is nullptr, we can't continue to analyze. "
"Developers need to check whether block_desc is passed in "
"the pass.";
return false;
}
auto* x_var_desc = block->FindVar(desc.Input("X")[0]);

// the same as `elementwise_pow`.
if (x_var_desc->GetDataType() ==
paddle::framework::proto::VarType_Type::VarType_Type_INT32) {
VLOG(3) << "These operations (pow) do not support int32 "
"datatype.";
return false;
}
}

if (op_type == "stack") {
if (!with_dynamic_shape) {
VLOG(3)
Expand Down

0 comments on commit e56ffb1

Please sign in to comment.