未验证 提交 9b987b3d 编写于 作者: J JingZhuangzhuang 提交者: GitHub

Add skip case for conv2d convert test (#36301)

上级 7e6c0cee
...@@ -173,7 +173,7 @@ class TrtConvertConv2dTransposeTest(TrtLayerAutoScanTest): ...@@ -173,7 +173,7 @@ class TrtConvertConv2dTransposeTest(TrtLayerAutoScanTest):
attrs, False), 1e-5 attrs, False), 1e-5
self.trt_param.precision = paddle_infer.PrecisionType.Half self.trt_param.precision = paddle_infer.PrecisionType.Half
yield self.create_inference_config(), generate_trt_nodes_num( yield self.create_inference_config(), generate_trt_nodes_num(
attrs, False), (1e-5, 1e-5) attrs, False), (1e-5, 1e-3)
self.trt_param.precision = paddle_infer.PrecisionType.Int8 self.trt_param.precision = paddle_infer.PrecisionType.Int8
yield self.create_inference_config(), generate_trt_nodes_num( yield self.create_inference_config(), generate_trt_nodes_num(
attrs, False), (1e-5, 1e-5) attrs, False), (1e-5, 1e-5)
...@@ -185,7 +185,7 @@ class TrtConvertConv2dTransposeTest(TrtLayerAutoScanTest): ...@@ -185,7 +185,7 @@ class TrtConvertConv2dTransposeTest(TrtLayerAutoScanTest):
True), 1e-5 True), 1e-5
self.trt_param.precision = paddle_infer.PrecisionType.Half self.trt_param.precision = paddle_infer.PrecisionType.Half
yield self.create_inference_config(), generate_trt_nodes_num( yield self.create_inference_config(), generate_trt_nodes_num(
attrs, True), (1e-5, 1e-5) attrs, True), (1e-5, 1e-3)
self.trt_param.precision = paddle_infer.PrecisionType.Int8 self.trt_param.precision = paddle_infer.PrecisionType.Int8
yield self.create_inference_config(), generate_trt_nodes_num( yield self.create_inference_config(), generate_trt_nodes_num(
attrs, True), (1e-5, 1e-5) attrs, True), (1e-5, 1e-5)
...@@ -214,6 +214,16 @@ class TrtConvertConv2dTransposeTest(TrtLayerAutoScanTest): ...@@ -214,6 +214,16 @@ class TrtConvertConv2dTransposeTest(TrtLayerAutoScanTest):
"When dilations's element is not equal 1, there are different behaviors between Trt and Paddle." "When dilations's element is not equal 1, there are different behaviors between Trt and Paddle."
) )
def teller3(program_config, predictor_config):
if self.trt_param.precision == paddle_infer.PrecisionType.Int8:
return True
return False
self.add_skip_case(
teller3, SkipReasons.TRT_NOT_IMPLEMENTED,
"When precisionType is int8 without relu op, output is different between Trt and Paddle."
)
def test(self): def test(self):
self.add_skip_trt_case() self.add_skip_trt_case()
self.run_test() self.run_test()
......
...@@ -165,7 +165,6 @@ class TrtConvertDepthwiseConv2dTest(TrtLayerAutoScanTest): ...@@ -165,7 +165,6 @@ class TrtConvertDepthwiseConv2dTest(TrtLayerAutoScanTest):
attrs, False), (1e-5, 1e-5) attrs, False), (1e-5, 1e-5)
# for dynamic_shape # for dynamic_shape
generate_dynamic_shape(attrs) generate_dynamic_shape(attrs)
self.trt_param.precision = paddle_infer.PrecisionType.Float32 self.trt_param.precision = paddle_infer.PrecisionType.Float32
yield self.create_inference_config(), generate_trt_nodes_num(attrs, yield self.create_inference_config(), generate_trt_nodes_num(attrs,
...@@ -190,6 +189,16 @@ class TrtConvertDepthwiseConv2dTest(TrtLayerAutoScanTest): ...@@ -190,6 +189,16 @@ class TrtConvertDepthwiseConv2dTest(TrtLayerAutoScanTest):
"When padding_algorithm is 'SAME' or 'VALID', Trt dose not support. In this case, trt build error is caused by scale op." "When padding_algorithm is 'SAME' or 'VALID', Trt dose not support. In this case, trt build error is caused by scale op."
) )
def teller2(program_config, predictor_config):
if self.trt_param.precision == paddle_infer.PrecisionType.Int8:
return True
return False
self.add_skip_case(
teller2, SkipReasons.TRT_NOT_IMPLEMENTED,
"When precisionType is int8 without relu op, output is different between Trt and Paddle."
)
def test(self): def test(self):
self.add_skip_trt_case() self.add_skip_trt_case()
self.run_test() self.run_test()
......
...@@ -137,7 +137,7 @@ class TrtConvertDepthwiseConv2dTransposeTest(TrtLayerAutoScanTest): ...@@ -137,7 +137,7 @@ class TrtConvertDepthwiseConv2dTransposeTest(TrtLayerAutoScanTest):
attrs, False), 1e-5 attrs, False), 1e-5
self.trt_param.precision = paddle_infer.PrecisionType.Half self.trt_param.precision = paddle_infer.PrecisionType.Half
yield self.create_inference_config(), generate_trt_nodes_num( yield self.create_inference_config(), generate_trt_nodes_num(
attrs, False), (1e-5, 1e-5) attrs, False), (1e-5, 1e-3)
self.trt_param.precision = paddle_infer.PrecisionType.Int8 self.trt_param.precision = paddle_infer.PrecisionType.Int8
yield self.create_inference_config(), generate_trt_nodes_num( yield self.create_inference_config(), generate_trt_nodes_num(
attrs, False), (1e-5, 1e-5) attrs, False), (1e-5, 1e-5)
...@@ -178,6 +178,16 @@ class TrtConvertDepthwiseConv2dTransposeTest(TrtLayerAutoScanTest): ...@@ -178,6 +178,16 @@ class TrtConvertDepthwiseConv2dTransposeTest(TrtLayerAutoScanTest):
"When dilations's element is not equal 1, there are different behaviors between Trt and Paddle." "When dilations's element is not equal 1, there are different behaviors between Trt and Paddle."
) )
def teller3(program_config, predictor_config):
if self.trt_param.precision == paddle_infer.PrecisionType.Int8:
return True
return False
self.add_skip_case(
teller3, SkipReasons.TRT_NOT_IMPLEMENTED,
"When precisionType is int8 without relu op, output is different between Trt and Paddle."
)
def test(self): def test(self):
self.add_skip_trt_case() self.add_skip_trt_case()
self.run_test() self.run_test()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册