Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
36ab58f8
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
36ab58f8
编写于
10月 19, 2022
作者:
Z
zlsh80826
提交者:
GitHub
10月 19, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Loose TRT half test tolerance to 1e-3 (#47101)
上级
b3afac8a
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
46 addition
and
46 deletion
+46
-46
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_activation.py
...sts/unittests/ir/inference/test_trt_convert_activation.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_arg_max.py
.../tests/unittests/ir/inference/test_trt_convert_arg_max.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_bmm.py
...luid/tests/unittests/ir/inference/test_trt_convert_bmm.py
+3
-3
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_clip.py
...uid/tests/unittests/ir/inference/test_trt_convert_clip.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_concat.py
...d/tests/unittests/ir/inference/test_trt_convert_concat.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_conv2d_transpose.py
...ittests/ir/inference/test_trt_convert_conv2d_transpose.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_dropout.py
.../tests/unittests/ir/inference/test_trt_convert_dropout.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_equal.py
...id/tests/unittests/ir/inference/test_trt_convert_equal.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_gather.py
...d/tests/unittests/ir/inference/test_trt_convert_gather.py
+1
-1
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_gather_nd.py
...ests/unittests/ir/inference/test_trt_convert_gather_nd.py
+12
-12
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_gelu.py
...uid/tests/unittests/ir/inference/test_trt_convert_gelu.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_group_norm.py
...sts/unittests/ir/inference/test_trt_convert_group_norm.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_hard_sigmoid.py
...s/unittests/ir/inference/test_trt_convert_hard_sigmoid.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_hard_swish.py
...sts/unittests/ir/inference/test_trt_convert_hard_swish.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_leaky_relu.py
...sts/unittests/ir/inference/test_trt_convert_leaky_relu.py
+4
-4
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_matmul.py
...d/tests/unittests/ir/inference/test_trt_convert_matmul.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_multihead_matmul.py
...ittests/ir/inference/test_trt_convert_multihead_matmul.py
+2
-2
未找到文件。
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_activation.py
浏览文件 @
36ab58f8
...
...
@@ -134,7 +134,7 @@ class TrtConvertActivationTest(TrtLayerAutoScanTest):
attrs
,
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
1e-
5
attrs
,
False
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
...
...
@@ -143,7 +143,7 @@ class TrtConvertActivationTest(TrtLayerAutoScanTest):
attrs
,
True
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
True
),
1e-
5
attrs
,
True
),
1e-
3
def
test
(
self
):
self
.
run_test
()
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_arg_max.py
浏览文件 @
36ab58f8
...
...
@@ -120,7 +120,7 @@ class TrtConvertArgMaxTest(TrtLayerAutoScanTest):
attrs
,
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
1e-
5
attrs
,
False
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
...
...
@@ -129,7 +129,7 @@ class TrtConvertArgMaxTest(TrtLayerAutoScanTest):
attrs
,
True
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
True
),
1e-
5
attrs
,
True
),
1e-
3
def
test
(
self
):
self
.
run_test
()
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_bmm.py
浏览文件 @
36ab58f8
...
...
@@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from
trt_layer_auto_scan_test
import
TrtLayerAutoScanTest
,
SkipReasons
from
trt_layer_auto_scan_test
import
TrtLayerAutoScanTest
from
program_config
import
TensorConfig
,
ProgramConfig
import
numpy
as
np
import
paddle.inference
as
paddle_infer
from
functools
import
partial
from
typing
import
Optional
,
List
,
Callable
,
Dict
,
Any
,
Se
t
from
typing
import
Lis
t
import
unittest
import
os
...
...
@@ -101,7 +101,7 @@ class TrtConvertBmmTest_dynamic(TrtLayerAutoScanTest):
attrs
,
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
1e-
5
attrs
,
False
),
1e-
3
# The output has little diff between gpu and trt in CI-Windows-Inference
tol_fp32
=
1e-4
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_clip.py
浏览文件 @
36ab58f8
...
...
@@ -138,7 +138,7 @@ class TrtConvertClipTest(TrtLayerAutoScanTest):
attrs
,
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
1e-
5
attrs
,
False
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
...
...
@@ -147,7 +147,7 @@ class TrtConvertClipTest(TrtLayerAutoScanTest):
attrs
,
True
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
True
),
1e-
5
attrs
,
True
),
1e-
3
def
test
(
self
):
self
.
run_test
()
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_concat.py
浏览文件 @
36ab58f8
...
...
@@ -299,7 +299,7 @@ class TrtConvertConcatTest(TrtLayerAutoScanTest):
attrs
,
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
1e-
5
attrs
,
False
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
...
...
@@ -308,7 +308,7 @@ class TrtConvertConcatTest(TrtLayerAutoScanTest):
attrs
,
True
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
True
),
1e-
5
attrs
,
True
),
1e-
3
def
add_skip_trt_case
(
self
):
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_conv2d_transpose.py
浏览文件 @
36ab58f8
...
...
@@ -181,7 +181,7 @@ class TrtConvertConv2dTransposeTest(TrtLayerAutoScanTest):
attrs
,
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
(
1e-
5
,
1e-3
)
attrs
,
False
),
(
1e-
3
,
1e-3
)
# self.trt_param.precision = paddle_infer.PrecisionType.Int8
# yield self.create_inference_config(), generate_trt_nodes_num(
# attrs, False), (1e-5, 1e-5)
...
...
@@ -193,7 +193,7 @@ class TrtConvertConv2dTransposeTest(TrtLayerAutoScanTest):
attrs
,
True
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
True
),
(
1e-
5
,
1e-3
)
attrs
,
True
),
(
1e-
3
,
1e-3
)
# self.trt_param.precision = paddle_infer.PrecisionType.Int8
# yield self.create_inference_config(), generate_trt_nodes_num(
# attrs, True), (1e-5, 1e-5)
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_dropout.py
浏览文件 @
36ab58f8
...
...
@@ -131,7 +131,7 @@ class TrtConvertDropoutTest(TrtLayerAutoScanTest):
attrs
,
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
1e-
5
attrs
,
False
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
...
...
@@ -140,7 +140,7 @@ class TrtConvertDropoutTest(TrtLayerAutoScanTest):
attrs
,
True
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
True
),
1e-
5
attrs
,
True
),
1e-
3
def
add_skip_trt_case
(
self
):
pass
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_equal.py
浏览文件 @
36ab58f8
...
...
@@ -147,7 +147,7 @@ class TrtConvertElementwiseTest_one_input_corner_case(TrtLayerAutoScanTest):
attrs
,
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
1e-
5
attrs
,
False
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
...
...
@@ -156,7 +156,7 @@ class TrtConvertElementwiseTest_one_input_corner_case(TrtLayerAutoScanTest):
attrs
,
True
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
True
),
1e-
5
attrs
,
True
),
1e-
3
def
test
(
self
):
self
.
run_test
()
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_gather.py
浏览文件 @
36ab58f8
...
...
@@ -184,7 +184,7 @@ class TrtConvertGatherTest(TrtLayerAutoScanTest):
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
False
),
1e-
5
False
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_gather_nd.py
浏览文件 @
36ab58f8
...
...
@@ -95,14 +95,14 @@ class TrtConvertGatherNdTest_dim_4_1(TrtLayerAutoScanTest):
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-
5
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
5
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
3
def
add_skip_trt_case
(
self
):
...
...
@@ -188,14 +188,14 @@ class TrtConvertGatherNdTest_dim_4_1_2(TrtLayerAutoScanTest):
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-
5
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
5
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
3
def
add_skip_trt_case
(
self
):
...
...
@@ -281,14 +281,14 @@ class TrtConvertGatherNdTest_dim_4_2(TrtLayerAutoScanTest):
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-
5
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
5
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
3
def
add_skip_trt_case
(
self
):
...
...
@@ -374,14 +374,14 @@ class TrtConvertGatherNdTest_dim_4_3(TrtLayerAutoScanTest):
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-
5
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
5
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
3
def
add_skip_trt_case
(
self
):
...
...
@@ -467,14 +467,14 @@ class TrtConvertGatherNdTest_dim_2_2(TrtLayerAutoScanTest):
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-
5
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
5
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
3
def
add_skip_trt_case
(
self
):
...
...
@@ -561,14 +561,14 @@ class TrtConvertGatherNdTest_dim_3_3(TrtLayerAutoScanTest):
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-
5
yield
self
.
create_inference_config
(),
(
0
,
4
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
5
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
3
def
test
(
self
):
self
.
run_test
()
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_gelu.py
浏览文件 @
36ab58f8
...
...
@@ -126,7 +126,7 @@ class TrtConvertGeluTest(TrtLayerAutoScanTest):
attrs
,
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
1e-
5
attrs
,
False
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
...
...
@@ -135,7 +135,7 @@ class TrtConvertGeluTest(TrtLayerAutoScanTest):
attrs
,
True
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
True
),
1e-
5
attrs
,
True
),
1e-
3
def
test
(
self
):
self
.
run_test
()
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_group_norm.py
浏览文件 @
36ab58f8
...
...
@@ -120,7 +120,7 @@ class TrtConvertGroupNormTest(TrtLayerAutoScanTest):
attrs
,
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
1e-
5
attrs
,
False
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
...
...
@@ -129,7 +129,7 @@ class TrtConvertGroupNormTest(TrtLayerAutoScanTest):
attrs
,
True
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
True
),
1e-
5
attrs
,
True
),
1e-
3
def
add_skip_trt_case
(
self
):
pass
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_hard_sigmoid.py
浏览文件 @
36ab58f8
...
...
@@ -98,14 +98,14 @@ class TrtConvertHardSigmoidTest_dim_2(TrtLayerAutoScanTest):
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
1
,
2
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
1
,
2
),
1e-
5
yield
self
.
create_inference_config
(),
(
1
,
2
),
1e-
3
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
1
,
2
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
1
,
2
),
1e-
5
yield
self
.
create_inference_config
(),
(
1
,
2
),
1e-
3
def
test
(
self
):
self
.
run_test
()
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_hard_swish.py
浏览文件 @
36ab58f8
...
...
@@ -100,7 +100,7 @@ class TrtConvertHardSwishTest(TrtLayerAutoScanTest):
attrs
,
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
(
1e-
5
,
1e-5
)
attrs
,
False
),
(
1e-
3
,
1e-3
)
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
...
...
@@ -109,7 +109,7 @@ class TrtConvertHardSwishTest(TrtLayerAutoScanTest):
attrs
,
True
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
True
),
(
1e-
5
,
1e-5
)
attrs
,
True
),
(
1e-
3
,
1e-3
)
def
test
(
self
):
self
.
run_test
()
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_leaky_relu.py
浏览文件 @
36ab58f8
...
...
@@ -104,10 +104,10 @@ class TrtConvertLeakyReluTest(TrtLayerAutoScanTest):
attrs
,
False
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
(
1e-
5
,
1e-5
)
attrs
,
False
),
(
1e-
3
,
1e-3
)
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Int8
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
False
),
(
1e-
5
,
1e-5
)
attrs
,
False
),
(
1e-
3
,
1e-3
)
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
...
...
@@ -116,10 +116,10 @@ class TrtConvertLeakyReluTest(TrtLayerAutoScanTest):
attrs
,
True
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
True
),
(
1e-
5
,
1e-5
)
attrs
,
True
),
(
1e-
3
,
1e-3
)
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Int8
yield
self
.
create_inference_config
(),
generate_trt_nodes_num
(
attrs
,
True
),
(
1e-
5
,
1e-5
)
attrs
,
True
),
(
1e-
3
,
1e-3
)
def
test
(
self
):
self
.
run_test
()
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_matmul.py
浏览文件 @
36ab58f8
...
...
@@ -102,7 +102,7 @@ class TrtConvertMatmulTest_static(TrtLayerAutoScanTest):
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
5
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
3
def
test
(
self
):
self
.
run_test
()
...
...
@@ -198,7 +198,7 @@ class TrtConvertMatmulTest_dynamic(TrtLayerAutoScanTest):
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Float32
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-5
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
5
yield
self
.
create_inference_config
(),
(
1
,
3
),
1e-
3
def
add_skip_trt_case
(
self
):
pass
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_multihead_matmul.py
浏览文件 @
36ab58f8
...
...
@@ -427,7 +427,7 @@ class TrtConvertMultiHeadMatmulTest(TrtLayerAutoScanTest):
self
.
trt_param
.
workspace_size
=
2013265920
yield
self
.
create_inference_config
(),
(
1
,
4
),
(
1e-5
,
1e-5
)
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
1
,
4
),
(
1e-
5
,
1e-5
)
yield
self
.
create_inference_config
(),
(
1
,
4
),
(
1e-
3
,
1e-3
)
# for dynamic_shape
generate_dynamic_shape
(
attrs
)
...
...
@@ -435,7 +435,7 @@ class TrtConvertMultiHeadMatmulTest(TrtLayerAutoScanTest):
self
.
trt_param
.
workspace_size
=
2013265920
yield
self
.
create_inference_config
(),
(
1
,
3
),
(
1e-5
,
1e-4
)
self
.
trt_param
.
precision
=
paddle_infer
.
PrecisionType
.
Half
yield
self
.
create_inference_config
(),
(
1
,
3
),
(
1e-
5
,
1e-5
)
yield
self
.
create_inference_config
(),
(
1
,
3
),
(
1e-
3
,
1e-3
)
def
add_skip_trt_case
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录