Reference Guide
2.5.0
|
Public Member Functions | |
def | validate_it_can_run_on_gpu (self, node, options) |
This Mixin provides the "validate_it_can_run_on_gpu" method that given a routine or kernel node, it checks that the callee code is valid to run on a GPU. It is implemented as a Mixin because transformations from multiple programming models, e.g. OpenMP and OpenACC, can reuse the same logic.
Definition at line 357 of file transformations.py.
def psyclone.transformations.MarkRoutineForGPUMixin.validate_it_can_run_on_gpu | ( | self, | |
node, | |||
options | |||
) |
Check that the supplied node can be marked as available to be called on GPU. :param node: the kernel or routine to validate. :type node: :py:class:`psyclone.psyGen.Kern` | :py:class:`psyclone.psyir.nodes.Routine` :param options: a dictionary with options for transformations. :type options: Optional[Dict[str, Any]] :param bool options["force"]: whether to allow routines with CodeBlocks to run on the GPU. :raises TransformationError: if the node is not a kernel or a routine. :raises TransformationError: if the target is a built-in kernel. :raises TransformationError: if it is a kernel but without an associated PSyIR. :raises TransformationError: if any of the symbols in the kernel are accessed via a module use statement. :raises TransformationError: if the kernel contains any calls to other routines.
Definition at line 365 of file transformations.py.