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

Function GetDriverExecutor

tensorflow/stream_executor/rocm/rocm_driver.cc:127–131  ·  view source on GitHub ↗

ROCM driver routines may require a large amount of stack (particularly hipModuleLoadDataEx, in our experience). To avoid stack overflow when using stack-limited threads (such as those spawned by a default-argument thread::ThreadPool on some platforms), we run certain routines in this pool and wait for completion.

Source from the content-addressed store, hash-verified

125// thread::ThreadPool on some platforms), we run certain routines in this pool
126// and wait for completion.
127port::ThreadPool* GetDriverExecutor() {
128 static port::ThreadPool* thread_pool = new port::ThreadPool(
129 port::Env::Default(), port::ThreadOptions(), "rocm_driver", 1);
130 return thread_pool;
131}
132
133} // namespace
134

Callers 1

LoadHsacoMethod · 0.70

Calls 2

DefaultFunction · 0.85
ThreadOptionsClass · 0.85

Tested by

no test coverage detected