cs 194 research results paul salzman advisor: professor glenn reinman winter 2007 - spring 2007

29
CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Post on 20-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

CS 194 Research Results

Paul SalzmanAdvisor: Professor Glenn ReinmanWinter 2007 - Spring 2007

Page 2: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Outline

Motivation Initial Project: Polymorphism

Idea Progress and Problems

Final Project: Object Level Locality Idea Previous Work Methodology Results

Page 3: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Motivation: Interactive Entertainment

Simulates virtual worlds with objects and characters that interact.

Large computational requirements with the increasing demand for realism.

Interactions previously relied on predefined animations.

Real time physics engines currently used to dynamically calculate interactions.

These systems can use all the performance boosts possible to make them more feasible.

Page 4: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Initial Project: Polymorphism

Explore a currently proposed dedicated physics architecture, ParallAX.

Explore how different facets of interactive entertainment can be applied to a dedicated architecture.

Page 5: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Initial Project: Progress

Investigating SESC as a viable architectural simulator.

Creating an architecture with heterogeneous cores in SESC.

Hard coding in the ParallAX topology into SESC.

Page 6: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Initial Project: Difficulties

Lack of up to date simulator documentation.

Key out-of-the-box simulator feature, network communication latency modeler, removed without mention.

Simulator construction occupying far too much time.

Page 7: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Initial Project: Experience

Working in a large, open-source code base with bad documentation.

Academic and industry research projects do not always end successfully.

Learn when to pursue a new idea.

Page 8: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Object Level Locality in Real-Time Physics Applications

Idea: Objects in motion stay in motion.

Can this lend to locality at the object level in physics simulation?

If so, how can this be harness to speed up real-time physics simulation?

Page 9: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Value Prediction in Physics Simulation

We will observing load values pertaining to physical objects in the simulator.

Loads are long latency instructions. Accurately predicting loads can

increase instruction level parallelism and in turn performance.

Page 10: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Instruction Level Parallelism (ILP)

Independent instructions can be executed simultaneously.

Data dependencies prevent the processor from working on the chain of dependent instructions.

Predictions allow the processor to attempt useful work past data dependencies.

Page 11: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Previous Work

Value Prediction has been shown as a viable option for performance enhancement.

Various implementations of value predictors have been explored.

Methods to improve which instructions to predict and how to predict with confidence.

Correlations between High-Level information and lower level locality have been found

Page 12: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Methodology

Profile object info in a real-time physics simulator

Observe locality in values associated with physical objects

Construct predictors based on the locality information

Observe the performance of these predictors

Page 13: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Open Dynamics Engine (ODE)

Open source physics engine. Used commercially on the PC, XBOX

360, and other IE platforms. Large code library, hone in on

hotspot functions using gprof. Use a complex benchmark to

exercise the physics engine’s functionality.

Page 14: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Benchmark

Many entities in the enviornment. Collisions between multitudes of

stacked boxes, rigid bodies, and rag doll constraint humanoid objects.

Used with permission from Dr. Thomas Yeh.

Page 15: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007
Page 16: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Profiling ODE

gprof utility Place trace code in the hotspot

function Track each object’s values Associate values with the objects id

(address) Maintain an index via the PC as well as

with the (PC XOR object id) Maintain chronological order

Page 17: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Observing and Analyzing Locality

Parse through the trace code observing locality with respect to the two indexing methods.

Check for adjacent values Stride values Trivial values (0,1,-1)

Page 18: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Constructing/Analyzing Predictors

Use the locality data to construct pertinent predictors.

Run the various predictors through the trace data to observe their performance.

Page 19: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

ODE Hotspots

43%: dBoxBox - Bounding Box collision function

18%: collideAABBs – General geometric collision function

These two functions were chosen to profile.

The load instructions observed scale up to ~40% (rough value)

Page 20: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Locality Results

Charts

Page 21: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Locality Results

Charts

Page 22: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Locality Results

Adjacent values appear very often. Stride values do not appear

(intuitively runs with the idea of a physical object)

Trivial values appear in varying forms across the functions. Different trivial values may appear for

different physics engines.

Page 23: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Predictor Construction

Adjacent Values Last Value Predictor

Simple Implementation, Finite Context Method Predictor (FCM)

Maintains small table of previous values Tracks appearance of tables values Chooses most likely candidate

Trivial Values 0 and -1 predictors.

Extremely simply implementation.

Page 24: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Predictor Construction (cont’d)

Same two functions will be profiled. The predictors will be indexed in the

same fashion as the locality data By PC By (PC XOR object ID)

No limit will be placed on the size of the predictor tables Avoids constructive and destructive

aliasing.

Page 25: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Predictor Results

Page 26: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Predictor Results

Page 27: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Predictor Results

FCM2 appears to function most accurately.

Predictors indexed by (PC XOR object ID) act exactly as zero value predictors By convention, a predictor that has

not seen a value will guess zero. As expected, trivial value predictors

have hit rates equal to the appearance of their trivial values in the locality data.

Page 28: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

Summary – Objects in Motion…

Object level locality does appear in real-time physics simulators.

This data can be leveraged by further research to increase ILP in IE architecture.

Next Step: Pursuing the connection between the high-level data to architecture.

Page 29: CS 194 Research Results Paul Salzman Advisor: Professor Glenn Reinman Winter 2007 - Spring 2007

References

[1] Brad Calder, Glenn Reinman, and Dean Tullsen. Selective Value Prediction. In 26th International Symposium on Computer Architecture, May 1999

[2] Mikko Lipasti, Christopher Wilkerson, and John Shen. Value locality and load value prediction. In Seventh International Conference on Architectural Support for Programming Languages and Operating Systems, 1996.

[3] Open Dynamics Engine. http://ode.org/. [4] Yiannak Sazeides and James E. Smith. The predictability

of data values. In 30th International Symposium on Microarchitecture, pages 248-258, December1997.

[5] Thomas Y. Yeh, Petros Faloutsos, and Glenn Reinman. Accelerating Real-Time Physics Simulation by Leveraging High-Level Information. In UCLA CSD-TR 060023, 2006.