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

Function CopyFromNumpyArray

oneflow/api/python/framework/tensor.cpp:491–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489
490namespace {
491void CopyFromNumpyArray(ep::Stream* stream,
492 const std::shared_ptr<vm::EagerBlobObject>& eager_blob_object,
493 const NumPyArrayPtr& array_ptr) {
494 SyncAutoMemcpy(stream, eager_blob_object->mut_dptr(), array_ptr.data(),
495 eager_blob_object->ByteSizeOfBlobBody(), eager_blob_object->mem_case(),
496 memory::MakeHostMemCase());
497}
498
499void CopyToNumpyArray(ep::Stream* stream,
500 const std::shared_ptr<vm::EagerBlobObject>& eager_blob_object,

Callers

nothing calls this directly

Calls 5

SyncAutoMemcpyFunction · 0.85
MakeHostMemCaseFunction · 0.85
mut_dptrMethod · 0.45
dataMethod · 0.45
ByteSizeOfBlobBodyMethod · 0.45

Tested by

no test coverage detected