cost-based workload balancing for ray tracing on a heterogeneous platform

9
Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform Mario Rincón-Nigro PhD Showcase Feb 17 th , 2012

Upload: yadid

Post on 22-Feb-2016

29 views

Category:

Documents


0 download

DESCRIPTION

Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform. Mario Rincón-Nigro PhD Showcase Feb 17 th , 2012. Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform. Background. Heterogeneous Computing Platforms Widely available at all scales Ray Tracing - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Mario Rincón-NigroPhD ShowcaseFeb 17th, 2012

Page 2: Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Background• Heterogeneous Computing Platforms

– Widely available at all scales• Ray Tracing

– Most popular technique for photorealism– Base of many rendering algorithms– Computationally intensive– Embarrassingly parallel

Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Page 3: Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Background: BVH Ray TraversalCost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

7 boxes + 15 triangles tests

• Workload of ray tracing is irregular• Per ray BVH traversals are highly variable• Cost is hard to know beforehand

• Dynamic workload balancing

• What about if we could predict the traversal costs?• How to use them to improve the balancing efficiency and reduce rendering times?

5 boxes + 9 triangles tests

Page 4: Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Overview of the ApproachOffline• Build a BVH for the scene• Compute expected number

of primitive intersectionsOnline• Predict costs of batch of rays• Initialize workload balancer

based on predicted costs• Heterogeneous launch of ray

tracer• Repeat for generations of

secondary rays

Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Page 5: Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Ray Traversal Cost Estimation

20

18 12

6 7512

66

4 4

8 7 9

EB = 4.2ET =9.65

EB = 2ET = 8.75

EB = 0ET = 7

EB = 0ET = 9

EB = 0ET = 8

EB = 2ET = 4

EB = 0ET = 4

EB = 3.33ET = 4.89

EB = 0ET = 4

Boundary

Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

(4)

In this example C(r) = 7 KB + 15 KT

We traverse the BVH to 60% of its depth and sample 10% of the rays within each task

Page 6: Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Workload Balancing• Task for ray tracing are fixed size group of rays• Two-level workload balancing

– Inter-processor: need to split work between “big” processing units (CPUs, GPUs)

– Intra-processor: need to split work between “small” processing units(SPs within a GPU)

• A variation of one of these strategies is commonly used:– Centralized queue– Distributed static assignation– Distributed dynamic assignation

with task stealing

Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Page 7: Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Balancing StrategiesDistributed Queues

Distributed Queues withTask Stealing

Centralized Queue

Stati

c B

alan

cing

Dyna

mic

Bal

anci

ngCost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Page 8: Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Experiments• Test platform

– AMAX machine running Intel Xeon E5600 processor, 16GB of RAM memory, and 3 NVidia Tesla C1060 GPUs.

• We have compared regular and cost-initialized versions of the workload balancing policies over a number of test scenes– For task of varying size– For rays exhibiting different degree of spatial coherency (high to medium)

• In general, cost-based initialized versions outperform regular versions for large task sizes

• Results not sensitive to degree of spatial coherency of tested rays

Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Page 9: Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform

Conclusions and Future Work• Cost-based initialization of task system can improve balancing efficiency of

strategies.– The most benefit is gotten by the static strategy (comparable to dynamic balancing)– Dynamic strategies also showed improved balancing efficiency

• Cost based approach is particularly attractive for coarse grained task systems.– Best results achieved for large size tasks

• Work limited by degree of variability that rays can have. Rays with low spatial coherency pose a challenge due to the estimation overhead they impose.– Approach cannot be used in its current state for some rendering algorithms– We believe that fast ray reordering can help in this regard

• We have not considered yet using directly the costs for GPU workload balancing– An implementation of distributed queues on GPUs might also get some benefit fromthe estimated costs

Cost-based Workload Balancing for Ray Tracing on a Heterogeneous Platform