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

Method record

imperative/src/impl/physical_tensor.cpp:320–329  ·  view source on GitHub ↗

record an event on cn

Source from the content-addressed store, hash-verified

318
319 //! record an event on cn
320 uint64_t record(CompNode cn, bool doitnow = false) {
321 std::unique_lock lock(m_mtx);
322 auto cnid = get_cnid_unsafe(cn);
323 if (doitnow) {
324 return do_record(cn, cnid, lock)->first;
325 }
326 //! if we do not DOITNOW, we only increase the counter, and then the get_event()
327 //! function will do the actual recording
328 return m_cndata[cnid].next++;
329 }
330
331 //! try to async release a resource until `cn` complete event `t`
332 void async_release(CompNode cn, uint64_t t, BlobPtr blob) {

Callers 8

record_deviceMethod · 0.45
do_recordMethod · 0.45
record_eventFunction · 0.45
fetch_valueMethod · 0.45
initializeMethod · 0.45
rotateMethod · 0.45
compileMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected