FunctionMap ret;
// kernel_gen
- for (auto op_ind : _data.op_order)
+ for (auto &&op_ind : _data.op_order)
{
auto fn_seq = kernel_gen->generate(op_ind);
ret.emplace_back(op_ind, std::move(fn_seq));
protected:
void initConsts()
{
- _data.graph->operations().iterate([&](const ir::OperationIndex &, const ir::Operation &op) {
+ _data.graph->operations().iterate([&](const ir::OperationIndex &, const ir::IOperation &op) {
constant_initializer->setLayout(graph()->layout());
op.accept(*constant_initializer);
});
// 1. Scan DEF of outputs. If the DEF, allocate it
// 2. Scan DEF of inputs. If variable tensor, allocate it
// 3. Scan USE of inputs. Decrease the USE and deallocate if the USE is 0
- for (const auto op_ind : _data.op_order)
+ for (const auto &op_ind : _data.op_order)
{
const auto &op = graph()->operations().at(op_ind);
auto op_inputs = op.getInputs() | ir::Remove::DUPLICATED | ir::Remove::UNDEFINED;