| 168 | } |
| 169 | |
| 170 | Status XlaCompilationCache::Compile( |
| 171 | const XlaCompiler::Options& options, const NameAttrList& function, |
| 172 | std::vector<XlaCompiler::Argument>& args, |
| 173 | const XlaCompiler::CompileOptions& compile_options, |
| 174 | CompileMode compile_mode, |
| 175 | const XlaCompiler::CompilationResult** out_compilation_result, |
| 176 | xla::LocalExecutable** out_executable) { |
| 177 | // compile_fn can be called asynchronously. make sure all required arguments |
| 178 | // are passed by value. |
| 179 | auto compile_fn = [&, compile_options, function]( |
| 180 | XlaCompiler* compiler, |
| 181 | const std::vector<XlaCompiler::Argument>& args, |
| 182 | XlaCompiler::CompilationResult* result) { |
| 183 | return compiler->CompileFunction(compile_options, function, args, result); |
| 184 | }; |
| 185 | return CompileImpl(options, function, args, compile_fn, compile_mode, |
| 186 | out_compilation_result, out_executable); |
| 187 | } |
| 188 | |
| 189 | static bool IsMegamorphic( |
| 190 | int64 compile_count, |
nothing calls this directly
no test coverage detected