File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ cc_library(
195
195
"//xla/service/cpu:cpu_executable_run_options" ,
196
196
"//xla/service/cpu:cpu_runtime" ,
197
197
"//xla/service/cpu:cpu_xfeed" ,
198
+ "//xla/service/llvm_ir:llvm_command_line_options" ,
198
199
"//xla/stream_executor:device_memory" ,
199
200
"//xla/tsl/concurrency:async_value" ,
200
201
"//xla/tsl/concurrency:ref_count" ,
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ limitations under the License.
99
99
#include " xla/service/hlo_module_config.h"
100
100
#include " xla/service/hlo_module_util.h"
101
101
#include " xla/service/hlo_value.h"
102
+ #include " xla/service/llvm_ir/llvm_command_line_options.h"
102
103
#include " xla/service/maybe_owning_device_memory.h"
103
104
#include " xla/shape.h"
104
105
#include " xla/shape_util.h"
@@ -744,6 +745,11 @@ static absl::StatusOr<std::unique_ptr<xla::Executable>> JitCompile(
744
745
static constexpr char kBeforeOptimizationsDumpName [] = " before_optimizations" ;
745
746
DumpHloModuleIfEnabled (*hlo_module, kBeforeOptimizationsDumpName );
746
747
748
+ // RunHloPasses and RunBackend both look at the LLVM command line options.
749
+ auto llvm_options = llvm_ir::ExtractXlaBackendExtraOptions (
750
+ hlo_module->config ().debug_options ().xla_backend_extra_options ());
751
+ llvm_ir::LLVMCommandLineOptionsLock llvm_lock (llvm_options);
752
+
747
753
// Run Hlo Passes
748
754
cpu::CpuCompiler compiler;
749
755
TF_ASSIGN_OR_RETURN (hlo_module, compiler.RunHloPasses (std::move (hlo_module),
You can’t perform that action at this time.
0 commit comments