class dry_run_executor
Declaration
class dry_run_executor : public executor { /* full declaration omitted */ };
Description
Executor implementation selected when Celerity performs a dry run, that is, graph generation for debugging purposes without actually allocating memory, launching kernels or issuing data transfers. dry_run_executor
still executes horizon-, epoch- and fence instructions to guarantee forward progress in the user application.
Inherits from: executor
Member Variables
- double_buffered_queue<submission> m_submission_queue
- std::thread m_thread
Member Aliases
- using host_object_transfer = std::pair< host_object_id, std::unique_ptr<host_object_instance>>;
- using submission = std::variant<std::vector<const instruction*>, host_object_transfer>;
Member Function Overview
- dry_run_executor(delegate * dlg) → explicit
- dry_run_executor(const dry_run_executor &)
- dry_run_executor(dry_run_executor &&)
- operator=(const dry_run_executor &) → dry_run_executor &
- operator=(dry_run_executor &&) → dry_run_executor &
- submit(std::vector<const instruction *> instructions, std::vector<outbound_pilot> pilots) → void
- track_host_object_instance(host_object_id hoid, std::unique_ptr<host_object_instance> instance) → void
- track_reducer(reduction_id rid, std::unique_ptr<reducer> reducer) → void
- track_user_allocation(allocation_id aid, void * ptr) → void
- ~dry_run_executor()
- thread_main(delegate * dlg) → void
Inherited from executor:
Member Functions
¶explicit dry_run_executor(delegate* dlg)
explicit dry_run_executor(delegate* dlg)
Description
dlg
(optional) receives notifications about reached horizons and epochs from the executor thread.
Parameters
- delegate* dlg
¶dry_run_executor(const dry_run_executor&)
dry_run_executor(const dry_run_executor&)
Parameters
- const dry_run_executor&
¶dry_run_executor(dry_run_executor&&)
dry_run_executor(dry_run_executor&&)
Parameters
¶dry_run_executor& operator=(
const dry_run_executor&)
dry_run_executor& operator=(
const dry_run_executor&)
Parameters
- const dry_run_executor&
¶dry_run_executor& operator=(dry_run_executor&&)
dry_run_executor& operator=(dry_run_executor&&)
Parameters
¶void submit(
std::vector<const instruction*> instructions,
std::vector<outbound_pilot> pilots)
void submit(
std::vector<const instruction*> instructions,
std::vector<outbound_pilot> pilots)
Description
Submits a list of instructions to execute once their dependencies have been fulfilled, and a list of outbound pilots to be transmitted to their recipients as soon as possible. Instructions must be in topological order of dependencies, as must be the concatenation of all vectors passed to subsequent invocations of this function.
Parameters
- std::vector<const instruction*> instructions
- std::vector<outbound_pilot> pilots
¶void track_host_object_instance(
host_object_id hoid,
std::unique_ptr<host_object_instance>
instance)
void track_host_object_instance(
host_object_id hoid,
std::unique_ptr<host_object_instance>
instance)
Description
Transfer ownership of a host object instance to the executor. The executor will later destroy this instance when executing a matching destroy_host_object_instruction.
Parameters
- host_object_id hoid
- std::unique_ptr<host_object_instance> instance
¶void track_reducer(
reduction_id rid,
std::unique_ptr<reducer> reducer)
void track_reducer(
reduction_id rid,
std::unique_ptr<reducer> reducer)
Description
Informs the executor about the runtime behavior of a reduction. Will be used by any fill_identity_instruction and reduce_instruction later submitted on the same reduction_id. Reducer instances are removed from executor tracking and destroyed when they later appear in an instruction_garbage list attached to a horizon or epoch instruction.
Parameters
- reduction_id rid
- std::unique_ptr<reducer> reducer
¶void track_user_allocation(allocation_id aid,
void* ptr)
void track_user_allocation(allocation_id aid,
void* ptr)
Description
Informs the executor about the runtime address of an allocation on user_memory_id. Must be called before submitting any instruction referring to the allocation id in question. User allocations are later removed from executor tracking as they appear in an instruction_garbage list attached to a horizon or epoch instruction.
Parameters
- allocation_id aid
- void* ptr
¶~dry_run_executor()
~dry_run_executor()
Description
Waits until an epoch with epoch_action::shutdown
has executed and the executor thread has exited.
¶void thread_main(delegate* dlg)
void thread_main(delegate* dlg)
Parameters
- delegate* dlg