提交 17f2dffb 编写于 作者: M Megvii Engine Team

fix(imperative/cpu/multithread): fix multithread at imperative

GitOrigin-RevId: 9120d5cb48e1087f38a826d377ca3c6bae984730
上级 3159eeca
......@@ -50,7 +50,9 @@ _sh = _stream_helper()
def _valid_device(inp):
if isinstance(inp, str) and re.match("^([cxg]pu|rocm)(\d+|\d+:\d+|x)$", inp):
if isinstance(inp, str) and re.match(
"^([cxg]pu|rocm|multithread)(\d+|\d+:\d+|x)$", inp
):
return True
return False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册