cuda::experimental::places::evaluate_localized_placement#

Overloads#

evaluate_localized_placement(grid, partition, elemsize, probes=localized_placement_default_probes, block_size=0)#

template<typename Partition>
localized_stats cuda::experimental::places::evaluate_localized_placement(
const exec_place &grid,
const Partition &partition,
size_t elemsize,
size_t probes = localized_placement_default_probes,
size_t block_size = 0
)

Evaluate - without allocating - how a localized allocation of a tensor distributed by partition over grid would be placed.

See evaluate_localized_placement(); the tensor extents are the partition’s true extents.

evaluate_localized_placement(grid, mapper, data_dims, elemsize, probes=localized_placement_default_probes, block_size=0)#

inline localized_stats cuda::experimental::places::evaluate_localized_placement(
const exec_place &grid,
partition_fn_t mapper,
dim4 data_dims,
size_t elemsize,
size_t probes = localized_placement_default_probes,
size_t block_size = 0
)

Evaluate - without allocating anything - how a localized allocation would distribute a tensor over the places of a grid.

Runs the exact same block-owner decision procedure as localized_array and returns the resulting statistics, so callers can score a candidate mapping (and tune its parameters) before committing memory.

Extents follow the dimension-0-fastest convention of dim4::get_index().

Parameters:
  • grid – Grid of execution places the mapper distributes over

  • mapper – Partition function mapping element coordinates to a place

  • data_dims – Extents of the tensor

  • elemsize – Size of one element in bytes

  • probes – Number of samples per block for the majority vote

  • block_size – Placement granularity in bytes; 0 selects the device allocation granularity when a device is present, or a 2 MiB default otherwise (this granularity query is the only driver interaction)