Skip to content

Commit a28e332

Browse files
gcatronfacebook-github-bot
authored andcommitted
Enable saturateHost in image-classifier and address a couple resulting bugs (#3443)
Summary: This PR enables saturate host in image-classifier, so now if multiple devices are created they will be used. As a result of this change bugs in OpenCL and CPUFunctions were exposed this PR fixes those too. Documentation: Pull Request resolved: #3443 Test Plan: run image-classifier with num-devices >0 and backends= CPU, Interpreter, and OpenCL. Differential Revision: D16941867 Pulled By: gcatron fbshipit-source-id: 8fe1fb4d777c8dc5fa1b8d88e14fbee01dc0ed89
1 parent 65f558f commit a28e332

File tree

5 files changed

+99
-68
lines changed

5 files changed

+99
-68
lines changed

include/glow/LLVMIRCodeGen/LLVMCompiledFunction.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ class LLVMCompiledFunction : public CompiledFunction {
5353
/// The LLVM JIT engine. The jit must be initialized after the ctor
5454
/// initializes the LLVM backends.
5555
std::unique_ptr<llvm::orc::GlowJIT> JIT_;
56+
57+
/// The JIT can be accessed from multiple threads but is not thread safe,
58+
/// JITLock_ protects it.
59+
std::mutex JITLock_;
5660
};
5761
} // end namespace glow
5862

0 commit comments

Comments
 (0)