tensorflow/core/runtime_fallback/kernel/kernel_fallback_kernels.cc
// Directly invoke TFRTOpKernel::Compute on a kernel specified by
// 'op_name'. Pass a TFRTOpKernelContext that forwards to the provided
// AsyncKernelFrame.
//
// Directly invoked kernels must be registered with the
// REGISTER_KERNEL_FALLBACK_KERNEL macro and must work with the
// TFRTOpKernel{,Construction,Context} objects instead of the usual
// OpKernel objects.
Directly invoke TFRTOpKernel::Compute on a kernel specified by
'op_name'. Pass a TFRTOpKernelContext that forwards to the provided
AsyncKernelFrame.

Directly invoked kernels must be registered with the
REGISTER_KERNEL_FALLBACK_KERNEL macro and must work with the
TFRTOpKernel{,Construction,Context} objects instead of the usual
OpKernel objects.
Directly invoke TFRTOpKernel :: Compute on a kernel specified by ' op_name ' . Pass a TFRTOpKernelContext that forwards to the provided AsyncKernelFrame . Directly invoked kernels must be registered with the REGISTER_KERNEL_FALLBACK_KERNEL macro and must work with the TFRTOpKernel { Construction Context } objects instead of the usual OpKernel objects .
static void TFDForwardKernel(tfrt::RemainingArguments arguments,
                             tfrt::RemainingResults results,
                             tfrt::StringAttribute op_name,
                             tfrt::RemainingAttributes attributes,
                             tfrt::AsyncKernelFrame* frame,
                             const tfrt::ExecutionContext& exec_ctx) {
  for (int i = 0; i < results.size(); ++i) {
    results.AllocateAt<tensorflow::Tensor>(i);
  }
  std::string op_name_str = op_name.str();
  tfrt::OpAttrs opattrs;
  Status s = FillOpAttrs(attributes, &opattrs);
  if (!s.ok()) {
    frame->ReportError("TFDForwardKernel: Error while parsing attributes: ",
                       s.error_message());
  }
  tfrt::OpAttrsRef opattrsref(opattrs);
  bool work_enqueued = tfd::KernelFallbackExecute(
      exec_ctx, op_name_str, arguments.values(), results.values(), opattrsref,
      tfd::KernelFallbackOutputType::TENSOR);
  if (!work_enqueued) {
    frame->ReportError("TFDForwardKernel: couldn't EnqueueBlockingWork");
  }
}
static void TFDForwardKernel ( tfrt :: RemainingArguments arguments , tfrt :: RemainingResults results , tfrt :: StringAttribute op_name , tfrt :: RemainingAttributes attributes , tfrt :: AsyncKernelFrame * frame , const tfrt :: ExecutionContext & exec_ctx ) { for ( int i = 0 ; i < results . size ( ) ; ++ i ) { results . AllocateAt < tensorflow :: Tensor > ( i ) ; } std :: string op_name_str = op_name . str ( ) ; tfrt :: OpAttrs opattrs ; Status s = FillOpAttrs ( attributes , & opattrs ) ; if ( ! s . ok ( ) ) { frame -> ReportError ( " " , s . error_message ( ) ) ; } tfrt :: OpAttrsRef opattrsref ( opattrs ) ; bool work_enqueued = tfd :: KernelFallbackExecute ( exec_ctx , op_name_str , arguments . values ( ) , results . values ( ) , opattrsref , tfd :: KernelFallbackOutputType :: TENSOR ) ; if ( ! work_enqueued ) { frame -> ReportError ( " " ) ; } }
Directly invoke TFRTOpKernel::Compute on a kernel specified by
'op_name'.
Directly invoke TFRTOpKernel :: Compute on a kernel specified by ' op_name ' .