cuda::experimental::places::localized_stats#

struct localized_stats#

Statistics describing how a localized allocation - or a dry-run evaluation of one - distributes a tensor over data places.

Produced by evaluate_localized_placement() and by localized_array (see localized_array::get_stats()). This is the returnable form of the report previously only printed to stderr under CUDASTF_LOCALIZED_ALLOC_STATS.

Public Functions

inline double accuracy() const#

Fraction of sampled elements whose owner matches the block-majority owner: an estimate of the fraction of bytes that end up local to their owner once ownership is quantized to blocks.

Public Members

size_t total_bytes = 0#

requested payload size in bytes

size_t vm_bytes = 0#

block-rounded virtual reservation size in bytes

size_t block_size = 0#

placement granularity in bytes

size_t nblocks = 0#

number of placement blocks

size_t nallocs = 0#

physical allocations after merging same-owner runs

size_t total_samples = 0#

probes drawn by the block-owner sampler

size_t matching_samples = 0#

probes agreeing with the chosen block owner

::std::unordered_map<::std::string, size_t> bytes_per_place#

Bytes backed by each place, keyed by data_place::to_string()

::std::unordered_map<size_t, size_t> bytes_per_grid_index#

Bytes owned by each grid position, keyed by the position’s linear index (dim4::get_index of the pos4; friendlier than strings across FFI)