CS 194 Research Results Paul Salzman Advisor Professor

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

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

Outline Motivation ¡ Initial Project: Polymorphism ¡ l l ¡ Idea Progress and Problems

Outline Motivation ¡ Initial Project: Polymorphism ¡ l l ¡ Idea Progress and Problems Final Project: Object Level Locality l l Idea Previous Work Methodology Results

Motivation: Interactive Entertainment ¡ ¡ ¡ Simulates virtual worlds with objects and characters that

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.

Initial Project: Polymorphism Explore a currently proposed dedicated physics architecture, Parall. AX. ¡ Explore

Initial Project: Polymorphism Explore a currently proposed dedicated physics architecture, Parall. AX. ¡ Explore how different facets of interactive entertainment can be applied to a dedicated architecture. ¡

Initial Project: Progress Investigating SESC as a viable architectural simulator. ¡ Creating an architecture

Initial Project: Progress Investigating SESC as a viable architectural simulator. ¡ Creating an architecture with heterogeneous cores in SESC. ¡ Hard coding in the Parall. AX topology into SESC. ¡

Initial Project: Difficulties Lack of up to date simulator documentation. ¡ Key out-of-the-box simulator

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. ¡

Initial Project: Experience Working in a large, open-source code base with bad documentation. ¡

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. ¡

Object Level Locality in Real-Time Physics Applications Idea: Objects in motion stay in motion.

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? ¡

Value Prediction in Physics Simulation We will observing load values pertaining to physical objects

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. ¡

Instruction Level Parallelism (ILP) Independent instructions can be executed simultaneously. ¡ Data dependencies prevent

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. ¡

Previous Work ¡ ¡ Value Prediction has been shown as a viable option for

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

Methodology Profile object info in a real-time physics simulator ¡ Observe locality in values

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 ¡

Open Dynamics Engine (ODE) Open source physics engine. ¡ Used commercially on the PC,

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. ¡

Benchmark Many entities in the enviornment. ¡ Collisions between multitudes of stacked boxes, rigid

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. ¡

Profiling ODE gprof utility ¡ Place trace code in the hotspot function ¡ l

Profiling ODE gprof utility ¡ Place trace code in the hotspot function ¡ l l 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

Observing and Analyzing Locality Parse through the trace code observing locality with respect to

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) ¡

Constructing/Analyzing Predictors Use the locality data to construct pertinent predictors. ¡ Run the various

Constructing/Analyzing Predictors Use the locality data to construct pertinent predictors. ¡ Run the various predictors through the trace data to observe their performance. ¡

ODE Hotspots 43%: d. Box - Bounding Box collision function ¡ 18%: collide. AABBs

ODE Hotspots 43%: d. Box - Bounding Box collision function ¡ 18%: collide. AABBs – General geometric collision function ¡ These two functions were chosen to profile. ¡ The load instructions observed scale up to ~40% (rough value) ¡

Locality Results ¡ Charts

Locality Results ¡ Charts

Locality Results ¡ Charts

Locality Results ¡ Charts

Locality Results Adjacent values appear very often. ¡ Stride values do not appear (intuitively

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. ¡ l Different trivial values may appear for different physics engines.

Predictor Construction ¡ Adjacent Values l Last Value Predictor ¡ l Simple Implementation, Finite

Predictor Construction ¡ Adjacent Values l Last Value Predictor ¡ l Simple Implementation, Finite Context Method Predictor (FCM) Maintains small table of previous values ¡ Tracks appearance of tables values ¡ Chooses most likely candidate ¡ ¡ Trivial Values l 0 and -1 predictors. ¡ Extremely simply implementation.

Predictor Construction (cont’d) Same two functions will be profiled. ¡ The predictors will be

Predictor Construction (cont’d) Same two functions will be profiled. ¡ The predictors will be indexed in the same fashion as the locality data ¡ l l ¡ By PC By (PC XOR object ID) No limit will be placed on the size of the predictor tables l Avoids constructive and destructive aliasing.

Predictor Results

Predictor Results

Predictor Results

Predictor Results

Predictor Results ¡ ¡ ¡ FCM 2 appears to function most accurately. Predictors indexed

Predictor Results ¡ ¡ ¡ FCM 2 appears to function most accurately. Predictors indexed by (PC XOR object ID) act exactly as zero value predictors l 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.

Summary – Objects in Motion… Object level locality does appear in real-time physics simulators.

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. ¡

References ¡ ¡ ¡ [1] Brad Calder, Glenn Reinman, and Dean Tullsen. Selective Value

References ¡ ¡ ¡ [1] Brad Calder, Glenn Reinman, and Dean Tullsen. Selective Value Prediction. In 26 th 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 30 th International Symposium on Microarchitecture, pages 248 -258, December 1997. [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.