diff options
author | Manjunath Kudlur <keveman@gmail.com> | 2015-11-06 16:27:58 -0800 |
---|---|---|
committer | Manjunath Kudlur <keveman@gmail.com> | 2015-11-06 16:27:58 -0800 |
commit | f41959ccb2d9d4c722fe8fc3351401d53bcf4900 (patch) | |
tree | ef0ca22cb2a5ac4bdec9d080d8e0788a53ed496d /tensorflow/stream_executor/stream_executor_internal.cc |
TensorFlow: Initial commit of TensorFlow library.
TensorFlow is an open source software library for numerical computation
using data flow graphs.
Base CL: 107276108
Diffstat (limited to 'tensorflow/stream_executor/stream_executor_internal.cc')
-rw-r--r-- | tensorflow/stream_executor/stream_executor_internal.cc | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/tensorflow/stream_executor/stream_executor_internal.cc b/tensorflow/stream_executor/stream_executor_internal.cc new file mode 100644 index 0000000000..b2785e0874 --- /dev/null +++ b/tensorflow/stream_executor/stream_executor_internal.cc @@ -0,0 +1,65 @@ +#include "tensorflow/stream_executor/stream_executor_internal.h" + +#include "tensorflow/stream_executor/lib/statusor.h" +#include "tensorflow/stream_executor/lib/stringprintf.h" + +namespace perftools { +namespace gputools { +namespace internal { + +// -- CUDA + +StreamExecutorFactory* MakeCUDAExecutorImplementation() { + static StreamExecutorFactory instance; + return &instance; +} +EventFactory* MakeCUDAEventImplementation() { + static EventFactory instance; + return &instance; +} +StreamFactory* MakeCUDAStreamImplementation() { + static StreamFactory instance; + return &instance; +} +TimerFactory* MakeCUDATimerImplementation() { + static TimerFactory instance; + return &instance; +} +KernelFactory* MakeCUDAKernelImplementation() { + static KernelFactory instance; + return &instance; +} + +// -- OpenCL + +StreamExecutorFactory* MakeOpenCLExecutorImplementation() { + static StreamExecutorFactory instance; + return &instance; +} +StreamExecutorFactory* MakeOpenCLAlteraExecutorImplementation() { + static StreamExecutorFactory instance; + return &instance; +} +StreamFactory* MakeOpenCLStreamImplementation() { + static StreamFactory instance; + return &instance; +} +TimerFactory* MakeOpenCLTimerImplementation() { + static TimerFactory instance; + return &instance; +} +KernelFactory* MakeOpenCLKernelImplementation() { + static KernelFactory instance; + return &instance; +} + +// -- Host + +StreamExecutorFactory MakeHostExecutorImplementation; +StreamFactory MakeHostStreamImplementation; +TimerFactory MakeHostTimerImplementation; + + +} // namespace internal +} // namespace gputools +} // namespace perftools |