aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/gpu/gpu_executable.cc
diff options
context:
space:
mode:
authorGravatar Sanjoy Das <sanjoy@google.com>2017-11-22 12:39:54 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-22 12:50:33 -0800
commit4b636957604faa3361a799dd9d8749a6b85afff7 (patch)
treee2b674a1f3f1a488c5487e4b4ad74483b8500397 /tensorflow/compiler/xla/service/gpu/gpu_executable.cc
parent8af1600d49ff4cc16063ab1aafbde52be9347c62 (diff)
Place HloProfilePrinter and HloProfileIndexMap in Executable
This refactoring will later allow XlaCompiledCpuFunction to pull out the HloProfilePrinter from Executable and use that to display the hlo execution profile. A de/serialized HloProfilePrinter will let AOT compiled binaries display their Hlo execution profile. PiperOrigin-RevId: 176689528
Diffstat (limited to 'tensorflow/compiler/xla/service/gpu/gpu_executable.cc')
-rw-r--r--tensorflow/compiler/xla/service/gpu/gpu_executable.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/tensorflow/compiler/xla/service/gpu/gpu_executable.cc b/tensorflow/compiler/xla/service/gpu/gpu_executable.cc
index c6f23f9b05..0fd85e4fb0 100644
--- a/tensorflow/compiler/xla/service/gpu/gpu_executable.cc
+++ b/tensorflow/compiler/xla/service/gpu/gpu_executable.cc
@@ -113,14 +113,15 @@ GpuExecutable::GpuExecutable(
std::unique_ptr<const ThunkSchedule> thunk_schedule,
std::unique_ptr<const HloModule> hlo_module,
std::unique_ptr<const BufferAssignment> assignment,
- HloCostAnalysis::ShapeSizeFunction shape_size_function)
- : Executable(std::move(hlo_module)),
+ std::unique_ptr<HloProfilePrinter> hlo_profile_printer,
+ std::unique_ptr<HloProfileIndexMap> hlo_profile_index_map)
+ : Executable(std::move(hlo_module), std::move(hlo_profile_printer),
+ std::move(hlo_profile_index_map)),
ptx_(ptx),
cubin_(cubin),
compute_capability_(compute_capability),
thunk_schedule_(std::move(thunk_schedule)),
- assignment_(std::move(assignment)),
- shape_size_function_(std::move(shape_size_function)) {}
+ assignment_(std::move(assignment)) {}
Status GpuExecutable::ExecuteThunks(
const ServiceExecutableRunOptions* run_options,
@@ -358,9 +359,5 @@ const PointsToSet& GpuExecutable::GetRootPointsToSet() const {
module().entry_computation()->root_instruction());
}
-std::unique_ptr<HloCostAnalysis> GpuExecutable::CreateCostAnalysis() const {
- return MakeUnique<HloCostAnalysis>(shape_size_function_);
-}
-
} // namespace gpu
} // namespace xla