cuda::experimental::stf::async_resources_handle

Defined in include/cuda/experimental/__stf/internal/async_resources_handle.cuh

class async_resources_handle

A handle which stores resources useful for an efficient asynchronous execution.

For example this will store the pools of CUDA streams.

This class relies on a PIMPL idiom and can be passed by value. Creating a new object of this type does not initialize any resource, as these will be set lazily.

Public Functions

inline async_resources_handle()
inline explicit async_resources_handle(::std::nullptr_t)
inline explicit operator bool() const
inline stream_pool &get_device_stream_pool(int dev_id, bool for_computation)
inline ::std::ptrdiff_t get_unique_id(size_t cnt = 1)
inline void release_unique_id(::std::ptrdiff_t id, size_t cnt = 1)
inline bool validate_sync_and_update(::std::ptrdiff_t dst, ::std::ptrdiff_t src, int event_id)
inline void put_graph_in_cache(size_t nnodes, size_t nedges, ::std::shared_ptr<cudaGraphExec_t> exec_g)
inline auto &get_cached_graphs()
inline auto &gc_helper(int dev_id)
inline exec_affinity &get_affinity()
inline const exec_affinity &get_affinity() const
inline bool has_affinity() const
inline void push_affinity(::std::vector<::std::shared_ptr<exec_place>> p) const
inline void push_affinity(::std::shared_ptr<exec_place> p) const
inline void pop_affinity() const
inline const ::std::vector<::std::shared_ptr<exec_place>> &current_affinity() const

Public Static Attributes

static constexpr size_t pool_size = 4
static constexpr size_t data_pool_size = 4