未验证 提交 c4bed7e4 编写于 作者: F feng_shuai 提交者: GitHub

stride_slice don't support trt6 (#42639)

上级 c5232b4b
...@@ -941,6 +941,11 @@ bool OpTeller::Tell(const framework::ir::Node* node, bool use_no_calib_int8, ...@@ -941,6 +941,11 @@ bool OpTeller::Tell(const framework::ir::Node* node, bool use_no_calib_int8,
} }
if (op_type == "strided_slice") { if (op_type == "strided_slice") {
#if !IS_TRT_VERSION_GE(7000)
VLOG(3)
<< "strided_slice converter does not support trt versions below 7.0";
return false;
#endif
if (!with_dynamic_shape) { if (!with_dynamic_shape) {
return false; return false;
} }
......
...@@ -103,6 +103,9 @@ class TrtConvertStridedSliceTest(TrtLayerAutoScanTest): ...@@ -103,6 +103,9 @@ class TrtConvertStridedSliceTest(TrtLayerAutoScanTest):
for x in attrs[0]["axes"]: for x in attrs[0]["axes"]:
if x == 0: if x == 0:
return 0, 3 return 0, 3
ver = paddle_infer.get_trt_compile_version()
if ver[0] * 1000 + ver[1] * 100 + ver[2] * 10 < 7000:
return 0, 3
return 1, 2 return 1, 2
attrs = [ attrs = [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册