Skip to content

Commit c6a5c4b

Browse files
committed
add comments for execute in ut_helper
1 parent 1bf9d9e commit c6a5c4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

paddle/fluid/inference/tensorrt/convert/ut_helper.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ class TRTConvertValidation {
163163
}
164164
}
165165

166+
// We use the set 'neglected_output' here, because some Ops like batch norm,
167+
// the outputs specified in the op des are only used during training,
168+
// so we should neglect those output during inference.
166169
void Execute(int batch_size,
167170
std::unordered_set<std::string> neglected_output = {}) {
168171
// Execute Fluid Op
@@ -177,9 +180,6 @@ class TRTConvertValidation {
177180
ASSERT_FALSE(op_desc_->OutputArgumentNames().empty());
178181
const size_t output_space_size = 3000;
179182
for (const auto& output : op_desc_->OutputArgumentNames()) {
180-
// Some Ops like batch norm, the output specified
181-
// in the op des is only used during training, so we should
182-
// neglect those ouput during inference.
183183
if (neglected_output.count(output)) continue;
184184
std::vector<float> fluid_out;
185185
std::vector<float> trt_out(output_space_size);

0 commit comments

Comments
 (0)