pystencils.backend.platforms.GenericGpu

pystencils.backend.platforms.GenericGpu#

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

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

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

  • assume_warp_aligned_block_size (bool) – True if the platform can assume that total GPU block sizes at runtime will always be a multiple of the warp size

  • warp_size (Optional[int]) – Size of a GPU warp

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.

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)