Update xla compiler after upstream Orc API change r307350:
https://reviews.llvm.org/rL307350 PiperOrigin-RevId: 161195744
This commit is contained in:
parent
638aa8d7b7
commit
b760c0cade
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user