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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
diff --git a/tensorflow/core/platform/path.cc b/tensorflow/core/platform/path.cc
--- a/tensorflow/core/platform/path.cc
+++ b/tensorflow/core/platform/path.cc
@@ -329,6 +329,7 @@
}
LOG(FATAL) << "No temp directory found.";
#endif
+ std::abort();
}
bool GetTestUndeclaredOutputsDir(string* dir) {
diff --git a/tensorflow/core/framework/device_base.cc b/tensorflow/core/framework/device_base.cc
--- a/tensorflow/core/framework/device_base.cc
+++ b/tensorflow/core/framework/device_base.cc
@@ -65,10 +65,12 @@
const DeviceAttributes& DeviceBase::attributes() const {
LOG(FATAL) << "Device does not implement attributes()";
+ std::abort();
}
const string& DeviceBase::name() const {
LOG(FATAL) << "Device does not implement name()";
+ std::abort();
}
void DeviceBase::set_eigen_cpu_device(Eigen::ThreadPoolDevice* d) {
diff --git a/tensorflow/core/kernels/depthtospace_op.cc b/tensorflow/core/kernels/depthtospace_op.cc
--- a/tensorflow/core/kernels/depthtospace_op.cc
+++ b/tensorflow/core/kernels/depthtospace_op.cc
@@ -117,13 +117,13 @@
// NCHW_VECT_C with 4 x qint8 can be treated as NCHW int32.
auto Tinput_v = input.template reinterpret_last_dimension<int32, 4>();
auto Toutput_v = outputs_tensor->reinterpret_last_dimension<int32, 4>();
- functor::DepthToSpaceOpFunctor<GPUDevice, int32, FORMAT_NCHW> functor;
- functor(context->eigen_device<GPUDevice>(), Tinput_v, block_size_,
+ functor::DepthToSpaceOpFunctor<Device, int32, FORMAT_NCHW> functor;
+ functor(context->eigen_device<Device>(), Tinput_v, block_size_,
Toutput_v);
return;
} else if (data_format_ == FORMAT_NCHW) {
- functor::DepthToSpaceOpFunctor<GPUDevice, T, FORMAT_NCHW> functor;
- functor(context->eigen_device<GPUDevice>(), Tinput, block_size_,
+ functor::DepthToSpaceOpFunctor<Device, T, FORMAT_NCHW> functor;
+ functor(context->eigen_device<Device>(), Tinput, block_size_,
Toutput);
return;
}
@@ -173,6 +173,15 @@
}
}
};
+#ifdef WIN32
+template <typename T>
+struct DepthToSpaceOpFunctor<CPUDevice, T, FORMAT_NCHW> {
+ void operator()(const CPUDevice& d, typename TTypes<T, 4>::ConstTensor input,
+ int block_size, typename TTypes<T, 4>::Tensor output) {
+ LOG(FATAL) << "dummy implementation to make debug build compile";
+ }
+};
+#endif
} // namespace functor
#define REGISTER(type) \
diff --git a/tensorflow/core/kernels/spacetodepth_op.cc b/tensorflow/core/kernels/spacetodepth_op.cc
--- a/tensorflow/core/kernels/spacetodepth_op.cc
+++ b/tensorflow/core/kernels/spacetodepth_op.cc
@@ -132,18 +132,18 @@
// NCHW_VECT_C with 4 x qint8 can be treated as NCHW int32.
auto Tinput_v = input.template reinterpret_last_dimension<int32, 4>();
auto Toutput_v = outputs_tensor->reinterpret_last_dimension<int32, 4>();
- functor::SpaceToDepthOpFunctor<GPUDevice, int32, FORMAT_NCHW> functor;
- functor(context->eigen_device<GPUDevice>(), Tinput_v, block_size_,
+ functor::SpaceToDepthOpFunctor<Device, int32, FORMAT_NCHW> functor;
+ functor(context->eigen_device<Device>(), Tinput_v, block_size_,
Toutput_v);
} else if (data_format_ == FORMAT_NCHW) {
CHECK((std::is_same<T, RT>::value));
- functor::SpaceToDepthOpFunctor<GPUDevice, RT, FORMAT_NCHW> functor;
- functor(context->eigen_device<GPUDevice>(), input.tensor<RT, 4>(),
+ functor::SpaceToDepthOpFunctor<Device, RT, FORMAT_NCHW> functor;
+ functor(context->eigen_device<Device>(), input.tensor<RT, 4>(),
block_size_, outputs_tensor->tensor<RT, 4>());
} else {
CHECK((std::is_same<T, RT>::value));
- functor::SpaceToDepthOpFunctor<GPUDevice, RT, FORMAT_NHWC> functor;
- functor(context->eigen_device<GPUDevice>(), input.tensor<RT, 4>(),
+ functor::SpaceToDepthOpFunctor<Device, RT, FORMAT_NHWC> functor;
+ functor(context->eigen_device<Device>(), input.tensor<RT, 4>(),
block_size_, outputs_tensor->tensor<RT, 4>());
}
} else {
@@ -188,6 +188,15 @@
}
}
};
+#ifdef WIN32
+template <typename T>
+struct SpaceToDepthOpFunctor<CPUDevice, T, FORMAT_NCHW> {
+ void operator()(const CPUDevice& d, typename TTypes<T, 4>::ConstTensor input,
+ int block_size, typename TTypes<T, 4>::Tensor output) {
+ LOG(FATAL) << "dummy implementation to make debug build compile";
+ }
+};
+#endif
} // namespace functor
#define REGISTER(type) \
|