aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/stream_executor_internal.cc
blob: b2785e0874a8770c2627b2ed9ae22fbdace2e12d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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