mem_mgrs->insert(tensor_builder->releaseMemoryManager());
}
- auto plan = std::make_shared<Plan>(function_sequence);
- return new exec::LinearExecutor{graph.shareModel(),
- linear->releaseSubgraphs(),
- operand_context,
- linear->releaseLowerInfo(),
- std::move(mem_mgrs),
- linear->releaseElements(),
- plan};
+ return new exec::LinearExecutor{
+ graph.shareModel(), linear->releaseSubgraphs(), operand_context, linear->releaseLowerInfo(),
+ std::move(mem_mgrs), linear->releaseElements(), function_sequence};
}
exec::IExecutor *ExecutorFactory::createDataflowExecutor(graph::Graph &graph, bool parallel)
+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "Plan.h"
-
-namespace neurun
-{
-namespace codegen
-{
-
-// NO IMPLEMENTATION YET
-
-} // namespace codegen
-} // namespace neurun
+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __NEURUN_CODEGEN_PLAN_H__
-#define __NEURUN_CODEGEN_PLAN_H__
-
-#include "graph/Graph.h"
-#include "exec/FunctionSequence.h"
-#include "compiler/OperandContext.h"
-
-namespace neurun
-{
-namespace compiler
-{
-
-class Plan
-{
-public:
- /**
- * @brief Construct a new Plan object for not compiled model
- */
- Plan() = default;
- /**
- * @brief Construct a new Plan object
- * @param[in] operands Compiled operand context
- * @param[in] ops Compiled operation sequence
- */
- Plan(std::shared_ptr<exec::FunctionSequence> &ops) : _ops{ops}
- {
- // DO NOTHING
- }
-
-public:
- exec::FunctionSequence &functions(void) const { return *_ops; }
-
-private:
- std::shared_ptr<exec::FunctionSequence> _ops{nullptr};
-};
-
-} // namespace compiler
-} // namespace neurun
-
-#endif // __NEURUN_CODEGEN_PLAN_H__
namespace exec
{
-void LinearExecutor::executeImpl() { _plan->functions().run(); }
+void LinearExecutor::executeImpl() { _fn_seq->run(); }
} // namespace exec
} // namespace neurun
#define __NEURUN_EXEC_EXECUTOR_H_
#include "ExecutorBase.h"
-#include "compiler/Plan.h"
#include "compiler/Linear.h"
+#include "exec/FunctionSequence.h"
namespace neurun
{
std::unique_ptr<graph::LowerInfoMap> lower_info,
std::unique_ptr<backend::MemoryManagerSet> mem_mgrs,
std::vector<compiler::Linear::Element> &&elements,
- const std::shared_ptr<const neurun::compiler::Plan> &plan)
+ const std::shared_ptr<exec::FunctionSequence> &fn_seq)
: ExecutorBase{model, std::move(subgraphs), operand_context, std::move(lower_info),
std::move(mem_mgrs)},
- _plan{plan}, _elements{std::move(elements)}
+ _fn_seq{fn_seq}, _elements{std::move(elements)}
{
}
void executeImpl(void) override;
private:
- std::shared_ptr<const compiler::Plan> _plan;
+ std::shared_ptr<exec::FunctionSequence> _fn_seq;
std::vector<compiler::Linear::Element> _elements;
};
#ifndef __NEURUN_EXEC_INTERP_EXEC_ENV_H_
#define __NEURUN_EXEC_INTERP_EXEC_ENV_H_
-#include "compiler/Plan.h"
+#include <unordered_set>
+
+#include "model/Model.h"
#include "Tensor.h"
namespace neurun