Code Management for LLM multi-core processor

To facilitate this code management, the IBM Cell processor provides an overlay mechanism. In a linker script, users can specify the number of regions and the mapping of functions into regions. Functions mapped to one region are mapped to the same physical location in the limited local memory, and replace each other when called. The size of region is equal to the size of the largest object mapped to the region, and the total code space required is the sum of the sizes of the regions. The goal of code mapping problem is then to generate a linker script, which minimizes the swapping of functions so that performance can be improved due to reduced data transfers between the global memory and local memory.

The kernel problems of CODE MANAGEMENT is:

  • What size should be distributed to code region?
  • How many regions should be defined for a given CODE size?
  • Which functions should be mapped to what regions?

Our Approach

We formulate our problem using Global Call Control Flow Graph (GCCFG), which captures both aggregate and temporal information about the function callls.

In the graph above, we show how to formulate the GCCFG from the code. In the GCCFG, there is strict ordering among the nodes, i.e. left child is called before the right child. L-node means loop node and I-node means conditional node.The node weights indicate execution count of functions, e.g. 100 for node F6 means the L2 loop will execute 100 times. In addition, GCCFG will also indetify the recursive functions.

We also proposed a cost model, interfenrence cost graph, to evaluate the performance based on the GCCFG of that application. Finally, two heuristics are proposed – FMUM Heuristic and FMUP Heuristic.

FMUM Heuristic: Start from non-overlap code regions and unify different regions to decrese the total size of the code region until it meets the requirement.

FMUP Heuristic: Start from a unified code region and partition it into different regions until it meets the restriction of the total size of the code region.

The details can be found in the paper “Dynamic Code Mapping for Limited Local Memory Systems“.

Publications

pdf Dynamic Code Mapping for Limited Local Memory Systems
Seung chul Jung, Aviral Shrivastava, and Ke Bai
ASAP 2010 :Proceedings of the 2010 International Conference on Application-specific Systems, Architectures and Processors