13.07.2015 Views

automatically exploiting cross-invocation parallelism using runtime ...

automatically exploiting cross-invocation parallelism using runtime ...

automatically exploiting cross-invocation parallelism using runtime ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1.2 ContributionsFigure 1.5 demonstrates the contribution of this thesis work compared to prior works. Thisthesis work presents two novel automatic parallelization techniques (DOMORE and SPEC-CROSS) that capture dynamic <strong>cross</strong>-<strong>invocation</strong> <strong>parallelism</strong>. Unlike existing techniques,DOMORE and SPECCROSS gather <strong>cross</strong>-<strong>invocation</strong> dependence information at <strong>runtime</strong>.Even for programs with irregular dependence patterns, DOMORE and SPECCROSS synchronizeiterations which depend on each other and allow iterations without dependencesto execute concurrently. As a result, they are able to enable more <strong>cross</strong>-<strong>invocation</strong> parallelizationand achieves more scalable performance.As a non-speculative technique, DOMORE first identifies the code region containingthe targeted loop <strong>invocation</strong>s, and then transforms the program by dividing the region intoa scheduler thread and several worker threads. The scheduler thread contains code to detectmemory access conflicts between loop iterations and code to schedule and dispatch loopiterations from different loop <strong>invocation</strong>s to worker threads. In order to detect access violations,the scheduler duplicates loops the instructions used for calculating the addressesof memory locations to be accessed in each loop iteration. As a result, at <strong>runtime</strong>, it knowswhich iterations access the common memory locations and then coordinates the executionof these conflicting iterations by generating and forwarding synchronization conditions tothe worker threads. A synchronization condition tells the worker thread to wait until anotherworker thread finishes executing the conflicting iteration. Consequently, only threadswaiting on the synchronization conditions must stall, and iterations from consecutive loop<strong>invocation</strong>s may execute in parallel.SPECCROSS parallelizes independent loops and replaces the barrier synchronizationbetween two loop <strong>invocation</strong>s with its speculative counterpart.Unlike non-speculativebarriers which pessimistically synchronize to enforce dependences, speculative techniquesallow threads to execute past barriers without stalling. Speculation allows programs to optimisticallyexecute potentially dependent instructions and later check for misspeculation.8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!