MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / call_cuda_forksafe

Function call_cuda_forksafe

src/core/impl/comp_node/cuda/comp_node.cpp:822–825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

820#ifndef __unix__
821template <typename Func, typename Val>
822CUresult call_cuda_forksafe(Func func, Val* val, size_t len) {
823 cuInit(0);
824 return func();
825}
826#else
827struct RAIICloseFD : NonCopyableObj {
828 int m_fd = -1;

Callers

nothing calls this directly

Calls 4

writeFunction · 0.85
readFunction · 0.85
funcFunction · 0.50
closeMethod · 0.45

Tested by

no test coverage detected