Home
last modified time | relevance | path

Searched refs:computation (Results 1 – 25 of 714) sorted by relevance

12345678910>>...29

/external/tensorflow/tensorflow/compiler/xla/service/
Dhlo_schedule.cc36 for (const HloComputation* computation : module->computations()) { in CreateFromProto() local
37 id_to_computation[computation->unique_id()] = computation; in CreateFromProto()
47 const HloComputation* computation = comp_it->second; in CreateFromProto() local
50 for (HloInstruction* instruction : computation->instructions()) { in CreateFromProto()
55 schedule.GetOrCreateSequence(computation); in CreateFromProto()
59 << "No instruction exists in HLO computation " << computation->name() in CreateFromProto()
84 void HloSchedule::set_sequence(const HloComputation* computation, in set_sequence() argument
86 set_sequence(computation, HloInstructionSequence(sequence)); in set_sequence()
89 void HloSchedule::set_sequence(const HloComputation* computation, in set_sequence() argument
91 CHECK(computation->parent() == module_); in set_sequence()
[all …]
Dhlo_module.cc52 std::unique_ptr<HloComputation> computation, bool is_entry, in AddComputationInternal() argument
56 entry_computation_ = computation.get(); in AddComputationInternal()
69 computation->UniquifyName(&computation_name_uniquer_); in AddComputationInternal()
70 for (auto* instruction : computation->instructions()) { in AddComputationInternal()
75 for (auto* instruction : computation->instructions()) { in AddComputationInternal()
79 CHECK_NE(computation->root_instruction()->unique_id(), -1) in AddComputationInternal()
80 << "Root has no valid id: " << computation->ToString(); in AddComputationInternal()
81 computation->SetUniqueId(computation->root_instruction()->unique_id()); in AddComputationInternal()
88 computation_name_uniquer_.GetUniqueName(computation->name()); in AddComputationInternal()
89 for (auto* instruction : computation->instructions()) { in AddComputationInternal()
[all …]
Dcomputation_placer.cc44 for (int computation = 0; computation < computation_count(); ++computation) { in Serialize() local
48 computation_device->add_replica_device_ids((*this)(replica, computation)); in Serialize()
65 for (int computation = 0; computation < proto.computation_count(); in Deserialize() local
66 ++computation) { in Deserialize()
67 const auto& computation_device = proto.computation_devices(computation); in Deserialize()
71 (*assignment)(replica, computation) = in Deserialize()
81 for (int computation = 0; computation < computation_count(); ++computation) { in ToString() local
82 StrAppend(&output, "Computation ", computation, ": "); in ToString()
84 StrAppend(&output, operator()(replica, computation), " "); in ToString()
91 StatusOr<int> ComputationPlacer::DeviceId(int replica, int computation, in DeviceId() argument
[all …]
Dhlo_memory_scheduler.cc78 HloComputation* computation, in Run() argument
83 ListScheduler scheduler(computation, points_to_analysis, size_function, in Run()
103 ListScheduler(HloComputation* computation, in ListScheduler() argument
108 : computation_(computation), in ListScheduler()
116 for (auto* instruction : computation->instructions()) { in ListScheduler()
131 for (auto* instruction : computation->instructions()) { in ListScheduler()
137 for (auto* instruction : computation->instructions()) { in ListScheduler()
146 points_to_analysis.GetPointsToSet(computation->root_instruction()) in ListScheduler()
402 HloComputation* computation, in ScheduleComputationHelper() argument
408 VLOG(2) << "Computation: " << computation->name(); in ScheduleComputationHelper()
[all …]
Dhlo_creation_utils.cc37 HloComputation* computation = lhs->parent(); in MakeBinaryHlo() local
38 CHECK_EQ(computation, rhs->parent()); in MakeBinaryHlo()
41 return computation->AddInstruction( in MakeBinaryHlo()
48 HloComputation* computation = lhs->parent(); in MakeCompareHlo() local
49 CHECK_EQ(computation, rhs->parent()); in MakeCompareHlo()
53 return computation->AddInstruction( in MakeCompareHlo()
60 HloComputation* computation = operand->parent(); in MakePadHlo() local
61 CHECK_EQ(computation, padding_value->parent()); in MakePadHlo()
66 return computation->AddInstruction(HloInstruction::CreatePad( in MakePadHlo()
74 HloComputation* computation = operand->parent(); in MakeSliceHlo() local
[all …]
Dhlo_cse_test.cc63 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
65 EXPECT_EQ(3, computation->instruction_count()); in TEST_F()
70 EXPECT_EQ(2, computation->instruction_count()); in TEST_F()
71 HloInstruction* constant = *computation->instructions().begin(); in TEST_F()
93 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
95 EXPECT_EQ(3, computation->instruction_count()); in TEST_F()
101 EXPECT_EQ(2, computation->instruction_count()); in TEST_F()
125 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
127 EXPECT_EQ(3, computation->instruction_count()); in TEST_F()
133 EXPECT_EQ(3, computation->instruction_count()); in TEST_F()
[all …]
Dhlo_dce_test.cc44 bool HasInstruction(const HloComputation& computation, in HasInstruction() argument
46 return absl::c_linear_search(computation.instructions(), instruction); in HasInstruction()
61 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
63 EXPECT_EQ(3, computation->instruction_count()); in TEST_F()
68 EXPECT_EQ(3, computation->instruction_count()); in TEST_F()
82 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
84 EXPECT_EQ(4, computation->instruction_count()); in TEST_F()
89 EXPECT_EQ(4, computation->instruction_count()); in TEST_F()
112 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
114 EXPECT_EQ(5, computation->instruction_count()); in TEST_F()
[all …]
Dreshape_mover_test.cc54 auto computation = m->AddEntryComputation(builder.Build()); in TEST_F() local
56 EXPECT_THAT(computation->root_instruction(), in TEST_F()
61 EXPECT_THAT(computation->root_instruction(), in TEST_F()
97 auto computation = m->AddEntryComputation(builder.Build()); variable
99 EXPECT_THAT(computation->root_instruction(),
104 EXPECT_THAT(computation->root_instruction(),
123 auto computation = m->AddEntryComputation(builder.Build()); in TEST_F() local
125 EXPECT_THAT(computation->root_instruction(), in TEST_F()
131 computation->root_instruction(), in TEST_F()
150 auto computation = m->AddEntryComputation(builder.Build()); in TEST_F() local
[all …]
Dreduce_precision_insertion_test.cc58 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
61 EXPECT_EQ(computation->root_instruction(), b); in TEST_F()
70 EXPECT_EQ(computation->root_instruction(), b); in TEST_F()
85 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
88 EXPECT_EQ(computation->root_instruction(), b); in TEST_F()
97 EXPECT_EQ(computation->root_instruction(), b); in TEST_F()
115 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
118 EXPECT_EQ(computation->root_instruction(), c); in TEST_F()
128 EXPECT_EQ(computation->root_instruction(), c); in TEST_F()
144 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
[all …]
Ddefuser_test.cc33 for (HloComputation* computation : m->computations()) { in FusionCount()
34 if (computation->IsFusionComputation()) { in FusionCount()
71 auto computation = m->AddEntryComputation(builder.Build()); in TEST_F() local
72 computation->CreateFusionInstruction({add}, in TEST_F()
75 EXPECT_THAT(computation->root_instruction(), op::Fusion()); in TEST_F()
81 EXPECT_THAT(computation->root_instruction(), in TEST_F()
97 auto computation = m->AddEntryComputation(builder.Build()); in TEST_F() local
98 computation->CreateFusionInstruction({add}, in TEST_F()
101 EXPECT_THAT(computation->root_instruction(), op::Negate(op::Fusion())); in TEST_F()
107 EXPECT_THAT(computation->root_instruction(), in TEST_F()
[all …]
Dhlo_computation_test.cc112 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
114 auto embedded_computations = computation->MakeEmbeddedComputationsList(); in TEST_F()
130 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
131 EXPECT_THAT(computation->MakeInstructionPostOrder(), ElementsAre(constant)); in TEST_F()
145 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
146 EXPECT_THAT(computation->MakeInstructionPostOrder(), in TEST_F()
162 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
164 EXPECT_THAT(computation->MakeInstructionPostOrder(), in TEST_F()
181 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
182 EXPECT_THAT(computation->MakeInstructionPostOrder(), in TEST_F()
[all …]
Dalgebraic_simplifier_test.cc67 auto computation = m->AddEntryComputation(builder.Build()); in TEST_F() local
68 HloInstruction* root = computation->root_instruction(); in TEST_F()
72 root = computation->root_instruction(); in TEST_F()
290 auto computation = m->AddEntryComputation(builder.Build()); in TEST_F() local
291 HloInstruction* root = computation->root_instruction(); in TEST_F()
295 EXPECT_EQ(computation->root_instruction(), zero); in TEST_F()
312 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
313 HloInstruction* root = computation->root_instruction(); in TEST_F()
317 EXPECT_EQ(computation->root_instruction(), param0); in TEST_F()
334 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
[all …]
Dhlo_dce.cc44 for (auto* computation : module->MakeComputationPostOrder()) { in Run() local
49 for (auto* instruction : computation->instructions()) { in Run()
50 if (instruction != computation->root_instruction() && in Run()
52 computation->IsRemovable(instruction) && in Run()
62 computation->RemoveInstructionAndUnusedOperands(dead_root)); in Run()
73 for (auto* computation : module->MakeComputationPostOrder()) { in Run() local
74 for (auto* instruction : computation->instructions()) { in Run()
82 for (auto* computation : module->MakeComputationPostOrder()) { in Run() local
83 if (!live_computations.contains(computation)) { in Run()
84 TF_RETURN_IF_ERROR(module->RemoveEmbeddedComputation(computation)); in Run()
Ddot_decomposer.cc35 auto computation = dot->parent(); in DecomposeBatchDot() local
97 auto lhs_r3 = computation->AddInstruction( in DecomposeBatchDot()
99 auto rhs_r3 = computation->AddInstruction( in DecomposeBatchDot()
106 auto lhs_slice_r3 = computation->AddInstruction( in DecomposeBatchDot()
109 auto lhs_slice_r2 = computation->AddInstruction( in DecomposeBatchDot()
113 auto rhs_slice_r3 = computation->AddInstruction( in DecomposeBatchDot()
116 auto rhs_slice_r2 = computation->AddInstruction( in DecomposeBatchDot()
124 computation->AddInstruction(HloInstruction::CreateTranspose( in DecomposeBatchDot()
131 computation->AddInstruction(HloInstruction::CreateTranspose( in DecomposeBatchDot()
139 auto dot_r2 = computation->AddInstruction( in DecomposeBatchDot()
[all …]
Dcall_graph.cc80 [](string* out, const HloComputation* computation) { in ToString() argument
81 out->append(computation->name()); in ToString()
85 CallGraphNode::CallGraphNode(HloComputation* computation) in CallGraphNode() argument
86 : computation_(computation) {} in CallGraphNode()
107 CHECK_EQ(instruction->parent(), computation()); in AddCallSiteForInstruction()
129 const HloComputation* computation) const { in GetNode()
130 auto it = node_indices_.find(computation); in GetNode()
135 CallGraphNode& CallGraph::GetNode(const HloComputation* computation) { in GetNode() argument
136 auto it = node_indices_.find(computation); in GetNode()
197 for (const HloComputation* computation : module_->computations()) { in SetCallContexts() local
[all …]
Dflatten_call_graph.cc34 HloComputation* computation, in ReplaceCalledComputation() argument
38 if (computation == instruction->while_condition()) { in ReplaceCalledComputation()
41 CHECK_EQ(computation, instruction->while_body()); in ReplaceCalledComputation()
47 CHECK_EQ(instruction->to_apply(), computation); in ReplaceCalledComputation()
54 CHECK_EQ(computation, instruction->branch_computation(b)); in ReplaceCalledComputation()
56 if (computation == instruction->branch_computation(b)) { in ReplaceCalledComputation()
71 HloComputation* computation = node.computation(); in FlattenNode() local
72 HloModule* module = computation->parent(); in FlattenNode()
90 module->AddEmbeddedComputation(computation->Clone()); in FlattenNode()
91 ReplaceCalledComputation(call_site.instruction(), computation, clone); in FlattenNode()
Dhlo_cse.cc45 StatusOr<bool> CombineConstants(HloComputation* computation, in CombineConstants() argument
47 TF_ASSIGN_OR_RETURN(auto domain_map, HloDomainMap::Create(computation, "")); in CombineConstants()
55 auto inst_it = computation->instructions().begin(); in CombineConstants()
56 while (inst_it != computation->instructions().end()) { in CombineConstants()
85 TF_CHECK_OK(computation->RemoveInstruction(instruction)); in CombineConstants()
90 VLOG(4) << "Combined " << combined << " constants in " << computation->name() in CombineConstants()
127 for (auto* computation : module->computations()) { in Run() local
128 if (only_fusion_computations_ && !computation->IsFusionComputation()) { in Run()
133 CombineConstants(computation, is_layout_sensitive_)); in Run()
141 representatives(/*N=*/computation->instruction_count() + 1, &CseHash, in Run()
[all …]
Dhlo_constant_folding_test.cc51 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
53 EXPECT_THAT(computation->root_instruction(), in TEST_F()
60 EXPECT_THAT(computation->root_instruction(), GmockMatch(m::Constant())); in TEST_F()
61 EXPECT_EQ(computation->root_instruction()->literal().GetFirstElement<int64>(), in TEST_F()
73 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
75 EXPECT_THAT(computation->root_instruction(), in TEST_F()
82 EXPECT_THAT(computation->root_instruction(), GmockMatch(m::Constant())); in TEST_F()
83 EXPECT_EQ(computation->root_instruction()->literal().GetFirstElement<float>(), in TEST_F()
95 auto computation = module->AddEntryComputation(builder.Build()); in TEST_F() local
97 EXPECT_THAT(computation->root_instruction(), in TEST_F()
[all …]
/external/tensorflow/tensorflow/compiler/xla/tests/
Dcompilation_cache_test.cc41 void ExecuteComputationR0F32(const XlaComputation& computation, in ExecuteComputationR0F32() argument
47 ->ExecuteAndTransfer(computation, arguments, in ExecuteComputationR0F32()
57 const XlaComputation& computation, in ExecuteComputationR2F32() argument
63 ->Execute(computation, arguments, in ExecuteComputationR2F32()
79 XlaComputation computation = builder.Build().ConsumeValueOrDie(); in XLA_TEST_F() local
81 ExecuteComputationR0F32(computation, {}, -42.0, /*expect_cache_hit=*/false); in XLA_TEST_F()
82 ExecuteComputationR0F32(computation, {}, -42.0, /*expect_cache_hit=*/true); in XLA_TEST_F()
83 ExecuteComputationR0F32(computation, {}, -42.0, /*expect_cache_hit=*/true); in XLA_TEST_F()
101 XlaComputation computation = builder.Build().ConsumeValueOrDie(); in XLA_TEST_F() local
103 ExecuteComputationR0F32(computation, {data_42.get()}, -42.0, in XLA_TEST_F()
[all …]
Dcompute_constant_test.cc102 auto computation = ConstantR0<int32>(&b, 42); in TEST_F() local
103 EXPECT_TRUE(IsConstant(computation, &b)); in TEST_F()
105 auto value = ComputeConstantScalar<int32>(client, computation, &b); in TEST_F()
115 auto computation = in TEST_F() local
117 EXPECT_TRUE(IsConstant(computation, &b)); in TEST_F()
119 auto value = ComputeConstantScalar<float>(client, computation, &b); in TEST_F()
129 auto computation = in TEST_F() local
132 EXPECT_FALSE(IsConstant(computation, &b)); in TEST_F()
134 auto value = ComputeConstantScalar<float>(client, computation, &b); in TEST_F()
144 auto computation = Parameter(&b, 0, ShapeUtil::MakeShape(F32, {}), "param"); in TEST_F() local
[all …]
Dbad_rng_shape_validation_test.cc43 StatusOr<XlaComputation> computation = builder.Build(); in TEST_F() local
44 EXPECT_FALSE(computation.ok()); in TEST_F()
45 LOG(INFO) << "status received: " << computation.status(); in TEST_F()
46 EXPECT_THAT(computation.status().error_message(), in TEST_F()
60 StatusOr<XlaComputation> computation = builder.Build(); in TEST_F() local
61 ASSERT_TRUE(computation.ok()); in TEST_F()
62 LOG(INFO) << computation.status(); in TEST_F()
/external/tensorflow/tensorflow/compiler/aot/
Dtest.cc54 void zero_buffers(XlaCompiledCpuFunction* computation) { in zero_buffers() argument
55 for (int i = 0; i < computation->num_args(); ++i) { in zero_buffers()
56 memset(computation->arg_data(i), 0, computation->arg_size(i)); in zero_buffers()
65 CPP_CLASS computation; in TEST() local
66 computation.set_thread_pool(&device); in TEST()
67 zero_buffers(&computation); in TEST()
69 EXPECT_TRUE(computation.Run()); in TEST()
79 CPP_CLASS computation; in BM_NAME() local
80 computation.set_thread_pool(&device); in BM_NAME()
81 zero_buffers(&computation); in BM_NAME()
[all …]
/external/tensorflow/tensorflow/compiler/xla/client/
Dclient.h62 const XlaComputation& computation,
90 const XlaComputation& computation,
101 const XlaComputation& computation; member
106 XlaComputationInstance(const XlaComputation& computation, in XlaComputationInstance()
110 : computation(computation), in XlaComputationInstance()
171 const XlaComputation& computation,
192 const XlaComputation& computation,
204 const XlaComputation& computation,
214 const XlaComputation& computation);
232 StatusOr<string> ExecutionStatsAsString(const XlaComputation& computation,
/external/tensorflow/tensorflow/contrib/batching/python/ops/
Dbatch_ops_test.py176 computation = batched[0] + 1
177 result = batch_ops.unbatch(computation, index, id_t,
196 def computation(in_t): function
200 result = computation(inp)
221 def computation(in_t): function
226 result = computation(inp)
246 def computation(in_t): function
250 result = computation(inp)
268 def computation(in_t): function
278 f=computation,
[all …]
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_TPUReplicate.pbtxt7 the inputs to 'computation', flattened, in replica-major order.
15 computation.
29 the outputs of 'computation'.
33 name: "computation"
35 a function containing the computation to run.
41 the number of replicas of the computation to run.
60 a bool indicating if this computation will run on TPU or CPU/GPU.
61 Currently, only supports a default placement (computation is placed on GPU
70 of logical cores in each replica of a computation to physical coordinates in
77 the types of the arguments to 'computation'.
[all …]

12345678910>>...29