loki.transformations.single_column.scc

Module Attributes

SCCVectorPipeline

SCC-style transformation that additionally hoists local temporary arrays that cannot be demoted to the outer driver call.

SCCHoistPipeline

SCC-style transformation that additionally pre-allocates a "stack" pool allocator and associates local arrays with preallocated memory.

SCCStackPipeline

SCC-style transformation that additionally pre-allocates a "stack" pool allocator and replaces local temporaries with indexed sub-arrays of this preallocated array.

SCCVectorPipeline = functools.partial(<class 'loki.batch.pipeline.Pipeline'>, classes=(<class 'loki.transformations.single_column.base.SCCBaseTransformation'>, <class 'loki.transformations.single_column.vector.SCCDevectorTransformation'>, <class 'loki.transformations.single_column.vector.SCCDemoteTransformation'>, <class 'loki.transformations.single_column.vector.SCCRevectorTransformation'>, <class 'loki.transformations.single_column.annotate.SCCAnnotateTransformation'>))

SCC-style transformation that additionally hoists local temporary arrays that cannot be demoted to the outer driver call.

For details of the kernel and driver-side transformations, please refer to SCCVectorPipeline

In addition, this pipeline will invoke HoistTemporaryArraysAnalysis and SCCHoistTemporaryArraysTransformation before the final annotation step to hoist multi-dimensional local temporary array variables to the “driver” routine, where they will be allocated on device and passed down as arguments.

Parameters:
  • horizontal (Dimension) – Dimension object describing the variable conventions used in code to define the horizontal data dimension and iteration space.

  • block_dim (Dimension) – Optional Dimension object to define the blocking dimension to use for hoisted column arrays if hoisting is enabled.

  • directive (string or None) – Directives flavour to use for parallelism annotations; either 'openacc' or None.

  • trim_vector_sections (bool) – Flag to trigger trimming of extracted vector sections to remove nodes that are not assignments involving vector parallel arrays.

  • demote_local_arrays (bool) – Flag to trigger local array demotion to scalar variables where possible

  • dim_vars (tuple of str, optional) – Variables to be within the dimensions of the arrays to be hoisted. If not provided, no checks will be done for the array dimensions in HoistTemporaryArraysAnalysis.

SCCHoistPipeline = functools.partial(<class 'loki.batch.pipeline.Pipeline'>, classes=(<class 'loki.transformations.single_column.base.SCCBaseTransformation'>, <class 'loki.transformations.single_column.vector.SCCDevectorTransformation'>, <class 'loki.transformations.single_column.vector.SCCDemoteTransformation'>, <class 'loki.transformations.single_column.vector.SCCRevectorTransformation'>, <class 'loki.transformations.hoist_variables.HoistTemporaryArraysAnalysis'>, <class 'loki.transformations.single_column.hoist.SCCHoistTemporaryArraysTransformation'>, <class 'loki.transformations.single_column.annotate.SCCAnnotateTransformation'>))

SCC-style transformation that additionally pre-allocates a “stack” pool allocator and associates local arrays with preallocated memory.

For details of the kernel and driver-side transformations, please refer to SCCVectorPipeline

In addition, this pipeline will invoke TemporariesPoolAllocatorTransformation to back the remaining locally allocated arrays from a “stack” pool allocator that is pre-allocated in the driver routine and passed down via arguments.

Parameters:
  • horizontal (Dimension) – Dimension object describing the variable conventions used in code to define the horizontal data dimension and iteration space.

  • block_dim (Dimension) – Optional Dimension object to define the blocking dimension to use for hoisted column arrays if hoisting is enabled.

  • directive (string or None) – Directives flavour to use for parallelism annotations; either 'openacc' or None.

  • trim_vector_sections (bool) – Flag to trigger trimming of extracted vector sections to remove nodes that are not assignments involving vector parallel arrays.

  • demote_local_arrays (bool) – Flag to trigger local array demotion to scalar variables where possible

  • check_bounds (bool, optional) – Insert bounds-checks in the kernel to make sure the allocated stack size is not exceeded (default: True)

SCCStackPipeline = functools.partial(<class 'loki.batch.pipeline.Pipeline'>, classes=(<class 'loki.transformations.single_column.base.SCCBaseTransformation'>, <class 'loki.transformations.single_column.vector.SCCDevectorTransformation'>, <class 'loki.transformations.single_column.vector.SCCDemoteTransformation'>, <class 'loki.transformations.single_column.vector.SCCRevectorTransformation'>, <class 'loki.transformations.single_column.annotate.SCCAnnotateTransformation'>, <class 'loki.transformations.pool_allocator.TemporariesPoolAllocatorTransformation'>))

SCC-style transformation that additionally pre-allocates a “stack” pool allocator and replaces local temporaries with indexed sub-arrays of this preallocated array.

For details of the kernel and driver-side transformations, please refer to SCCVectorPipeline

In addition, this pipeline will invoke TemporariesRawStackTransformation to back the remaining locally allocated arrays from a “stack” pool allocator that is pre-allocated in the driver routine and passed down via arguments.

Parameters:
  • horizontal (Dimension) – Dimension object describing the variable conventions used in code to define the horizontal data dimension and iteration space.

  • block_dim (Dimension) – Optional Dimension object to define the blocking dimension to use for hoisted column arrays if hoisting is enabled.

  • directive (string or None) – Directives flavour to use for parallelism annotations; either 'openacc' or None.

  • trim_vector_sections (bool) – Flag to trigger trimming of extracted vector sections to remove nodes that are not assignments involving vector parallel arrays.

  • demote_local_arrays (bool) – Flag to trigger local array demotion to scalar variables where possible

  • check_bounds (bool, optional) – Insert bounds-checks in the kernel to make sure the allocated stack size is not exceeded (default: True)

  • driver_horizontal (str, optional) – Override string if a separate variable name should be used for the horizontal when allocating the stack in the driver.