Home
last modified time | relevance | path

Searched refs:use_gpu (Results 1 – 25 of 231) sorted by relevance

12345678910

/external/tensorflow/tensorflow/python/kernel_tests/
Dmorphological_ops_test.py33 def _VerifyValues(self, image, kernel, strides, rates, padding, out, use_gpu): argument
48 with self.cached_session(use_gpu=use_gpu):
58 def _testDilationValidPadding(self, use_gpu): argument
72 use_gpu=use_gpu)
74 def _testDilationSamePadding(self, use_gpu): argument
88 use_gpu=use_gpu)
90 def _testDilationSamePaddingDepth(self, use_gpu): argument
104 use_gpu=use_gpu)
106 def _testDilationSamePaddingBatch(self, use_gpu): argument
120 use_gpu=use_gpu)
[all …]
Dpooling_ops_test.py43 def GetDeviceScope(self, use_gpu=False): argument
45 if use_gpu and test.is_gpu_available():
49 return self.session(use_gpu=use_gpu)
109 data_format, data_type, expected, use_gpu, v2): argument
144 with self.cached_session(use_gpu=use_gpu):
186 data_format, expected, use_gpu, v2): argument
208 data_format, dtypes.float32, expected, use_gpu, v2)
210 data_format, dtypes.float64, expected, use_gpu, v2)
212 if not use_gpu or test_util.CudaSupportsHalfMatMulAndConv():
214 data_format, dtypes.float16, expected, use_gpu, v2)
[all …]
Dstack_ops_test.py36 def _testStackPushPop(self, use_gpu): argument
37 with self.cached_session(use_gpu=use_gpu):
47 self._testStackPushPop(use_gpu=False)
48 self._testStackPushPop(use_gpu=True)
50 def _testStackPushPopSwap(self, use_gpu): argument
51 with self.cached_session(use_gpu=use_gpu):
63 self._testStackPushPopSwap(use_gpu=False)
64 self._testStackPushPopSwap(use_gpu=True)
66 def _testStackWhileSwap(self, use_gpu): argument
67 with self.cached_session(use_gpu=use_gpu):
[all …]
Dconv_ops_test.py165 def _DtypesToTest(self, use_gpu): argument
166 if use_gpu and not test_util.CudaSupportsHalfMatMulAndConv():
180 strides, padding, data_format, dtype, use_gpu): argument
200 with test_util.device(use_gpu):
240 def _SetupVal(data_format, use_gpu): argument
241 with test_util.device(use_gpu):
255 for (data_format, use_gpu) in GetTestConfigs():
256 tensors.append(_SetupVal(data_format, use_gpu))
263 use_gpu): argument
266 with test_util.device(use_gpu):
[all …]
Dsoftmax_op_test.py57 def _testSoftmax(self, np_features, dim=-1, log=False, use_gpu=False): argument
63 with self.cached_session(use_gpu=use_gpu):
78 self._testSoftmax(features, use_gpu=True)
79 self._testSoftmax(features, log=True, use_gpu=True)
80 self._testOverflow(use_gpu=True)
108 def _testOverflow(self, use_gpu=False): argument
109 if use_gpu:
115 with self.cached_session(use_gpu=use_gpu):
162 np.array([3., 2., 3., 9.]).astype(np.float64), use_gpu=False)
163 self._testOverflow(use_gpu=False)
[all …]
Dshape_ops_test.py53 def _compareShape(self, x, use_gpu=False): argument
55 with self.cached_session(use_gpu=use_gpu):
64 def _compareShapeSparse(self, x_np, use_gpu=False): argument
67 with self.cached_session(use_gpu=use_gpu):
73 def _compareShapeN(self, x, use_gpu=False): argument
75 with self.cached_session(use_gpu=use_gpu) as sess:
85 def _compareRank(self, x, use_gpu=False): argument
87 with self.cached_session(use_gpu=use_gpu):
93 def _compareRankSparse(self, x_np, use_gpu=False): argument
96 with self.cached_session(use_gpu=use_gpu):
[all …]
Ddepthwise_conv_op_test.py104 use_gpu, argument
132 with self.session(graph=graph, use_gpu=use_gpu) as sess:
182 data_type, use_gpu, grouped_conv,
199 input_size, filter_size, stride, padding, data_type, use_gpu=True)
207 use_gpu=True,
214 with self.session(use_gpu=True):
239 use_gpu=True,
245 expected, use_gpu): argument
268 with self.cached_session(use_gpu=use_gpu) as sess:
335 use_gpu=False)
[all …]
Dbasic_gpu_test.py43 with self.cached_session(use_gpu=True) as sess:
49 with self.cached_session(use_gpu=False) as sess:
94 def _compare(self, x, np_func, tf_func, use_gpu): argument
96 with self.cached_session(use_gpu=use_gpu) as sess:
108 def _testDtype(self, dtype, use_gpu): argument
111 self._compare(data, np.abs, math_ops.abs, use_gpu)
112 self._compare(data, np.arccos, math_ops.acos, use_gpu)
113 self._compare(data, np.arcsin, math_ops.asin, use_gpu)
114 self._compare(data, np.arcsinh, math_ops.asinh, use_gpu)
115 self._compare(data_gt_1, np.arccosh, math_ops.acosh, use_gpu)
[all …]
Dxent_op_test.py55 def _testXent(self, np_features, np_labels, use_gpu=False): argument
57 with self.cached_session(use_gpu=use_gpu) as sess:
64 def _testXentWrapper(self, np_features, np_labels, dim=-1, use_gpu=False): argument
66 with self.cached_session(use_gpu=use_gpu) as sess:
75 self._testXent(features, labels, use_gpu=False)
76 self._testXent(features, labels, use_gpu=True)
78 def _testSingleClass(self, use_gpu=False): argument
80 with self.cached_session(use_gpu=use_gpu) as sess:
149 for use_gpu in [False, True]:
150 with self.cached_session(use_gpu=use_gpu) as sess:
[all …]
Dbias_op_test.py48 def _testBias(self, np_inputs, np_bias, use_gpu=False): argument
50 with self.cached_session(use_gpu=use_gpu):
75 def _testBiasNCHW(self, np_inputs, np_bias, use_gpu): argument
78 with self.cached_session(use_gpu=use_gpu):
84 self._testBias(np_inputs, np_bias, use_gpu=False)
85 self._testBiasNCHW(np_inputs, np_bias, use_gpu=False)
87 self._testBias(np_inputs, np_bias, use_gpu=True)
88 self._testBiasNCHW(np_inputs, np_bias, use_gpu=True)
141 def _testGradient(self, np_input, bias, dtype, data_format, use_gpu): argument
142 with self.cached_session(use_gpu=use_gpu):
[all …]
Ddense_update_ops_test.py33 def _initAssignFetch(self, x, y, use_gpu=False): argument
36 with self.cached_session(use_gpu=use_gpu):
43 def _initAssignAddFetch(self, x, y, use_gpu=False): argument
45 with self.cached_session(use_gpu=use_gpu):
52 def _initAssignSubFetch(self, x, y, use_gpu=False): argument
54 with self.cached_session(use_gpu=use_gpu):
65 var_value, op_value = self._initAssignFetch(x, y, use_gpu=False)
68 var_value, op_value = self._initAssignAddFetch(x, y, use_gpu=False)
71 var_value, op_value = self._initAssignSubFetch(x, y, use_gpu=False)
75 var_value, op_value = self._initAssignFetch(x, y, use_gpu=True)
[all …]
Dconv_ops_3d_test.py52 def _DtypesToTest(self, use_gpu): argument
53 if use_gpu:
64 padding, data_format, dtype, use_gpu): argument
77 with self.cached_session(use_gpu=use_gpu):
99 for data_format, use_gpu in GetTestConfigs():
100 for dtype in self._DtypesToTest(use_gpu):
108 use_gpu=use_gpu)
124 use_gpu): argument
136 with self.cached_session(use_gpu=use_gpu):
175 for data_format, use_gpu in GetTestConfigs():
[all …]
Dclip_ops_test.py55 with self.session(use_gpu=True):
70 with self.cached_session(use_gpu=True):
86 with self.cached_session(use_gpu=True):
103 with self.cached_session(use_gpu=True):
120 with self.cached_session(use_gpu=True):
133 with self.session(use_gpu=True):
156 with self.session(use_gpu=True):
172 with self.session(use_gpu=True):
179 with self.session(use_gpu=True):
188 with self.session(use_gpu=True):
[all …]
Dsegment_reduction_ops_test.py116 for use_gpu in [True, False]:
117 with self.cached_session(use_gpu=use_gpu):
141 for use_gpu in [True, False]:
142 with self.cached_session(use_gpu=use_gpu):
153 for use_gpu in [True, False]:
154 with self.cached_session(use_gpu=use_gpu):
162 for use_gpu in [True, False]:
163 with self.cached_session(use_gpu=use_gpu):
173 for use_gpu in [True, False]:
174 with self.cached_session(use_gpu=use_gpu):
[all …]
Dcwise_ops_test.py89 with test_util.use_gpu():
122 with test_util.use_gpu():
222 def _compareBinary(self, x, y, np_func, tf_func, use_gpu=False): argument
224 with test_util.device(use_gpu=use_gpu):
233 def _not(self, x, use_gpu=False): argument
235 with test_util.device(use_gpu=use_gpu):
244 for use_gpu in [True, False]:
246 self._not(x, use_gpu)
250 use_gpu)
251 self._compareBinary(x, y, np.logical_or, math_ops.logical_or, use_gpu)
[all …]
Dcast_op_test.py57 def _cast(self, x, dtype, use_gpu=False): argument
58 with self.cached_session(use_gpu=use_gpu):
62 def _test(self, x, dtype, use_gpu=False): argument
65 tf_ans = self._cast(x, dtype, use_gpu)
68 def _testTypes(self, x, use_gpu=False): argument
70 if use_gpu:
81 self._test(x.astype(from_type), to_type, use_gpu)
83 self._test(x.astype(np.bool), np.float32, use_gpu)
84 self._test(x.astype(np.uint8), np.float32, use_gpu)
85 if not use_gpu:
[all …]
Dneon_depthwise_conv_op_test.py95 use_gpu, argument
118 with self.cached_session(use_gpu=use_gpu) as sess:
164 input_size, filter_size, stride, padding, use_gpu=True)
166 input_size, filter_size, stride, padding, use_gpu=False)
181 use_gpu=True,
187 expected, use_gpu): argument
210 with self.cached_session(use_gpu=use_gpu) as sess:
279 use_gpu=False)
287 use_gpu=True)
Dsparse_xent_op_test.py67 with self.cached_session(use_gpu=True) as sess:
76 with self.cached_session(use_gpu=True) as sess:
91 with self.session(use_gpu=True) as sess:
105 with self.session(use_gpu=False) as sess:
146 with self.session(use_gpu=True):
152 with self.session(use_gpu=True):
159 with self.session(use_gpu=True):
167 with self.session(use_gpu=True):
195 with self.session(use_gpu=True):
230 with self.cached_session(use_gpu=True) as sess:
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/random/
Drandom_ops_test.py45 use_gpu, argument
48 with self.session(use_gpu=use_gpu, graph=ops.Graph()) as sess:
65 def _Sampler(self, num, mu, sigma, dtype, use_gpu, seed=None): argument
68 with self.session(use_gpu=use_gpu, graph=ops.Graph()) as sess:
83 sampler = self._Sampler(1000, 0.0, 1.0, dt, use_gpu=True)
100 for use_gpu in [False, True]:
102 1000000, 0.0, 1.0, dt, use_gpu=use_gpu, seed=12345)
103 results[use_gpu] = sampler()
112 sx = self._Sampler(1000, 0.0, 1.0, dt, use_gpu=True, seed=345)
113 sy = self._Sampler(1000, 0.0, 1.0, dt, use_gpu=True, seed=345)
[all …]
Drandom_gamma_test.py43 def _Sampler(self, num, alpha, beta, dtype, use_gpu, seed=None): argument
46 with self.session(use_gpu=use_gpu, graph=ops.Graph()) as sess:
85 20000, alpha, 1 / scale, dt, use_gpu=False, seed=12345)
114 for use_gpu in [False, True]:
117 10000, alpha, 1.0, dt, use_gpu=use_gpu, seed=12345)
122 failures += [(use_gpu, dt)]
135 for use_gpu in [False, True]:
137 sampler = self._Sampler(1000, 2.0, 1.0, dt, use_gpu=use_gpu)
144 print(use_gpu, dt)
155 for use_gpu in [False, True]:
[all …]
/external/tensorflow/tensorflow/contrib/sparsemax/python/kernel_tests/
Dsparsemax_test.py72 def _tf_sparsemax(self, z, dtype, use_gpu): argument
73 with self.test_session(use_gpu=use_gpu):
79 def _test_sparsemax_against_numpy(self, dtype, random, use_gpu): argument
83 tf_sparsemax_op, tf_sparsemax_out = self._tf_sparsemax(z, dtype, use_gpu)
90 def _test_sparsemax_of_nan(self, dtype, random, use_gpu): argument
98 _, tf_sparsemax_nan = self._tf_sparsemax(z_nan, dtype, use_gpu)
103 def _test_sparsemax_of_inf(self, dtype, random, use_gpu): argument
115 _, tf_sparsemax_neg = self._tf_sparsemax(z_neg, dtype, use_gpu)
119 _, tf_sparsemax_pos = self._tf_sparsemax(z_pos, dtype, use_gpu)
124 _, tf_sparsemax_mix = self._tf_sparsemax(z_mix, dtype, use_gpu)
[all …]
Dsparsemax_loss_test.py81 def _tf_sparsemax(self, z, dtype, use_gpu): argument
82 with self.test_session(use_gpu=use_gpu):
88 def _tf_sparsemax_loss(self, z, q, dtype, use_gpu): argument
92 with self.test_session(use_gpu=use_gpu):
99 def _test_sparsemax_loss_against_numpy(self, dtype, random, use_gpu): argument
105 tf_loss_op, tf_loss_out = self._tf_sparsemax_loss(z, q, dtype, use_gpu)
112 def _test_sparsemax_loss_of_nan(self, dtype, random, use_gpu): argument
118 _, tf_loss_nan = self._tf_sparsemax_loss(z_nan, q, dtype, use_gpu)
121 def _test_sparsemax_loss_of_inf(self, dtype, random, use_gpu): argument
137 _, tf_loss_neg = self._tf_sparsemax_loss(z_neg, q, dtype, use_gpu)
[all …]
/external/tensorflow/tensorflow/python/ops/
Dnn_fused_batchnorm_test.py61 use_gpu=True, argument
70 with self.cached_session(use_gpu=use_gpu) as sess:
113 use_gpu=True, argument
119 with self.cached_session(use_gpu=use_gpu) as sess:
186 use_gpu=True, argument
194 with self.cached_session(use_gpu=use_gpu):
246 use_gpu=True, argument
256 with self.cached_session(use_gpu=use_gpu) as sess:
347 x_shape, dtype, [1], np.float32, use_gpu=True, data_format='NHWC')
349 x_shape, dtype, [1], np.float32, use_gpu=True, data_format='NCHW')
[all …]
/external/tensorflow/tensorflow/contrib/rnn/python/kernel_tests/
Drnn_test.py44 use_gpu, argument
101 def _testStackBidirectionalRNN(self, use_gpu, use_shape): argument
102 with self.session(use_gpu=use_gpu, graph=ops.Graph()) as sess:
104 self._createStackBidirectionalRNN(use_gpu, use_shape, True))
153 def _testStackBidirectionalRNNStates(self, use_gpu): argument
162 with self.session(use_gpu=use_gpu, graph=ops.Graph()) as sess:
177 self._createStackBidirectionalRNN(use_gpu, True, True,
216 self._testStackBidirectionalRNN(use_gpu=False, use_shape=False)
217 self._testStackBidirectionalRNN(use_gpu=True, use_shape=False)
218 self._testStackBidirectionalRNN(use_gpu=False, use_shape=True)
[all …]
/external/tensorflow/tensorflow/contrib/reduce_slice_ops/python/kernel_tests/
Dreduce_slice_ops_test.py34 with self.test_session(use_gpu=True):
43 with self.test_session(use_gpu=True):
56 with self.test_session(use_gpu=True):
69 with self.test_session(use_gpu=True):
79 with self.test_session(use_gpu=True):
88 with self.test_session(use_gpu=True):
97 with self.test_session(use_gpu=True):
106 with self.test_session(use_gpu=True):
114 with self.test_session(use_gpu=True):
122 with self.test_session(use_gpu=True):
[all …]

12345678910