aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-06-25 23:37:35 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-06-25 23:41:35 -0700
commit7a06e0af350e3e61bbf0ebee66d79ab15808c575 (patch)
tree69405ed025e1cbd7579c5975eb963b6f70987759
parentefb91f85b8d6554fd0906ab397e6a9abe9bdca41 (diff)
Follow LLVM/ORC upstream API change in r306166.
PiperOrigin-RevId: 160108102
-rw-r--r--tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc10
-rw-r--r--tensorflow/compiler/xla/service/cpu/simple_orc_jit.h2
2 files changed, 4 insertions, 8 deletions
diff --git a/tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc b/tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc
index d5b157b7f6..b284543299 100644
--- a/tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc
+++ b/tensorflow/compiler/xla/service/cpu/simple_orc_jit.cc
@@ -166,12 +166,8 @@ SimpleOrcJIT::SimpleOrcJIT(const llvm::TargetOptions &target_options,
SimpleOrcJIT::ModuleHandleT SimpleOrcJIT::AddModule(
std::unique_ptr<llvm::Module> module) {
- // The Orc API adds a whole iterable "set" of modules, so we wrap the module
- // in a vector.
- std::vector<std::unique_ptr<llvm::Module>> module_set;
- module_set.push_back(std::move(module));
- auto handle = compile_layer_.addModuleSet(
- std::move(module_set), MakeUnique<llvm::SectionMemoryManager>(),
+ auto handle = compile_layer_.addModule(
+ std::move(module), MakeUnique<llvm::SectionMemoryManager>(),
MakeUnique<SimpleResolver>());
module_handles_.push_back(handle);
return handle;
@@ -181,7 +177,7 @@ void SimpleOrcJIT::RemoveModule(SimpleOrcJIT::ModuleHandleT handle) {
module_handles_.erase(
std::remove(module_handles_.begin(), module_handles_.end(), handle),
module_handles_.end());
- compile_layer_.removeModuleSet(handle);
+ compile_layer_.removeModule(handle);
}
llvm::JITSymbol SimpleOrcJIT::FindSymbol(const std::string &name) {
diff --git a/tensorflow/compiler/xla/service/cpu/simple_orc_jit.h b/tensorflow/compiler/xla/service/cpu/simple_orc_jit.h
index 0a3b992403..e28717bcd1 100644
--- a/tensorflow/compiler/xla/service/cpu/simple_orc_jit.h
+++ b/tensorflow/compiler/xla/service/cpu/simple_orc_jit.h
@@ -47,7 +47,7 @@ class SimpleOrcJIT {
std::function<llvm::object::OwningBinary<llvm::object::ObjectFile>(
llvm::Module&)>;
using CompileLayerT = llvm::orc::IRCompileLayer<ObjLayerT, CompileFtor>;
- using ModuleHandleT = CompileLayerT::ModuleSetHandleT;
+ using ModuleHandleT = CompileLayerT::ModuleHandleT;
using OptimizationCallback = CompilerFunctor::OptimizationCallback;
// Create a new JIT, targeting the host architecture.