Skip to content

Support for Region of Interest (ROI)

bprail edited this page May 28, 2015 · 6 revisions

Region of Interest (ROI) is supported in two modes: whole program and reduced events. The former is the default. In this mode, the runtime records all of the events of the program, along with a special ROI event to denote when the ROI starts and ends. These events are retained as part of the task graph, giving the option of modeling the whole program or just the ROI.

The ROI is stored as the following interval [ROI Start Task ID, ROI End Task ID). As such, the start task is in the ROI, but the end task is not.

In the reduced event mode, Contech also requires that an environment variable, CONTECH_ROI_ENABLE is set (i.e., assigned a value). Without the environment variable, the whole program is recorded. Only the roi_begin / end calls are required to record events in an ROI.

When in the reduced event mode, PARSEC runs ~1% faster and middle layer 5% faster from the reduced events. Here is the model (based on PARSEC):

  • Program start: Record nothing
  • Main: Record everything, especially create thread 0
  • bench_begin(): disable recording of events, still capture certain types such as create
  • roi_begin(): enable all events (i.e., switch from initBuffer to allocate)
  • roi_end(): disable all events, except certain types
  • bench_end(): disable everything, or ignore?

The runtime provides the implementation of these routines, which are inserted into the code by the programmer. The routines may also need a special include file for suites that do not define equivalent routines.