提交 55d89363 编写于 作者: S ShiningZhang

fix --min_subgraph_size

上级 1e41fa42
......@@ -223,7 +223,7 @@ def serve_args():
parser.add_argument(
"--request_cache_size", type=int, default=0, help="Port of the Prometheus")
parser.add_argument(
"--min_subgraph_size", type=int, default="", nargs="+", help="min_subgraph_size")
"--min_subgraph_size", type=str, default="", nargs="+", help="min_subgraph_size")
return parser.parse_args()
......
......@@ -214,8 +214,12 @@ class Server(object):
self.request_cache_size = request_cache_size
def set_min_subgraph_size(self, min_subgraph_size):
if isinstance(min_subgraph_size, list):
self.min_subgraph_size = list(map(int, min_subgraph_size))
for s in min_subgraph_size:
try:
size = int(s)
except:
size = 3
self.min_subgraph_size.append(size)
def set_trt_dynamic_shape_info(self, info):
self.trt_dynamic_shape_info = info
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册