Update xla compiler after upstream Orc API change r307350:

https://reviews.llvm.org/rL307350

PiperOrigin-RevId: 161195744
This commit is contained in:
A. Unique TensorFlower 2017-07-07 06:33:59 -07:00 committed by TensorFlower Gardener
parent 638aa8d7b7
commit b760c0cade
3 changed files with 8 additions and 6 deletions

View File

@ -66,7 +66,8 @@ CpuExecutable::CpuExecutable(
CHECK(sym) << "Symbol " << entry_function_name << " not found.";
// getAddress can do work under the hood in the jit, so it needs to be
// guarded by the mutex.
compute_function_ = reinterpret_cast<ComputeFunctionType>(sym.getAddress());
compute_function_ =
reinterpret_cast<ComputeFunctionType>(cantFail(sym.getAddress()));
}
// Given a pointer to an output buffer (following the CPU JIT calling

View File

@ -407,8 +407,9 @@ Status ParallelCpuExecutable::ExecuteComputeFunctions(
HloInstruction* instruction = entry.first;
llvm::JITSymbol sym = jit_->FindSymbol(entry.second);
TF_RET_CHECK(sym);
InsertOrDie(&functions, instruction,
reinterpret_cast<ComputeFunctionType>(sym.getAddress()));
InsertOrDie(
&functions, instruction,
reinterpret_cast<ComputeFunctionType>(cantFail(sym.getAddress())));
}
// Map containing pointers to result buffers for each instruction.

View File

@ -168,8 +168,8 @@ SimpleOrcJIT::SimpleOrcJIT(const llvm::TargetOptions &target_options,
SimpleOrcJIT::ModuleHandleT SimpleOrcJIT::AddModule(
std::unique_ptr<llvm::Module> module) {
auto handle =
compile_layer_.addModule(std::move(module), MakeUnique<SimpleResolver>());
auto handle = cantFail(compile_layer_.addModule(
std::move(module), MakeUnique<SimpleResolver>()));
module_handles_.push_back(handle);
return handle;
}
@ -178,7 +178,7 @@ void SimpleOrcJIT::RemoveModule(SimpleOrcJIT::ModuleHandleT handle) {
module_handles_.erase(
std::remove(module_handles_.begin(), module_handles_.end(), handle),
module_handles_.end());
compile_layer_.removeModule(handle);
cantFail(compile_layer_.removeModule(handle));
}
llvm::JITSymbol SimpleOrcJIT::FindSymbol(const std::string &name) {