Home
last modified time | relevance | path

Searched refs:WithDevice (Results 1 – 25 of 43) sorted by relevance

12

/external/tensorflow/tensorflow/core/grappler/optimizers/
Dmemory_optimizer_test.cc232 ops::Variable(s.WithOpName("a").WithDevice("/gpu:0"), {10, 10}, DT_FLOAT); in TEST_F()
233 Output b = ops::AddN(s.WithOpName("b").WithDevice("/gpu:0"), {a}); in TEST_F()
234 Output c = ops::AddN(s.WithOpName("c").WithDevice("/gpu:0"), {b}); in TEST_F()
235 Output d = ops::AddN(s.WithOpName("d").WithDevice("/gpu:0"), {c}); in TEST_F()
236 Output e = ops::AddN(s.WithOpName("e").WithDevice("/gpu:0"), {b, d}); in TEST_F()
299 Output v = ops::Variable(s.WithOpName("v").WithDevice("/gpu:0"), in TEST_F()
301 Output a = ops::Identity(s.WithOpName("a").WithDevice("/gpu:0"), v); in TEST_F()
302 Output b = ops::Square(s.WithOpName("b").WithDevice("/gpu:0"), v); in TEST_F()
303 Output c = ops::Sqrt(s.WithOpName("c").WithDevice("/gpu:0"), a); in TEST_F()
304 Output d = ops::Identity(s.WithOpName("d").WithDevice("/gpu:0"), b); in TEST_F()
[all …]
Ddependency_optimizer_test.cc295 Output x = ops::RandomUniform(s.WithOpName("x").WithDevice("/CPU:0"), {1, 2}, in TEST_F()
297 Output y = ops::RandomUniform(s.WithOpName("y").WithDevice("/CPU:0"), {1, 2}, in TEST_F()
300 auto noop = ops::NoOp(s.WithControlDependencies(x).WithDevice("/CPU:1")); in TEST_F()
303 s.WithControlDependencies(x).WithControlDependencies(y).WithDevice( in TEST_F()
306 s.WithControlDependencies({noop.operation}).WithDevice("/CPU:1"), x); in TEST_F()
309 .WithDevice("/CPU:1"), in TEST_F()
330 Output x = ops::RandomUniform(s.WithOpName("x").WithDevice("/CPU:0"), {1, 2}, in TEST_F()
332 Output y = ops::RandomUniform(s.WithOpName("y").WithDevice("/CPU:0"), {1, 2}, in TEST_F()
335 auto id_a = ops::Identity(s.WithOpName("id_a").WithDevice("/CPU:1"), x); in TEST_F()
338 s.WithOpName("id_b").WithControlDependencies(y).WithDevice("/CPU:0"), x); in TEST_F()
[all …]
Dgeneric_layout_optimizer_transposer_test.cc112 scope->WithOpName("conv2d").WithDevice("/device:GPU:0"), input, filter, in SimpleConv2D()
141 scope.WithOpName("bn").WithDevice("/device:GPU:0"), x, scale, offset, in CreateSimpleFusedBatchNorm()
169 scope.WithOpName("maxpool_grad").WithDevice("/device:GPU:0"), input, in CreateSimpleMaxPoolGrad()
174 scope.WithOpName("maxpool_grad").WithDevice("/device:GPU:0"), input, in CreateSimpleMaxPoolGrad()
188 ops::BiasAddGrad(scope.WithOpName("bag").WithDevice("/device:GPU:0"), in CreateSimpleBiasAddGrad()
207 scope.WithOpName("conv2d_backprop_filter").WithDevice("/device:GPU:0"), in CreateSimpleConv2DBackpropFilter()
219 scope.WithOpName("conv2d_backprop_filter").WithDevice("/device:GPU:0"), in CreateSimpleConv2DBackpropFilter()
245 scope.WithOpName("conv2d_backprop_input").WithDevice("/device:GPU:0"), in CreateSimpleConv2DBackpropInput()
269 scope.WithOpName("fused_batch_norm_grad").WithDevice("/device:GPU:0"), in CreateSimpleFusedBatchNormGrad()
297 scope.WithOpName("conv2d").WithDevice("/device:GPU:0"), input, filter, in CreateSimpleAddN()
[all …]
Dmodel_pruner_test.cc452 ops::Const(s.WithOpName("c").WithDevice(kDeviceCPU0), 0.0f, {10, 10}); in TEST_F()
455 Output i1 = ops::Identity(s.WithOpName("i1").WithDevice(kDeviceGPU0), c); in TEST_F()
456 Output a1 = ops::Identity(s.WithOpName("a1").WithDevice(kDeviceGPU0), i1); in TEST_F()
457 Output a2 = ops::Identity(s.WithOpName("a2").WithDevice(kDeviceGPU0), i1); in TEST_F()
460 Output i2 = ops::Identity(s.WithOpName("i2").WithDevice(kDeviceCPU0), c); in TEST_F()
461 Output a3 = ops::Identity(s.WithOpName("a3").WithDevice(kDeviceGPU0), i2); in TEST_F()
462 Output a4 = ops::Identity(s.WithOpName("a4").WithDevice(kDeviceGPU0), i2); in TEST_F()
477 ops::Const(s.WithOpName("c").WithDevice(kDeviceCPU0), 0.0f, {10, 10}); in TEST_F()
480 Output i1 = ops::Identity(s.WithOpName("i1").WithDevice(kDeviceGPU0), c); in TEST_F()
481 Output a1 = ops::Identity(s.WithOpName("a1").WithDevice(kDeviceGPU0), i1); in TEST_F()
[all …]
Dshape_optimizer_test.cc36 tensorflow::Scope s = tensorflow::Scope::NewRootScope().WithDevice("/cpu:0"); in TEST_F()
98 tensorflow::Scope s = tensorflow::Scope::NewRootScope().WithDevice("/cpu:0"); in TEST_F()
103 Output e = ops::ReduceProd(s.WithDevice("/gpu:0").WithOpName("e"), c, d, in TEST_F()
Dpin_to_host_optimizer_test.cc201 ops::Const(s.WithOpName("a").WithDevice("/device:GPU:0"), 1, {64, 64}); in TEST_F()
204 ops::ReduceProd(s.WithOpName("c").WithDevice("/device:GPU:0"), a, b); in TEST_F()
205 Output d = ops::Identity(s.WithDevice("/device:CPU:0").WithOpName("d"), c); in TEST_F()
Dscoped_allocator_optimizer_test.cc85 s = s.WithDevice("/job:localhost/replica:0/task:0/device:CPU:0"); in BuildAbsGraph()
135 s = s.WithDevice("/job:localhost/replica:0/task:0/device:CPU:0"); in BuildAbsGraphWithInputDependencies()
170 s = s.WithDevice("/job:localhost/replica:0/task:0/device:CPU:0"); in BuildAbsGraphWithInputAndOutputControlEdges()
214 root_scope.WithDevice("/job:localhost/replica:0/task:0/device:CPU:0"); in BuildGraphWithMultipleScopes()
257 s = s.WithDevice("/job:localhost/replica:0/task:0/device:CPU:0"); in BuildConstGraph()
/external/tensorflow/tensorflow/core/grappler/inputs/
Dtrivial_test_graph_input_yielder.cc40 Output x = RandomNormal(s.WithOpName("x").WithDevice("/CPU:0"), in CreateGraphDef()
51 Sign(s.WithDevice( in CreateGraphDef()
58 AddN(s.WithDevice( in CreateGraphDef()
69 FIFOQueue queue(s.WithOpName("queue").WithDevice("/CPU:0"), in CreateGraphDef()
71 QueueEnqueue enqueue(s.WithOpName("enqueue").WithDevice("/CPU:0"), queue, in CreateGraphDef()
73 QueueDequeue dequeue(s.WithOpName("dequeue").WithDevice("/CPU:0"), queue, in CreateGraphDef()
75 QueueClose cancel(s.WithOpName("cancel").WithDevice("/CPU:0"), queue, in CreateGraphDef()
81 AddN output(s.WithOpName("y").WithDevice("/CPU:0"), last_stage); in CreateGraphDef()
/external/tensorflow/tensorflow/core/graph/
Dcollective_order_test.cc86 .WithDevice(device) in CollectiveReduceNode()
115 builder.opts().WithName("a").WithDevice(dev0)); in InitGraph()
117 builder.opts().WithName("b").WithDevice(dev1)); in InitGraph()
122 builder.opts().WithName("id0").WithDevice(dev0).WithAttr("T", DT_FLOAT)); in InitGraph()
125 builder.opts().WithName("id1").WithDevice(dev1).WithAttr("T", DT_FLOAT)); in InitGraph()
170 builder.opts().WithName("a").WithDevice(dev0)); in InitGraph2()
175 builder.opts().WithName("id").WithDevice(dev0).WithAttr("T", DT_FLOAT)); in InitGraph2()
206 builder.opts().WithName("w").WithDevice(dev0)); in InitGraphForPruning()
208 builder.opts().WithName("x").WithDevice(dev0)); in InitGraphForPruning()
210 builder.opts().WithName("y").WithDevice(dev0)); in InitGraphForPruning()
[all …]
Dgraph_partition_test.cc200 scope_a_(Scope::NewRootScope().ExitOnError().WithDevice( in GraphPartitionTest()
202 scope_b_(Scope::NewRootScope().ExitOnError().WithDevice( in GraphPartitionTest()
412 Scope cpu0 = in_.WithDevice("/job:a/replica:0/task:0/cpu:0"); in TEST_F()
425 Scope cpu1 = s.WithDevice("/job:a/replica:0/task:0/cpu:1"); in TEST_F()
/external/tensorflow/tensorflow/compiler/xrt/tests/
Draw_api_test.cc391 Scope root = Scope::NewRootScope().WithDevice(DeviceFromFlag()); in TEST()
417 Scope root = Scope::NewRootScope().WithDevice(DeviceFromFlag()); in TEST()
457 auto new_value = ops::Const(root.WithDevice("/device:CPU:0"), in TEST()
488 Scope root = Scope::NewRootScope().WithDevice(DeviceFromFlag()); in TEST()
515 Scope root = Scope::NewRootScope().WithDevice(DeviceFromFlag()); in TEST()
540 Scope root = Scope::NewRootScope().WithDevice(DeviceFromFlag()); in TEST()
570 Scope root = Scope::NewRootScope().WithDevice(DeviceFromFlag()); in TEST()
572 ops::Const(root.WithDevice("/device:CPU:0"), alloc.SerializeAsString()); in TEST()
589 auto new_value = ops::Const(root.WithDevice("/device:CPU:0"), in TEST()
621 Scope root = Scope::NewRootScope().WithDevice(DeviceFromFlag()); in TEST()
[all …]
/external/tensorflow/tensorflow/compiler/jit/
Dclone_constants_for_better_clustering_test.cc66 Scope on_gpu = root.WithAssignedDevice(kGPU).WithDevice(kGPU); in TEST()
67 Scope on_cpu = root.WithAssignedDevice(kCPU).WithDevice(kCPU); in TEST()
93 Scope on_gpu = root.WithAssignedDevice(kGPU).WithDevice(kGPU); in TEST()
119 Scope on_gpu = root.WithAssignedDevice(kGPU).WithDevice(kGPU); in TEST()
151 Scope on_gpu = root.WithAssignedDevice(kGPU).WithDevice(kGPU); in TEST()
152 Scope on_cpu = root.WithAssignedDevice(kCPU).WithDevice(kCPU); in TEST()
180 Scope on_gpu = root.WithAssignedDevice(kGPU).WithDevice(kGPU); in TEST()
181 Scope on_cpu = root.WithAssignedDevice(kCPU).WithDevice(kCPU); in TEST()
Dbuild_xla_ops_pass_test.cc135 Scope root = Scope::NewRootScope().WithDevice(kXlaDeviceName).ExitOnError(); in TEST_F()
213 Scope root = Scope::NewRootScope().WithDevice(kXlaDeviceName).ExitOnError(); in TEST_F()
279 .WithDevice(kXlaDeviceName) in TEST_F()
Dbuild_xla_ops_pass.cc137 .WithDevice(cpu_device) in MergeOutgoingDataEdges()
152 .WithDevice(new_node->requested_device()) in MergeOutgoingDataEdges()
492 .WithDevice(n->requested_device()) in ReplaceNodeWithXlaCompileAndXlaRun()
/external/tensorflow/tensorflow/core/framework/
Dvariant_op_copy_test.cc165 Scope root = Scope::NewRootScope().WithDevice("/cpu:0"); in TEST()
199 Scope root = Scope::NewRootScope().WithDevice("/gpu:0"); in TEST()
242 Scope root = Scope::NewRootScope().WithDevice("/gpu:0"); in TEST()
269 Scope root = Scope::NewRootScope().WithDevice("/cpu:0"); in TEST()
293 Scope root = Scope::NewRootScope().WithDevice("/cpu:0"); in TEST()
319 Scope root = Scope::NewRootScope().WithDevice("/cpu:0"); in TEST()
320 Scope with_gpu = root.WithDevice("/gpu:0"); in TEST()
356 Scope root = Scope::NewRootScope().WithDevice("/cpu:0"); in TEST()
357 Scope with_gpu = root.WithDevice("/gpu:0"); in TEST()
/external/tensorflow/tensorflow/core/grappler/costs/
Dgraph_memory_test.cc196 Output a = ops::Const(s.WithOpName("a").WithDevice("/CPU:0"), 10.0f, {3}); in TEST_F()
198 ops::Variable(s.WithOpName("v").WithDevice("/CPU:0"), {3}, DT_FLOAT); in TEST_F()
200 ops::Assign(s.WithOpName("assign").WithDevice("/CPU:0"), v, a); in TEST_F()
202 s.WithOpName("init").WithDevice("/CPU:0").WithControlDependencies( in TEST_F()
Dvirtual_scheduler_test.cc698 Scope s = Scope::NewRootScope().WithDevice(kCPU0); in CreateGrapplerItemWithConv2Ds()
723 Scope s = Scope::NewRootScope().WithDevice(kCPU0); in CreateGrapplerItemWithConv2DAndVariable()
741 Scope s = Scope::NewRootScope().WithDevice(kCPU0); in CreateGrapplerItemWithMatmulChain()
772 Scope s = Scope::NewRootScope().WithDevice(kCPU0); in CreateGrapplerItemWithAddN()
791 Scope s = Scope::NewRootScope().WithDevice(kCPU0); in CreateGrapplerItemWithUnnecessaryPlaceholderNodes()
808 Scope s = Scope::NewRootScope().WithDevice(kCPU0); in CreateGrapplerItemWithControlDependency()
828 Scope s = Scope::NewRootScope().WithDevice(kCPU0); in CreateGrapplerItemWithAddFromOneTensor()
851 Scope s = Scope::NewRootScope().WithDevice(kCPU0); in CreateGrapplerItemWithSwitchMergeInput()
876 Scope s = Scope::NewRootScope().WithDevice(kCPU0); in CreateGrapplerItemWithBatchNorm()
2211 tensorflow::Scope s = tensorflow::Scope::NewRootScope().WithDevice(kCPU0); in CreateGrapplerItemWithInterDeviceTransfers()
[all …]
/external/tensorflow/tensorflow/core/common_runtime/
Dplacer_test.cc808 b.opts().WithName("in").WithDevice("/device:FakeCPU:1")); in TEST_F()
830 ops::SourceOp("TestInput", b.opts().WithName("in").WithDevice("/job:a")); in TEST_F()
832 b.opts().WithName("var").WithDevice("/job:a")); in TEST_F()
867 b.opts().WithName("in").WithDevice("/device:FakeGPU:0")); in TEST_F()
869 b.opts().WithName("var").WithDevice("/device:FakeGPU:0")); in TEST_F()
888 b.opts().WithName("ds").WithDevice("/device:FakeCPU:0")); in TEST_F()
1106 b.opts().WithName("in").WithDevice("/job:a/task:0/device:FakeGPU:0")); in TEST_F()
1108 ops::SourceOp("TestVariable", b.opts().WithName("var_0").WithDevice( in TEST_F()
1114 b.opts().WithName("assign").WithDevice( in TEST_F()
1135 b.opts().WithName("in").WithDevice("/job:a/task:0")); in TEST_F()
[all …]
Dpartitioning_utils_test.cc61 s = s.WithDevice(device0_->name()); in SwapGraph()
79 Scope s1 = s.WithDevice("/job:a/replica:0/task:0/device:CPU:0"); in TwoDeviceSwapGraph()
80 Scope s2 = s.WithDevice("/job:a/replica:0/task:0/device:CPU:1"); in TwoDeviceSwapGraph()
99 Scope s1 = s.WithDevice("/job:a/replica:0/task:0/device:CPU:0"); in SubGraph()
/external/tensorflow/tensorflow/cc/framework/
Dwhile_gradients_test.cc192 scope_ = scope_.WithDevice("/cpu:0"); in TEST_F()
204 Scope cpu1_scope = s.WithDevice("/cpu:1"); in TEST_F()
211 Scope cpu1_scope = scope_.WithDevice("/cpu:1"); in TEST_F()
Dscope.h140 Scope WithDevice(const string& device) const;
/external/tensorflow/tensorflow/compiler/tf2xla/
Dfused_batchnorm_reserve_space_test.cc115 root.WithOpName("fused_batch_norm_tf").WithDevice(tf_device), input, in TEST()
118 root.WithOpName("fused_batch_norm_xla").WithDevice(xla_device), input, in TEST()
/external/tensorflow/tensorflow/core/util/
Dequal_graph_def_test.cc136 Input(e_.opts().WithName("A").WithDevice("/cpu:0")); in TEST_F()
137 Input(a_.opts().WithName("A").WithDevice("/cpu:0")); in TEST_F()
142 Input(e_.opts().WithName("A").WithDevice("/cpu:0")); in TEST_F()
143 Input(a_.opts().WithName("A").WithDevice("/cpu:1")); in TEST_F()
/external/tensorflow/tensorflow/go/op/
Dscope_test.go118 s = s.WithDevice("/device:GPU:0")
120 s = s.WithDevice("")
/external/tensorflow/tensorflow/core/grappler/utils/
Dgrappler_test.h118 return tensorflow::Scope::NewRootScope().WithDevice(string(device)); in CreateScopeWithDevice()

12