提交 813dd2f1 编写于 作者: M Megvii Engine Team

fix(mge/core): support non-Tensor args for `core.tensor.utils.get_device`

GitOrigin-RevId: 51dc03db9ed4bacc3f4bd0a5f9fd2be914605ed6
上级 9f5bb42d
......@@ -764,7 +764,7 @@ CompNode _get_device(PyObject*const* args, size_t nargs) {
}
}
if (!valid) {
mgb_assert(0, "expect at least 1 device");
return CompNode::load(get_default_device());
}
Py_XDECREF(tuple);
return cn;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册