diff --git a/paddle/fluid/inference/tensorrt/convert/emb_eltwise_layernorm.cc b/paddle/fluid/inference/tensorrt/convert/emb_eltwise_layernorm.cc index 17b0edc065a84e1326c99344b7fd57703472c574..651dbe8e0d0106fe507c7de24eaec70addc2d27d 100644 --- a/paddle/fluid/inference/tensorrt/convert/emb_eltwise_layernorm.cc +++ b/paddle/fluid/inference/tensorrt/convert/emb_eltwise_layernorm.cc @@ -114,13 +114,17 @@ class EmbEltwiseLayerNormOpConverter : public OpConverter { std::vector plugin_inputs; plugin_inputs.emplace_back(engine_->GetITensor( - "eval_placeholder_0")); // word_embedding, eval_placeholder_0 + engine_->network()->getInput(0)->getName())); // word_embedding, + // eval_placeholder_0 plugin_inputs.emplace_back(engine_->GetITensor( - "eval_placeholder_1")); // sent_embedding, eval_placeholder_1 + engine_->network()->getInput(1)->getName())); // sent_embedding, + // eval_placeholder_1 plugin_inputs.emplace_back(engine_->GetITensor( - "eval_placeholder_2")); // cu_seqlens, eval_placeholder_2 + engine_->network()->getInput(2)->getName())); // cu_seqlens, + // eval_placeholder_2 plugin_inputs.emplace_back(engine_->GetITensor( - "eval_placeholder_3")); // max_seqlen, eval_placeholder_3 + engine_->network()->getInput(3)->getName())); // max_seqlen, + // eval_placeholder_3 auto creator = GetPluginRegistry()->getPluginCreator( "CustomEmbLayerNormPluginDynamic", "2"); diff --git a/paddle/fluid/inference/tensorrt/convert/multihead_matmul_op.cc b/paddle/fluid/inference/tensorrt/convert/multihead_matmul_op.cc index 4bce6eac8c33f04293ca0b5362bee21442862ba2..edc01c6ce34fd1ad6f65cbaa5f2583a1fea525ac 100644 --- a/paddle/fluid/inference/tensorrt/convert/multihead_matmul_op.cc +++ b/paddle/fluid/inference/tensorrt/convert/multihead_matmul_op.cc @@ -149,9 +149,11 @@ class MultiheadMatMulOpConverter : public OpConverter { plugin_inputs.emplace_back(fc_layer->getOutput(0)); plugin_inputs.emplace_back(mask_tensor); plugin_inputs.emplace_back(engine_->GetITensor( - "eval_placeholder_2")); // cu_seqlens, eval_placeholder_2 + engine_->network()->getInput(2)->getName())); // cu_seqlens, + // eval_placeholder_2 plugin_inputs.emplace_back(engine_->GetITensor( - "eval_placeholder_3")); // max_seqlen, eval_placeholder_3 + engine_->network()->getInput(3)->getName())); // max_seqlen, + // eval_placeholder_3 auto plugin_layer = engine_->network()->addPluginV2( plugin_inputs.data(), plugin_inputs.size(), *plugin); layer = plugin_layer; diff --git a/paddle/fluid/inference/tensorrt/convert/slice_op.cc b/paddle/fluid/inference/tensorrt/convert/slice_op.cc index 316ac8e353f12b8e39890c47234cc341bc1baf35..f8d2998378bf5ea60db859ffd9565752cc49c177 100644 --- a/paddle/fluid/inference/tensorrt/convert/slice_op.cc +++ b/paddle/fluid/inference/tensorrt/convert/slice_op.cc @@ -50,7 +50,9 @@ class SliceOpConverter : public OpConverter { std::vector plugin_inputs; // plugin_inputs.emplace_back(trans_layer->getOutput(0)); plugin_inputs.emplace_back(input); - plugin_inputs.emplace_back(engine_->GetITensor("eval_placeholder_2")); + plugin_inputs.emplace_back(engine_->GetITensor( + engine_->network()->getInput(2)->getName())); // cu_seqlens, + // eval_placeholder_2 // bool ban_fp16 = engine_->disable_trt_plugin_fp16(); plugin::SpecialSlicePluginDynamic* plugin =