diff options
Diffstat (limited to 'tensorflow/compiler/tf2xla/xla_compiled_cpu_function.cc')
-rw-r--r-- | tensorflow/compiler/tf2xla/xla_compiled_cpu_function.cc | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tensorflow/compiler/tf2xla/xla_compiled_cpu_function.cc b/tensorflow/compiler/tf2xla/xla_compiled_cpu_function.cc index ed5aa08c6f..672e19bd93 100644 --- a/tensorflow/compiler/tf2xla/xla_compiled_cpu_function.cc +++ b/tensorflow/compiler/tf2xla/xla_compiled_cpu_function.cc @@ -26,8 +26,6 @@ XlaCompiledCpuFunction::XlaCompiledCpuFunction(const StaticData& static_data, result_index_(static_data.result_index), args_(new void*[static_data.num_args]), temps_(new void*[static_data.num_temps]), - arg_index_to_temp_index_(new int32[static_data.num_args]), - num_args_(static_data.num_args), arg_names_(static_data.arg_names), result_names_(static_data.result_names), program_shape_(static_data.program_shape), @@ -42,13 +40,6 @@ XlaCompiledCpuFunction::XlaCompiledCpuFunction(const StaticData& static_data, static_data.temp_sizes, static_data.num_temps, temps_, /*annotate_initialized=*/true); - for (int i = 0; i < static_data.num_temps; i++) { - if (static_data.temp_sizes[i] < -1) { - int32 param_number = -(static_data.temp_sizes[i] + 2); - arg_index_to_temp_index_[param_number] = i; - } - } - // If Hlo profiling is enabled the generated code expects an appropriately // sized buffer to be passed in as the last argument. If Hlo profiling is // disabled the last function argument is still present in the function @@ -59,24 +50,11 @@ XlaCompiledCpuFunction::XlaCompiledCpuFunction(const StaticData& static_data, } } -bool XlaCompiledCpuFunction::Run() { - // Propagate pointers to the argument buffers into the temps array. Code - // generated by XLA discovers the incoming argument pointers from the temps - // array. - for (int32 i = 0; i < num_args_; i++) { - temps_[arg_index_to_temp_index_[i]] = args_[i]; - } - raw_function_(temps_[result_index_], &run_options_, nullptr, temps_, - profile_counters_); - return true; -} - XlaCompiledCpuFunction::~XlaCompiledCpuFunction() { tensorflow::tfcompile::runtime::FreeContiguous(alloc_args_); tensorflow::tfcompile::runtime::FreeContiguous(alloc_temps_); delete[] args_; delete[] temps_; - delete[] arg_index_to_temp_index_; delete[] profile_counters_; } |