Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • To add imperative and symbolic control flow operators to MXNet. Although Python control flow is more intuitive to use, we need to construct imperative control flow operators so we can easily switch between imperative and symbolic implementations in Gluon. Currently, I'll add four control flow operators: ``ifelse’’, ``case’’, ``foreach’’ and ``while_loop’’. The detailed description of these operators have been attached at the end of this proposal.
  • To add support for hybridizing Gluon RNN models and variable-length sequences. These are some common applications where control flow operators are required. This task is to rewrite existing Gluon RNN implementation using control flow operators.
  • We can go a step further by adding support for building static graphs directly from any Gluon models with Python control flow. As such, we can export any models implemented with Gluonimplementations in Gluon. This step requires to use the Python parser to reconstruct Python code to turn Python control flow into the code using MXNet control flow operators. While reconstructing the code, we need to analyze the liveness of Python variables and distinguish output variables of the loop and the variables carried over to the next iteration. This task will be exploratory. It might be difficult to handle all Python code.
  • To use TVM to compile and optimize dynamic models. Flow control operators understand the computation flow. It can reorganize subgraphs (e.g., the ones in the loop) and pass them to TVM for compilation to achieve better performance.

...