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

Method CreateStream

oneflow/core/vm/virtual_machine.cpp:384–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382}
383
384Maybe<vm::Stream*> VirtualMachine::CreateStream(Symbol<Stream> stream) {
385 std::unique_lock<std::recursive_mutex> lock(stream_and_thread_ctx_mutex_);
386 vm::ThreadCtx* thread_ctx =
387 JUST(FindOrCreateThreadCtx(stream->device(), stream->stream_type(), stream->thread_uid()));
388 return JUST(CreateStream(thread_ctx, stream));
389}
390
391Maybe<vm::Stream*> VirtualMachine::GetVmStream(Symbol<Stream> stream) {
392 if (stream->unique_stream_id() >= unique_stream_id2vm_stream_.size()) {

Callers 1

GetOrCreateEpStreamMethod · 0.45

Calls 10

push_backMethod · 0.80
InsertProbeMethod · 0.80
mut_stream_listMethod · 0.80
deviceMethod · 0.45
stream_typeMethod · 0.45
thread_uidMethod · 0.45
PushBackMethod · 0.45
MutableMethod · 0.45
DecreaseMethod · 0.45
WaitUntilCntEqualZeroMethod · 0.45

Tested by

no test coverage detected