A system for learning and applying a task and data parallel strategy to an application including at least one task for processing an input data stream to produce an output data stream, comprising: a controller measuring an execution of the application to generate an action space representing a task and data parallel strategy; a run-time system applying the action space to implement the task and da