未验证 提交 4114c4a1 编写于 作者: W wenbin 提交者: GitHub

fix ernie (#37839) (#37960)

上级 72a6c142
......@@ -107,7 +107,12 @@ bool StackPluginDynamic::supportsFormatCombination(
const nvinfer1::PluginTensorDesc& in = in_out[pos];
if (pos == 0) {
if (with_fp16_) {
return (in.type == nvinfer1::DataType::kFLOAT ||
return (
// It's workaround for ernie fix len model.
// Enabling float, half on the same time will cause trt hang.
#if IS_TRT_VERSION_LT(8000)
in.type == nvinfer1::DataType::kFLOAT ||
#endif
in.type == nvinfer1::DataType::kHALF) &&
(in.format == nvinfer1::TensorFormat::kLINEAR);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册