A method for global data flow optimization for machine learning (ML) programs. The method includes receiving, by a storage device, an initial plan for an ML program. A processor builds a nested global data flow graph representation using the initial plan. Operator directed acyclic graphs (DAGs) are connected using crossblock operators according to inter-block data dependencies. The initial plan for the ML program is re-written resulting in an optimized plan for the ML program with respect to its global data flow properties. The re-writing includes re-writes of: configuration dataflow properties, operator selection and structural changes.
Please help me write a proper abstract based on the patent claims. CLAIM: 1. A method comprising: receiving, by a storage device, an initial plan for a machine learning (ML) program; generating, by a processor, a nested global data flow graph representation using the initial plan; connecting operator directed acyclic graphs (DAGs) using crossblock operators according to inter-block data dependencies; and re-writing the initial plan for the ML program resulting in an optimized plan for the ML program with respect to its global data flow properties, wherein the re-writing comprises re-writes of: configuration dataflow properties, operator selection and structural changes. 2. The method of claim 1, further comprising determining re-writes of the initial plan for data flow and control flow of the ML program. 3. The method of claim 2, further comprising: bounding the initial plan for the ML program based on estimated execution time of the optimized plan of the ML program. 4. The method of claim 3, wherein the re-writing includes: changing data block size of one or more operations for selecting efficient physical operators and taking memory and parallelism into account to prevent block size increases to an extent where memory increase is counter-productive; and changing data format of intermediate results for prevention of unnecessary format conversions. 5. The method of claim 4, wherein the re-writing includes: selecting execution type of one or more operators for either in-memory execution of individual operations or distributed ML program execution of individual operations; performing automatic data partitioning of one or more matrices into direct accessible rows and columns or blocks, wherein the performing automatic data partitioning prevents unnecessary ML program jobs and repeated scans of program data; changing a replication factor of an ML program job based on the execution type selection; performing checkpointing that includes determining distributed caching and a particular storage level; and empty block materialization to enable operations for data parallel distributed computing. 6. The method of claim 5, wherein the re-writing includes: vectorizing loops for replacing cell-wise, column-wise or row-wise operations with coarse-grained operations for reducing overhead from one or more of: instruction execution, data copying, buffer pool maintenance and reducing a number of ML program jobs. 7. The method of claim 6, further comprising: determining the optimized plan based on one or more of: performing a transformation based search for determining the optimized plan having lowest run-time memory usage and processing latency; and performing an enumeration based search of trees for determining the optimized plan using interesting properties (IP) from each re-write of the re-writing and selecting a set of plans having lowest run-time memory usage and processing latency. 8. The method of claim 7, further comprising: performing an enumeration based search of DAGs for determining the optimized plan; and performing an enumeration based search of DAGs with control flow for determining the optimized plan. 9. A computer program product for global data flow optimization for machine learning (ML) programs, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to: receive, by a storage device, an initial plan for an ML program; generate, by the processor, a nested global data flow graph representation using the initial plan; connect, by the processor, operator directed acyclic graphs (DAGs) using crossblock operators according to inter-block data dependencies; and re-write, by the processor, the initial plan for the ML program resulting in an optimized plan for the ML program with respect to its global data flow properties, wherein the re-write comprises re-writes of: configuration dataflow properties, operator selection and structural changes. 10. The computer program product of claim 9, further comprising program instructions executable by the processor to cause the processor to: determine, by the processor, re-writes of the initial plan for data flow and control flow of the ML program. 11. The computer program product of claim 10, further comprising program instructions executable by the processor to cause the processor to: bound, by the processor, the initial plan for the ML program based on estimated execution time of the optimized plan of the ML program. 12. The computer program product of claim 11, wherein the re-write further comprising program instructions executable by the processor to cause the processor to: change, by the processor, data block size of one or more operations for selecting efficient physical operators and taking memory and parallelism into account to prevent block size increases to an extent where memory increase is counter-productive; and change, by the processor, data format of intermediate results for prevention of unnecessary format conversions. 13. The computer program product of claim 12, wherein the re-write further comprising program instructions executable by the processor to cause the processor to: select, by the processor, execution type of one or more operators for either in-memory execution of individual operations or distributed ML program execution of individual operations; perform, by the processor, automatic data partitioning of one or more matrices into direct accessible rows and columns or blocks, wherein the performing automatic data partitioning prevents unnecessary ML program jobs and repeated scans of program data; change, by the processor, a replication factor of an ML program job based on the execution type selection; perform, by the processor, checkpointing that includes determining distributed caching and a particular storage level; and provide, by the processor, empty block materialization to enable operations for data parallel distributed computing. 14. The computer program product of claim 13, wherein the re-write further comprising program instructions executable by the processor to cause the processor to: vectorize, by the processor, loops for replacing cell-wise, column-wise or row-wise operations with coarse-grained operations for reducing overhead from one or more of: instruction execution, data copying, buffer pool maintenance and reducing a number of ML program jobs. 15. The computer program product of claim 14, further comprising program instructions executable by the processor to cause the processor to: determine, by the processor, the optimized plan based on one or more of: perform, by the processor, a transformation based search for determining the optimized plan having lowest run-time memory usage and processing latency; perform, by the processor, an enumeration based search of trees for determining the optimized plan using interesting properties (IP) from each re-write of the re-writing and selecting a set of plans having lowest run-time memory usage and processing latency; perform, by the processor, an enumeration based search of DAGs for determining the optimized plan; and perform, by the processor, an enumeration based search of DAGs with control flow for determining the optimized plan. 16. An apparatus comprising: a storage device configured to receive an initial plan for a machine learning (ML) program; a graph generation processor configured to generate a nested global data flow graph representation using the initial plan, and to connect operator directed acyclic graphs (DAGs) using crossblock operators according to inter-block data dependencies; and an optimizer processor configured to re-write the initial plan for the ML program resulting in an optimized plan for the ML program with respect to its global data flow properties, wherein the re-write comprises re-writes of: configuration dataflow properties, operator selection and structural changes. 17. The apparatus of claim 16, further comprising: a planning processor configured to: determine re-writes of the initial plan for data flow and control flow of the ML program; bound the initial plan for the ML program based on estimated execution time of the optimized plan of the ML program; and the optimizer processor is configured to: change data block size of one or more operations to select efficient physical operators and take memory and parallelism into account to prevent block size increases to an extent where memory increase is counter-productive; and change data format of intermediate results to prevent of unnecessary format conversions. 18. The apparatus of claim 17, wherein the optimizer processor is configured to: select execution type of one or more operators for either in-memory execution of individual operations or distributed ML program execution of individual operations; perform automatic data partitioning of one or more matrices into direct accessible rows and columns or blocks, wherein the performing automatic data partitioning prevents unnecessary ML program jobs and repeated scans of program data; change a replication factor of an ML program job based on the execution type selection; perform checkpointing that includes determining distributed caching and a particular storage level; and provide empty block materialization to enable operations for data parallel distributed computing. 19. The apparatus of claim 18, wherein the optimizer processor is configured to vectorize loops to replace cell-wise, column-wise or row-wise operations with coarse-grained operations to reduce overhead from one or more of: instruction execution, data copying, buffer pool maintenance and reducing a number of ML program jobs. 20. The apparatus of claim 19, wherein the planning processor is configured to: determine the optimized plan by being configured to perform one or more of: a transformation based search to determine the optimized plan having lowest run-time memory usage and processing latency; an enumeration based search of trees to determine the optimized plan using interesting properties (IP) from each re-write and select a set of plans having lowest run-time memory usage and processing latency; an enumeration based search of DAGs to determine the optimized plan; and an enumeration based search of DAGs with control flow to determine the optimized plan.