loki.transformations.single_column.revector
Functions
|
Wrap a section of nodes in a vector-level loop across the horizontal. |
Classes
|
A base/parent class for transformation to wrap thread-parallel IR sections within a horizontal loop. |
|
|
alias of |
|
|
A transformation to wrap thread-parallel IR sections within a horizontal loop in a way that the horizontal loop is hoisted/moved to the driver level while the horizontal/loop index is passed as an argument. This transformation relies on markers placed by |
|
A transformation to wrap thread-parallel IR sections within a horizontal loop. |
- SCCRevectorTransformation
alias of
SCCVecRevectorTransformation
- class SCCVecRevectorTransformation(horizontal)
Bases:
BaseRevectorTransformationA transformation to wrap thread-parallel IR sections within a horizontal loop. This transformation relies on markers placed by
SCCDevectorTransformation.- Parameters:
horizontal (
Dimension) –Dimensionobject describing the variable conventions used in code to define the horizontal data dimension and iteration space.
- transform_subroutine(routine, **kwargs)
Wrap vector-parallel sections in vector
Loopobjects.This wraps all thread-parallel sections within “kernel” routines or within the parallel loops in “driver” routines.
The markers placed by
SCCDevectorTransformationare removed- Parameters:
routine (
Subroutine) – Subroutine to apply this transformation to.role (str) – Must be either
"kernel"or"driver"targets (tuple or str) – Tuple of target routine names for determining “driver” loops
- class SCCSeqRevectorTransformation(horizontal)
Bases:
BaseRevectorTransformationA transformation to wrap thread-parallel IR sections within a horizontal loop in a way that the horizontal loop is hoisted/moved to the driver level while the horizontal/loop index is passed as an argument. This transformation relies on markers placed by
SCCDevectorTransformation. :param horizontal:Dimensionobject describing the variable conventions used in codeto define the horizontal data dimension and iteration space.
- process_ignored_items = True
- remove_vector_sections(section)
Remove all thread-parallel
Sectionobjects within a given code section :param routine: Subroutine to apply this transformation to. :type routine:Subroutine:param section: Code section in which to replace vector-parallelSectionobjects.
- mark_vector_reductions(routine, section)
Vector reductions are not applicable to sequential routines so we raise an axception here.
- transform_subroutine(routine, **kwargs)
Wrap vector-parallel sections in vector
Loopobjects. This wraps all thread-parallel sections within “kernel” routines or within the parallel loops in “driver” routines. The markers placed bySCCDevectorTransformationare removed :param routine: Subroutine to apply this transformation to. :type routine:Subroutine:param role: Must be either"kernel"or"driver":type role: str :param targets: Tuple of target routine names for determining “driver” loops :type targets: tuple or str
- wrap_vector_section(section, routine, bounds, index, insert_pragma=True)
Wrap a section of nodes in a vector-level loop across the horizontal.
- Parameters:
section (tuple of
Node) – A section of nodes to be wrapped in a vector-level looproutine (
Subroutine) – The subroutine in the vector loops should be removed.horizontal (
Dimension) – The dimension specifying the horizontal vector dimensioninsert_pragma (bool, optional) – Adds a
!$loki vectorpragma around the created loop
- class RevectorSectionTransformer(routine, horizontal, *args, insert_pragma=True, **kwargs)
Bases:
TransformerTransformerthat replacesSectionobjects labelled with"vector_section"with vector-level loops across the horizontal.- Parameters:
routine (
Subroutine) – The subroutine in the vector loops should be removed.horizontal (
Dimension) – The dimension specifying the horizontal vector dimensioninsert_pragma (bool, optional) – Adds a
!$loki vectorpragma around the created loop
- visit_Section(s, **kwargs)