cuda::experimental::stf::backend_ctx_untyped#

class backend_ctx_untyped#

This is the underlying context implementation common to all types.

We use this class rather than the front-end ones (stream_ctx, graph_ctx, …) in the internal methods where we don’t always know types for example.

Subclassed by cuda::experimental::stf::backend_ctx< graph_ctx >, cuda::experimental::stf::backend_ctx< stream_ctx >, cuda::experimental::stf::backend_ctx< Engine >

Public Types

enum class phase#

current context status

We keep track of the status of context so that we do not make API calls at an inappropriate time, such as synchronizing twice.

Values:

enumerator setup#
enumerator submitted#
enumerator finalized#

Public Functions

backend_ctx_untyped() = delete#
inline backend_ctx_untyped(::std::shared_ptr<impl> impl)#
inline explicit operator bool() const#
inline bool operator==(const backend_ctx_untyped &rhs) const#
inline bool operator!=(const backend_ctx_untyped &rhs) const#
inline async_resources_handle &async_resources() const#
inline bool reordering_tasks() const#
inline auto &get_composite_cache()#
inline ::std::pair<exec_place, bool> schedule_task(
const task &t
) const#
inline void reorder_tasks(
::std::vector<int> &tasks,
::std::unordered_map<int, reserved::reorderer_payload> &task_map
)#
inline void increment_task_count()#
inline void increment_finished_task_count()#
inline size_t task_count() const#
inline void release_resources(cudaStream_t stream)#

Release context resources using the provided stream This should be called after graph execution completes to clean up resources.

inline void add_resource(::std::shared_ptr<ctx_resource> resource)#

Add a resource to be managed by this context.

inline void set_allocator(block_allocator_untyped custom)#
inline void set_uncached_allocator(block_allocator_untyped custom)#
inline auto &get_allocator()#
inline const auto &get_allocator() const#
inline auto &get_default_allocator()#
inline auto &get_uncached_allocator()#
inline void update_uncached_allocator(
block_allocator_untyped uncached_allocator
)#
inline void attach_allocator(block_allocator_untyped a)#
inline void add_transfer(
const data_place &src_node,
const data_place &dst_node,
size_t s
)#
inline bool generate_event_symbols() const#
inline void enable_logical_data_stats()#
inline cudaGraph_t graph() const#
inline void set_graph_cache_policy(::std::function<bool()> policy)#
inline auto get_graph_cache_policy() const#
inline executable_graph_cache_stat *graph_get_cache_stat()#
inline event_list stream_to_event_list(
cudaStream_t stream,
::std::string event_symbol
) const#
inline size_t stage() const#
inline ::std::string to_string() const#
inline bool track_dangling_events() const#
inline impl &get_state()#
inline const impl &get_state() const#
inline const auto &get_dot() const#
inline auto &get_dot()#
template<typename parent_ctx_t>
inline void set_parent_ctx(
parent_ctx_t &parent_ctx
)#
inline auto dot_section(::std::string symbol) const#
inline auto get_phase() const#
inline void set_phase(backend_ctx_untyped::phase p)#
inline bool has_start_events() const#
inline const event_list &get_start_events() 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#
inline const exec_place &current_exec_place() const#
inline bool has_affinity() const#
inline exec_place default_exec_place() const#
inline auto pick_dstream()#
inline cudaStream_t pick_stream()#