IP Library Granted Patent US 10,228,922
Granted Patent B2
US 10,228,922 · App. 14/993,722 · Granted Mar 12, 2019

Hybrid parallelization strategies for machine learning programs on top of mapreduce

Inventors: Matthias Boehm (San Jose, CA); Douglas Burdick (San Jose, CA); Berthold Reinwald (San Jose, CA); Prithviraj Sen (San Jose, CA); Shirish Tatikonda (San Jose, CA); Yuanyuan Tian (San Jose, CA); Shivakumar Vaithyanathan (San Jose, CA)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F8/445G06F8/443G06F8/45G06F8/452G06F9/4881
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,228,922
App. No.
14/993,722
Granted
Mar 12, 2019
Kind
B2
Abstract

Parallel execution of machine learning programs is provided. Program code is received. The program code contains at least one parallel for statement having a plurality of iterations. A parallel execution plan is determined for the program code. According to the parallel execution plan, the plurality of iterations is partitioned into a plurality of tasks. Each task comprises at least one iteration. The iterations of each task are independent. Data required by the plurality of tasks is determined. An access pattern by the plurality of tasks of the data is determined. The data is partitioned based on the access pattern.

Claims (62)

1. A method comprising:

receiving program code containing at least one parallel for statement having a plurality of iterations;

determining a parallel execution plan for the program code;

according to the parallel execution plan, partitioning the plurality of iterations into a plurality of tasks, each task comprising at least one iteration, the iterations of each task being independent;

determining an input matrix containing first data required by the plurality of tasks;

determining an access pattern by the plurality of tasks of the input matrix, the access pattern being determined by recursively analyzing all accesses in the parallel for statement;

based on the access pattern, partitioning the input matrix;

providing each of the plurality of tasks to one of a plurality of parallel workers wherein each of the plurality of parallel workers is a MapReduce task or a local thread;

receiving from each of the plurality of parallel workers a result; and

aggregating the results from each of the plurality of parallel workers.

2. The method of claim 1 , wherein:

the parallel execution plan is determined at a runtime of the program code.

3. The method of claim 1 , wherein determining the parallel execution plan comprises:

applying an heuristic optimizer.

4. The method of claim 3 , wherein the heuristic optimizer comprises a cost model.

5. The method of claim 4 , wherein the cost model includes at least one of an execution time of the program code and a memory estimate of the program code.

6. The method of claim 4 , wherein the cost model comprises a cost function and the cost function is determined by linear regression.

7. The method of claim 3 , wherein applying the heuristic optimizer comprises at least one of:

selecting an execution type;

selecting a parallel for execution type;

selecting data for colocation;

changing a replication factor;

selecting a task partitioning method;

selecting a task size;

selecting a degree of parallelism;

replacing parallel for by for;

selecting an aggregation strategy;

unfolding recursive functions;

determining a data access pattern;

selecting a data partitioning strategy; or

recompiling indexed reads and indexed writes.

8. The method of claim 1 , wherein providing each of the plurality of tasks to one of the plurality of parallel workers comprises:

determining second data required by a first of the plurality of tasks;

determining that the second data is locally available to a first of the plurality of parallel workers; and

providing the first of the plurality of tasks to the first of the plurality of parallel workers.

9. The method of claim 1 , wherein partitioning the plurality of iterations comprises performing a loop-dependency analysis.

10. The method of claim 1 , wherein at least one of the plurality of tasks reads data from a distributed filesystem.

11. The method of claim 1 , wherein each of the plurality of tasks has a size that conforms to an exponential decay function.

12. The method of claim 1 , wherein each of the plurality of tasks has a predetermined size.

13. The method of claim 1 , wherein the parallel execution plan includes execution of each of the plurality of parallel workers on a single node.

14. The method of claim 1 , wherein the parallel execution plan includes execution of each of the plurality of parallel workers on one of a plurality of nodes.

15. The method of claim 1 , wherein the program code comprises at least two nested parallel for statements and wherein the plurality of parallel workers comprises at least one MapReduce task and at least one local thread.

16. The method of claim 1 , wherein determining the parallel execution plan comprises:

specifying that each of the plurality of tasks be executed either locally or remotely.

17. The method of claim 1 , wherein determining a parallel execution plan includes creating a plan representation, the method further comprising:

traversing the plan representation to determine a total estimated runtime;

traversing the plan representation to determine a total memory consumption, wherein:

the parallel execution plan is determined such that it conforms to at least one of a memory constraint or a parallelism constraint.

18. A computer program product for parallelization, 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 program code containing at least one parallel for statement having a plurality of iterations;

determine a parallel execution plan for the program code;

according to the parallel execution plan, partition the plurality of iterations into a plurality of tasks, each task comprising at least one iteration, the iterations of each task being independent;

determine an input matrix containing first data required by the plurality of tasks;

determine an access pattern by the plurality of tasks of the input matrix, the access pattern being determined by recursively analyzing all accesses in the parallel for statement;

based on the access pattern, partition the input matrix;

providing each of the plurality of tasks to one of a plurality of parallel workers wherein each of the plurality of parallel workers is a MapReduce task or a local thread;

receiving from each of the plurality of parallel workers a result; and

aggregating the results from each of the plurality of parallel workers.

19. The computer program product of claim 18 , wherein:

the parallel execution plan is determined at a runtime of the program code.

20. The computer program product of claim 18 , wherein determining the parallel execution plan comprises:

applying an heuristic optimizer.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 12, 2016
From: BOEHM, MATTHIAS; BURDICK, DOUGLAS; REINWALD, BERTHOLD; SEN, PRITHVIRAJ; TATIKONDA, SHIRISH; TIAN, YUANYUAN; VAITHYANATHAN, SHIVAKUMAR
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 037487/0133 →
Continuity (2)
Continuation 14317016 · Jun 27, 2014
Related Publication 20160124730A1 · May 5, 2016
Cited By (3)
US 12,197,958 US 12,242,968 US 12,443,876