string HloModuleConfig::compilation_cache_key() const {
string key =
- tensorflow::strings::StrCat("profiling=", hlo_profiling_enabled_);
+ tensorflow::strings::StrCat("profiling=", hlo_profiling_enabled());
StrAppend(&key, "::(");
std::vector<string> params;
for (const ShapeLayout& param_layout :
return &(*entry_computation_layout_);
}
- // Sets/returns whether to enable HLO-level profiling.
- bool hlo_profiling_enabled() const { return hlo_profiling_enabled_; }
- void enable_hlo_profiling(bool enabled) { hlo_profiling_enabled_ = enabled; }
+ // Returns whether to enable HLO-level profiling.
+ bool hlo_profiling_enabled() const {
+ return debug_options_.xla_hlo_profile();
+ }
// Sets/returns whether this is a "host module". Host modules are used to
// record the data- and control-flow dependencies of host side computation
tensorflow::gtl::optional<ComputationLayout> entry_computation_layout_;
- // Whether to enable HLO-level profiling.
- bool hlo_profiling_enabled_ = false;
-
// Whether this is a 'host module'.
bool is_host_module_ = false;
TF_ASSIGN_OR_RETURN(
std::unique_ptr<ShapedBuffer> result,
- executable->ExecuteOnStream(&service_run_options, argument_buffer_ptrs,
- /*hlo_execution_profile=*/nullptr));
+ executable->ExecuteOnStreamWrapper(
+ &service_run_options, /*profile=*/nullptr, argument_buffer_ptrs));
// Create a ScopedShapedBuffer of the result to manage deallocation. This will
// deallocate all the device memory when it goes out of scope.
if (execution_options != nullptr) {
config->set_seed(execution_options->seed());
config->set_debug_options(execution_options->debug_options());
- config->enable_hlo_profiling(
- execution_options->debug_options().xla_hlo_profile());
} else {
config->set_debug_options(legacy_flags::GetDebugOptionsFromFlags());
}