| 1762 | } // namespace |
| 1763 | |
| 1764 | Status NewLocalExecutor(const LocalExecutorParams& params, |
| 1765 | std::unique_ptr<const Graph> graph, |
| 1766 | Executor** executor) { |
| 1767 | ExecutorImpl* impl = new ExecutorImpl(params, std::move(graph)); |
| 1768 | const Status s = impl->Initialize(); |
| 1769 | if (s.ok()) { |
| 1770 | *executor = impl; |
| 1771 | } else { |
| 1772 | delete impl; |
| 1773 | } |
| 1774 | return s; |
| 1775 | } |
| 1776 | |
| 1777 | Status CreateNonCachedKernel(Device* device, FunctionLibraryRuntime* flib, |
| 1778 | const NodeDef& ndef, int graph_def_version, |