Created by: baojun-nervana
This PR is to add a FusedOperator to support ngraph. The followings are included:
-
Intercept ngraph through executor via a flag (use_ngraph)
- EnabledFusedOp will call FusedOpIntervals to get the op intervals of ops supported by ngraph
- FusedOpIntervals will scan the op list and check NG_NODE_MAP to find if an op or group of ops are supported by ngraph
- NG_NODE_MAP is a map of <string, function> with op->Type() mapping to a function to translate paddle op to ngraph op
-
FusedOperator class
- This class will get information to construct the NgraphOperator and also run the fusedop in a paddle op compatible way as the FusedOperator is inherited from Paddle Operator.
- process() is to extract needed info for NgraphOperator use later.
- RunImpl is the API compatible with paddle operator and it will call ngraph operator for execution.
-
NgraphOperator class
- This class performs the ngraph computation graph build and execute nGraph.
- In this PR it includes a placeholder only and the implementation will be the next PR.
-
NgraphBridge class
- This class will translate the ops and build the ngraph nodes