Browse Source

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

GitOrigin-RevId: 51dc03db9e
release-1.4
Megvii Engine Team 4 years ago
parent
commit
94b5e1b046
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      imperative/python/src/tensor.cpp

+ 1
- 1
imperative/python/src/tensor.cpp View File

@@ -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;


Loading…
Cancel
Save