MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / PyTensorObject_cpu

Function PyTensorObject_cpu

oneflow/api/python/framework/tensor_functions.cpp:490–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488}
489
490static PyObject* PyTensorObject_cpu(PyObject* self, PyObject* unused) {
491 HANDLE_ERRORS
492 Optional<std::string> device = "cpu";
493 return PyTensor_New(ASSERT_PTR(functional::To(PyTensor_Unpack(self), device, NullOpt, false)));
494 END_HANDLE_ERRORS
495}
496
497static PyObject* PyTensorObject_cuda(PyObject* self, PyObject* args, PyObject* kwargs) {
498 HANDLE_ERRORS

Callers

nothing calls this directly

Calls 1

PyTensor_NewFunction · 0.85

Tested by

no test coverage detected