// because SubTensorAnalyzer assume that insert permutation is already finished
// lower: decide backend and insert permutation
// fix shapes: prepare codegen to optimization
- // finalize: generate tensor using subtensor info, then generate kernels
+ // generate tensor objects: generate tensor using subtensor info
+ // generate kernels
+ // allocate tesor memory
+ // constant intialization: fill the constants with values
// Generated SubTensorInfo is in operand(Object)
// for easy pass SubTensorInfo to plan builder and tensor builder
linear->accept(SubTensorAnalyzer{graph.operands()});
kernel_gen->generate(*element.subgraph, execution_builder.get());
});
- // Allocate Tensor Memory for cl_tensors
+ // Allocate Tensor Memory
for (auto &tensor_builder : tensor_builders)
{
tensor_builder->allocate();
});
}
- // TODO Extract this to another file
class ExecutionBuilder : public IExecutionBuilder
{
public: