pystencils.backend.platforms.GenericGpu#

class pystencils.backend.platforms.GenericGpu(ctx, assume_warp_aligned_block_size, warp_size, thread_mapping=None)#

Common base platform for CUDA- and HIP-type GPU targets.

Parameters:
  • ctx (KernelCreationContext) – The kernel creation context

  • omit_range_check – If True, generated index translation code will not check if the point identified by block and thread indices is actually contained in the iteration space

  • thread_mapping (Optional[ThreadMapping]) – Callback object which defines the mapping of thread indices onto iteration space points

  • assume_warp_aligned_block_size (bool)

  • warp_size (int | None)

property required_headers: set[str]#

Set of header files that must be included at the point of definition of a kernel running on this platform.

materialize_iteration_space(body, ispace)#

Materialize the given iteration space as an indexing structure and embed the given kernel body into that structure.

Return type:

PsBlock

Parameters:
select_function(call)#

Select an implementation for the given function on the given data type.

If no viable implementation exists, raise a MaterializationError.

Return type:

PsExpression

Parameters:

call (PsCall)