Skip to content

Commit 0a4d157

Browse files
ezhulenevcopybara-github
authored andcommitted
[xla:cpu] Switch XLA:CPU runtime to thunks interpreter
With this change XLA:CPU instead of compiling one LLVM function for the whole HLO module compiles separate functions for different fusions and runs them via the interpreter-like runtime. This can change numerics because of slightly different LLVM IR and missed cross-fusion optimizations. If this breaks your tests, they likely have to relax numerical error tolerance. Another potential issue is performance regressions for while loops with large number of iterations and small computation, as instead of compiling, we run such loops in interpreter. We plan to fix it in the future. To disable thunks runtime set env variable: XLA_FLAGS=--xla_cpu_use_thunk_runtime=false. PiperOrigin-RevId: 660520935
1 parent 39c59b9 commit 0a4d157

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xla/debug_options_flags.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ DebugOptions DefaultDebugOptionsIgnoringFlags() {
8282
#ifdef XLA_CPU_USE_ACL
8383
opts.set_xla_cpu_use_acl(true);
8484
#endif
85-
opts.set_xla_cpu_use_thunk_runtime(false);
85+
opts.set_xla_cpu_use_thunk_runtime(true);
8686
opts.set_xla_cpu_enable_concurrency_optimized_scheduler(false);
8787
opts.set_xla_cpu_prefer_vector_width(256);
8888

0 commit comments

Comments
 (0)