Created by: DannyIsFunny
- Remove program_desc from Program
[Issue]
- there is a copy of program_desc in program, which is already stored into Predictor. Program_desc in Program will result in a copy period, causing a waste in time and memory usage in initialization period.
[Effect of Current PR]
- Remove program_desc from program. Pointer of program_desc will be inputed into program as an input variable when it's needed.
- Remove predictor build process and graph optimization period from
Clone
function
[Issue]
- Previous implementation of Clone will generate graph from program_desc in Program, create an optimizer to optimize the graph into a runtime_program. Graph optimization has already been operated once, it's not necessary in Clone method.
[Effect of Current PR]
- Reconstruct
Clone
function, in which predictor build and graph optimization process has been removed.