未验证 提交 b854f259 编写于 作者: X xiaoxiaohehe001 提交者: GitHub

fix_generic_fp16 (#49682)

上级 f4d267c2
...@@ -332,17 +332,12 @@ bool GenericPlugin::supportsFormatCombination( ...@@ -332,17 +332,12 @@ bool GenericPlugin::supportsFormatCombination(
if (pos == 3) if (pos == 3)
return in_out[0].type == in_out[pos].type && return in_out[0].type == in_out[pos].type &&
in_out[0].format == in_out[pos].format; in_out[0].format == in_out[pos].format;
} else if (op_desc_.Type() == "pad3d") { } else {
return (in_out[pos].type == nvinfer1::DataType::kFLOAT || return (in_out[pos].type == nvinfer1::DataType::kFLOAT ||
(isFp16Supported() && (isFp16Supported() &&
in_out[pos].type == nvinfer1::DataType::kHALF)) && in_out[pos].type == nvinfer1::DataType::kHALF)) &&
(in_out[pos].format == nvinfer1::TensorFormat::kLINEAR) && (in_out[pos].format == nvinfer1::TensorFormat::kLINEAR) &&
(in_out[0].type == in_out[pos].type); (in_out[0].type == in_out[pos].type);
} else {
return (in_out[pos].type == nvinfer1::DataType::kFLOAT ||
(isFp16Supported() &&
in_out[pos].type == nvinfer1::DataType::kHALF)) &&
(in_out[pos].format == nvinfer1::TensorFormat::kLINEAR);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册