MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ReturnStream

Method ReturnStream

tensorflow/compiler/xla/service/stream_pool.cc:55–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void StreamPool::ReturnStream(se::Stream* stream) {
56 if (stream->ok()) {
57 VLOG(1) << stream->DebugStreamPointers()
58 << " StreamPool returning ok stream";
59 tensorflow::mutex_lock lock(mu_);
60 streams_.emplace_back(stream);
61 } else {
62 // If the stream has encountered any errors, all subsequent operations on it
63 // will fail. So just delete the stream, and rely on new streams to be
64 // created in the future.
65 VLOG(1) << stream->DebugStreamPointers()
66 << " StreamPool deleting !ok stream";
67 delete stream;
68 }
69}
70
71} // namespace xla

Callers 1

operator()Method · 0.80

Calls 3

DebugStreamPointersMethod · 0.80
okMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected