Created by: baojun-nervana
-
close a TODO to remove the const_cast. This is to avoid altering the progdesc. Instead of substituting ngraph_engine op in progdesc, it is changed back to scan the op list after creation and replace the op sublist with ngraph_engine (the original way).
-
Refactor the engine code to reduce the overhead. The idea is to minimize the repetitives iteration to iteration. If the graph has no change, the NgraphEngine::Run will grab the data and run the computation.
- an "engine_key" was added to verify if there is a graph change.
- the repetitive info for NgraphEngine::Run will be cached