aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-08-10 22:09:03 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-08-10 22:12:48 -0700
commitc0f9b0a91e9e203dffcad0ec1d75a00112b60e5b (patch)
treea854559c3ede84474a5180bfd4f5e31e26c0a14b /tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc
parent87605f3d6ac6a9397d41b0fe169ac88c2ac85ce0 (diff)
In fast-math mode emit a tanh that has a faster min/max.
PiperOrigin-RevId: 164943597
Diffstat (limited to 'tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc')
-rw-r--r--tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc b/tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc
index b527af287a..f45e30ce0d 100644
--- a/tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc
+++ b/tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc
@@ -171,7 +171,7 @@ CompilerFunctor::VectorIntrinsics GetAvailableIntrinsics() {
SimpleOrcJIT::SimpleOrcJIT(const llvm::TargetOptions& target_options,
llvm::CodeGenOpt::Level opt_level,
- bool optimize_for_size,
+ bool optimize_for_size, bool enable_fast_math,
LLVMCompiler::ModuleHook pre_optimization_hook,
LLVMCompiler::ModuleHook post_optimization_hook)
: target_machine_(
@@ -186,12 +186,12 @@ SimpleOrcJIT::SimpleOrcJIT(const llvm::TargetOptions& target_options,
data_layout_(target_machine_->createDataLayout()),
object_layer_(
[] { return std::make_shared<llvm::SectionMemoryManager>(); }),
- compile_layer_(
- object_layer_,
- CompilerFunctor(target_machine_.get(), &disassembler_, opt_level,
- optimize_for_size, GetAvailableIntrinsics(),
- std::move(pre_optimization_hook),
- std::move(post_optimization_hook))) {
+ compile_layer_(object_layer_,
+ CompilerFunctor(target_machine_.get(), &disassembler_,
+ opt_level, optimize_for_size,
+ enable_fast_math, GetAvailableIntrinsics(),
+ std::move(pre_optimization_hook),
+ std::move(post_optimization_hook))) {
VLOG(1) << "CPU target: " << target_machine_->getTargetCPU().str()
<< " features: " << target_machine_->getTargetFeatureString().str();
}