MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Create

Method Create

tensorflow/core/common_runtime/executor.cc:471–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469 public:
470 template <class PropagatorStateType>
471 static ExecutorState<PropagatorStateType>* Create(
472 const Executor::Args& args, ExecutorImpl* impl) {
473 ImmutableExecutorState& immutable_state = impl->GetImmutableState();
474 ExecutorInternal::KernelStats* kernel_stats = impl->GetKernelStat();
475
476 // InlineExecuteState
477 if (args.executor_policy == ExecutorPolicy::USE_INLINE_EXECUTOR) {
478 return new InlineExecutorState<PropagatorStateType>(
479 args, immutable_state, kernel_stats);
480 } else if (args.cost_runner &&
481 args.executor_policy == ExecutorPolicy::USE_COST_MODEL_EXECUTOR) {
482 // TODO: FIXME consider function lib executor, set cost_runner for it?
483 // Schedule by cost model
484 ExecutorInternal::ExecuteCostModel* cm = impl->TryToBuildCostModel();
485 return new CostExecutorState<PropagatorStateType>(
486 args, immutable_state, kernel_stats, cm);
487 } else {
488 // normal schedule
489 return new ExecutorState<PropagatorStateType>(
490 args, immutable_state, kernel_stats);
491 }
492 }
493};
494
495// Sort node according cost from which ExecutorState

Callers

nothing calls this directly

Calls 2

GetKernelStatMethod · 0.80
TryToBuildCostModelMethod · 0.80

Tested by

no test coverage detected