tensorflow/compiler/mlir/tfrt/jit/tf_jitrt_kernels.cc
// Compiles kernel into the JitExecutable and updates JitExecutableCache.
Compiles kernel into the JitExecutable and updates JitExecutableCache.
Compiles kernel into the JitExecutable and updates JitExecutableCache .
static AsyncValueRef<Chain> Compile(StringAttribute device,
                                    CompilationUnitAttribute kernel,
                                    const ExecutionContext& exec_ctx) {
  Expected<AsyncValuePtr<JitExecutable>> executable =
      CompileImpl(kernel, exec_ctx);
  if (auto err = executable.takeError())
    return MakeErrorAsyncValueRef(StrCat(err));
  auto chain = MakeConstructedAsyncValueRef<Chain>();
  executable->AndThen([chain]() { chain.SetStateConcrete(); });
  return chain;
}
static AsyncValueRef < Chain > Compile ( StringAttribute device , CompilationUnitAttribute kernel , const ExecutionContext & exec_ctx ) { Expected < AsyncValuePtr < JitExecutable > > executable = CompileImpl ( kernel , exec_ctx ) ; if ( auto err = executable . takeError ( ) ) return MakeErrorAsyncValueRef ( StrCat ( err ) ) ; auto chain = MakeConstructedAsyncValueRef < Chain > ( ) ; executable -> AndThen ( [ chain ] ( ) { chain . SetStateConcrete ( ) ; } ) ; return chain ; }
Compiles kernel into the JitExecutable and updates JitExecutableCache.
Compiles kernel into the JitExecutable and updates JitExecutableCache .
// Trigger kernel compilation, that will update the JitExecutableCache. // Return error if can't schedule the compilation task. // Mark chain available once we compile the default executable.