aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/cpu/simple_orc_jit.h
diff options
context:
space:
mode:
authorGravatar Sanjoy Das <sanjoy@google.com>2018-05-09 19:39:58 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-09 19:42:49 -0700
commitbb8315f0cf066266647c6eacdf575ac8f5e9989e (patch)
tree3701a5004258519f0baa4420416008be22dc0114 /tensorflow/compiler/xla/service/cpu/simple_orc_jit.h
parentf79dbc73c5b2c0debb916280e4436d98890ed03b (diff)
Don't call into Eigen unless the input and output tensors are aligned
We teach TargetMachineFeatures about the alignment required for Eigen GEMM and Conv and then pipe TargetMachineFeatures through the places that need to decide whether a dot or a conv needs to be lowered to a call to Eigen. I also had to fix a minor bug in our LLVM IR implementation for convolution. PiperOrigin-RevId: 196065557
Diffstat (limited to 'tensorflow/compiler/xla/service/cpu/simple_orc_jit.h')
-rw-r--r--tensorflow/compiler/xla/service/cpu/simple_orc_jit.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/service/cpu/simple_orc_jit.h b/tensorflow/compiler/xla/service/cpu/simple_orc_jit.h
index f4260a95bc..1851a3ee0b 100644
--- a/tensorflow/compiler/xla/service/cpu/simple_orc_jit.h
+++ b/tensorflow/compiler/xla/service/cpu/simple_orc_jit.h
@@ -95,6 +95,12 @@ class SimpleOrcJIT {
return &external_constant_pool_;
}
+ // Creates an llvm::TargetMachine suitable for JITting code that will run on
+ // the current machine.
+ static std::unique_ptr<llvm::TargetMachine> InferTargetMachineForJIT(
+ const llvm::TargetOptions& target_options,
+ llvm::CodeGenOpt::Level opt_level);
+
private:
llvm::JITSymbol ResolveRuntimeSymbol(const std::string& name);