Ginkgo  Generated from pipelines/3035309441 branch based on develop. Ginkgo version 2.0.0
A numerical linear algebra library targeting many-core architectures
Public Attributes | List of all members
gko::umpire_pool_config Struct Reference

Configuration for a pool created by make_umpire_cpu_pool(), make_umpire_cuda_pool() or make_umpire_hip_pool(). More...

#include <ginkgo/core/base/memory.hpp>

Collaboration diagram for gko::umpire_pool_config:
[legend]

Public Attributes

std::string resource = ""
 Umpire memory resource to pool over; empty means "HOST" for CPU and "DEVICE" for CUDA/HIP. More...
 
size_type initial_block_size = size_type{512} << 20
 Size in bytes of the pool's first block, requested on first allocation. More...
 
size_type growth_block_size = size_type{64} << 20
 Minimum bytes per subsequent growth.
 
size_type alignment = 256
 Allocation alignment, matching cudaMalloc/hipMalloc rather than Umpire's 16-byte default. More...
 
bool tracked = true
 Register each allocation in Umpire's tracking registry. More...
 
bool thread_safe = false
 Wrap the pool in Umpire's ThreadSafeAllocator. More...
 

Detailed Description

Configuration for a pool created by make_umpire_cpu_pool(), make_umpire_cuda_pool() or make_umpire_hip_pool().

The pool stays registered with Umpire, and keeps its reserved memory, until release() is called or the program exits.

Member Data Documentation

◆ alignment

size_type gko::umpire_pool_config::alignment = 256

Allocation alignment, matching cudaMalloc/hipMalloc rather than Umpire's 16-byte default.

Must be a nonzero power of two. Applies only to pools created by make_umpire_*_pool().

◆ initial_block_size

size_type gko::umpire_pool_config::initial_block_size = size_type{512} << 20

Size in bytes of the pool's first block, requested on first allocation.

Each MPI rank has its own pool, so divide the budget by the number of ranks sharing a GPU or node.

◆ resource

std::string gko::umpire_pool_config::resource = ""

Umpire memory resource to pool over; empty means "HOST" for CPU and "DEVICE" for CUDA/HIP.

May be device-qualified ("DEVICE::1").

A plain "DEVICE" binds to whichever device is current when Umpire first creates it, so a mismatched executor throws. Multi-GPU users should pass "DEVICE::<id>".

◆ thread_safe

bool gko::umpire_pool_config::thread_safe = false

Wrap the pool in Umpire's ThreadSafeAllocator.

Set this if the pool is used from several threads. The unwrapped pool is registered as <name>_pool, and name refers to the wrapper.

◆ tracked

bool gko::umpire_pool_config::tracked = true

Register each allocation in Umpire's tracking registry.

If false, the size/watermark/count getters report 0, and deallocating a foreign pointer is undefined behaviour instead of a reported error.


The documentation for this struct was generated from the following file: