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:
BaseRevectorTransformation
A transformation to wrap thread-parallel IR sections within a horizontal loop. This transformation relies on markers placed by
SCCDevectorTransformation
.- Parameters:
horizontal (
Dimension
) –Dimension
object 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
Loop
objects.This wraps all thread-parallel sections within “kernel” routines or within the parallel loops in “driver” routines.
The markers placed by
SCCDevectorTransformation
are 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:
BaseRevectorTransformation
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
SCCDevectorTransformation
. :param horizontal:Dimension
object 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
Section
objects 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-parallelSection
objects.
- mark_vector_reductions(routine, section)
Mark vector-reduction loops in marked vector-reduction regions. If a region explicitly marked with
!$loki vector-reduction(<reduction clause>)
/!$loki end vector-reduction
is encountered, we replace existing!$loki loop vector
loop pragmas and add the reduction keyword and clause. These will be turned into OpenACC equivalents bySCCAnnotate
.
- transform_subroutine(routine, **kwargs)
Wrap vector-parallel sections in vector
Loop
objects. This wraps all thread-parallel sections within “kernel” routines or within the parallel loops in “driver” routines. The markers placed bySCCDevectorTransformation
are 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 vector
pragma around the created loop
- class RevectorSectionTransformer(routine, horizontal, *args, insert_pragma=True, **kwargs)
Bases:
Transformer
Transformer
that replacesSection
objects 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 vector
pragma around the created loop
- visit_Section(s, **kwargs)