Skip to content

Commit

Permalink
add function to disable trt op by output name
Browse files Browse the repository at this point in the history
  • Loading branch information
JZZ-NOTE committed Mar 2, 2023
1 parent cce2b94 commit 1398863
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ void analysis::TensorRtSubgraphPass::ApplyImpl(
<< " is diabled by config in TensorRT";
return false;
}
for (const auto &out_var : node->Op()->OutputNames()) {
for (const auto &var_name : node->Op()->Output(out_var)) {
if (find(trt_disabled_ops.begin(), trt_disabled_ops.end(), var_name) !=
trt_disabled_ops.end()) {
VLOG(3) << node->Op()->Type().c_str()
<< " is diabled by config in TensorRT";
return false;
}
}
}
bool is_ok = tensorrt::OpTeller::Global().Tell(
node, no_calib_int8, with_dynamic_shape);
if (!is_ok)
Expand Down

0 comments on commit 1398863

Please sign in to comment.