StarPU Internal Handbook
|
#include <workers.h>
Data Fields | |
struct _starpu_machine_config * | config |
starpu_pthread_mutex_t | mutex |
enum starpu_worker_archtype | arch |
uint32_t | worker_mask |
struct starpu_perfmodel_arch | perf_arch |
starpu_pthread_t | worker_thread |
unsigned | devid |
unsigned | subworkerid |
int | bindid |
int | workerid |
int | combined_workerid |
int | current_rank |
int | worker_size |
starpu_pthread_cond_t | started_cond |
starpu_pthread_cond_t | ready_cond |
unsigned | memory_node |
unsigned | numa_memory_node |
starpu_pthread_cond_t | sched_cond |
starpu_pthread_mutex_t | sched_mutex |
unsigned | state_relax_refcnt |
unsigned | state_sched_op_pending |
unsigned | state_changing_ctx_waiting |
unsigned | state_changing_ctx_notice |
unsigned | state_blocked_in_parallel |
unsigned | state_blocked_in_parallel_observed |
unsigned | state_block_in_parallel_req |
unsigned | state_block_in_parallel_ack |
unsigned | state_unblock_in_parallel_req |
unsigned | state_unblock_in_parallel_ack |
unsigned | block_in_parallel_ref_count |
starpu_pthread_t | thread_changing_ctx |
struct _starpu_ctx_change_list | ctx_change_list |
struct starpu_task_list | local_tasks |
struct starpu_task ** | local_ordered_tasks |
unsigned | local_ordered_tasks_size |
unsigned | current_ordered_task |
unsigned | current_ordered_task_order |
struct starpu_task * | current_task |
struct starpu_task * | current_tasks [STARPU_MAX_PIPELINE] |
starpu_pthread_wait_t | wait |
struct timespec | cl_start |
struct timespec | cl_expend |
struct timespec | cl_end |
unsigned char | first_task |
unsigned char | ntasks |
unsigned char | pipeline_length |
unsigned char | pipeline_stuck |
struct _starpu_worker_set * | set |
unsigned | worker_is_running |
unsigned | worker_is_initialized |
enum _starpu_worker_status | status |
unsigned | state_keep_awake |
char | name [128] |
char | short_name [32] |
unsigned | run_by_starpu |
struct _starpu_driver_ops * | driver_ops |
struct _starpu_sched_ctx_list * | sched_ctx_list |
int | tmp_sched_ctx |
unsigned | nsched_ctxs |
struct _starpu_barrier_counter | tasks_barrier |
unsigned | has_prev_init |
unsigned | removed_from_ctx [STARPU_NMAX_SCHED_CTXS+1] |
unsigned | spinning_backoff |
unsigned | nb_buffers_transferred |
unsigned | nb_buffers_totransfer |
struct starpu_task * | task_transferring |
unsigned | shares_tasks_lists [STARPU_NMAX_SCHED_CTXS+1] |
unsigned | poped_in_ctx [STARPU_NMAX_SCHED_CTXS+1] |
unsigned | reverse_phase [2] |
unsigned | pop_ctx_priority |
unsigned | is_slave_somewhere |
struct _starpu_sched_ctx * | stream_ctx |
hwloc_bitmap_t | hwloc_cpu_set |
hwloc_obj_t | hwloc_obj |
char | padding [STARPU_CACHELINE_SIZE] |
This is initialized by _starpu_worker_init()
struct _starpu_machine_config* _starpu_worker::config |
starpu_pthread_mutex_t _starpu_worker::mutex |
enum starpu_worker_archtype _starpu_worker::arch |
what is the type of worker ?
uint32_t _starpu_worker::worker_mask |
what is the type of worker ?
struct starpu_perfmodel_arch _starpu_worker::perf_arch |
in case there are different models of the same arch
starpu_pthread_t _starpu_worker::worker_thread |
the thread which runs the worker
unsigned _starpu_worker::devid |
which cpu/gpu/etc is controlled by the worker ?
unsigned _starpu_worker::subworkerid |
which sub-worker this one is for the cpu/gpu
int _starpu_worker::bindid |
which cpu is the driver bound to ? (logical index)
int _starpu_worker::workerid |
uniquely identify the worker among all processing units types
int _starpu_worker::combined_workerid |
combined worker currently using this worker
int _starpu_worker::current_rank |
current rank in case the worker is used in a parallel fashion
int _starpu_worker::worker_size |
size of the worker in case we use a combined worker
starpu_pthread_cond_t _starpu_worker::started_cond |
indicate when the worker is ready
starpu_pthread_cond_t _starpu_worker::ready_cond |
indicate when the worker is ready
unsigned _starpu_worker::memory_node |
which memory node is the worker associated with ?
unsigned _starpu_worker::numa_memory_node |
which numa memory node is the worker associated with? (logical index)
starpu_pthread_cond_t _starpu_worker::sched_cond |
condition variable used for passive waiting operations on worker STARPU_PTHREAD_COND_BROADCAST must be used instead of STARPU_PTHREAD_COND_SIGNAL, since the condition is shared for multiple purpose
starpu_pthread_mutex_t _starpu_worker::sched_mutex |
mutex protecting sched_cond
unsigned _starpu_worker::state_relax_refcnt |
mark scheduling sections where other workers can safely access the worker state
unsigned _starpu_worker::state_sched_op_pending |
a task pop is ongoing even though sched_mutex may temporarily be unlocked
unsigned _starpu_worker::state_changing_ctx_waiting |
a thread is waiting for operations such as pop to complete before acquiring sched_mutex and modifying the worker ctx
unsigned _starpu_worker::state_changing_ctx_notice |
the worker ctx is about to change or being changed, wait for flag to be cleared before starting new scheduling operations
unsigned _starpu_worker::state_blocked_in_parallel |
worker is currently blocked on a parallel section
unsigned _starpu_worker::state_blocked_in_parallel_observed |
the blocked state of the worker has been observed by another worker during a relaxed section
unsigned _starpu_worker::state_block_in_parallel_req |
a request for state transition from unblocked to blocked is pending
unsigned _starpu_worker::state_block_in_parallel_ack |
a block request has been honored
unsigned _starpu_worker::state_unblock_in_parallel_req |
a request for state transition from blocked to unblocked is pending
unsigned _starpu_worker::state_unblock_in_parallel_ack |
an unblock request has been honored
unsigned _starpu_worker::block_in_parallel_ref_count |
cumulative blocking depth
starpu_pthread_t _starpu_worker::thread_changing_ctx |
thread currently changing a sched_ctx containing the worker
struct _starpu_ctx_change_list _starpu_worker::ctx_change_list |
list of deferred context changes
when the current thread is a worker, _and_ this worker is in a scheduling operation, new ctx changes are queued to this list for subsequent processing once worker completes the ongoing scheduling operation
struct starpu_task_list _starpu_worker::local_tasks |
this queue contains tasks that have been explicitely submitted to that queue
struct starpu_task** _starpu_worker::local_ordered_tasks |
this queue contains tasks that have been explicitely submitted to that queue with an explicit order
unsigned _starpu_worker::local_ordered_tasks_size |
this records the size of local_ordered_tasks
unsigned _starpu_worker::current_ordered_task |
this records the index (within local_ordered_tasks) of the next ordered task to be executed
unsigned _starpu_worker::current_ordered_task_order |
this records the order of the next ordered task to be executed
struct starpu_task* _starpu_worker::current_task |
task currently executed by this worker (non-pipelined version)
struct starpu_task* _starpu_worker::current_tasks[STARPU_MAX_PIPELINE] |
tasks currently executed by this worker (pipelined version)
starpu_pthread_wait_t _starpu_worker::wait |
struct timespec _starpu_worker::cl_start |
Codelet start time of the task currently running
struct timespec _starpu_worker::cl_expend |
Codelet expected end time of the task currently running
struct timespec _starpu_worker::cl_end |
Codelet end time of the last task running
unsigned char _starpu_worker::first_task |
Index of first task in the pipeline
unsigned char _starpu_worker::ntasks |
number of tasks in the pipeline
unsigned char _starpu_worker::pipeline_length |
number of tasks to be put in the pipeline
unsigned char _starpu_worker::pipeline_stuck |
whether a task prevents us from pipelining
struct _starpu_worker_set* _starpu_worker::set |
in case this worker belongs to a set
unsigned _starpu_worker::worker_is_running |
unsigned _starpu_worker::worker_is_initialized |
enum _starpu_worker_status _starpu_worker::status |
what is the worker doing now ? (eg. CALLBACK)
unsigned _starpu_worker::state_keep_awake |
!0 if a task has been pushed to the worker and the task has not yet been seen by the worker, the worker should no go to sleep before processing this task
char _starpu_worker::name[128] |
char _starpu_worker::short_name[32] |
unsigned _starpu_worker::run_by_starpu |
Is this run by StarPU or directly by the application ?
struct _starpu_driver_ops* _starpu_worker::driver_ops |
struct _starpu_sched_ctx_list* _starpu_worker::sched_ctx_list |
int _starpu_worker::tmp_sched_ctx |
unsigned _starpu_worker::nsched_ctxs |
the no of contexts a worker belongs to
struct _starpu_barrier_counter _starpu_worker::tasks_barrier |
wait for the tasks submitted
unsigned _starpu_worker::has_prev_init |
had already been inited in another ctx
unsigned _starpu_worker::removed_from_ctx[STARPU_NMAX_SCHED_CTXS+1] |
unsigned _starpu_worker::spinning_backoff |
number of cycles to pause when spinning
unsigned _starpu_worker::nb_buffers_transferred |
number of piece of data already send to worker
unsigned _starpu_worker::nb_buffers_totransfer |
number of piece of data already send to worker
struct starpu_task* _starpu_worker::task_transferring |
The buffers of this task are being sent
unsigned _starpu_worker::shares_tasks_lists[STARPU_NMAX_SCHED_CTXS+1] |
indicate whether the workers shares tasks lists with other workers in this case when removing him from a context it disapears instantly
unsigned _starpu_worker::poped_in_ctx[STARPU_NMAX_SCHED_CTXS+1] |
boolean to chose the next ctx a worker will pop into
unsigned _starpu_worker::reverse_phase[2] |
boolean indicating at which moment we checked all ctxs and change phase for the booleab poped_in_ctx one for each of the 2 priorities
unsigned _starpu_worker::pop_ctx_priority |
indicate which priority of ctx is currently active: the values are 0 or 1
unsigned _starpu_worker::is_slave_somewhere |
bool to indicate if the worker is slave in a ctx
struct _starpu_sched_ctx* _starpu_worker::stream_ctx |
hwloc_bitmap_t _starpu_worker::hwloc_cpu_set |
hwloc_obj_t _starpu_worker::hwloc_obj |
char _starpu_worker::padding[STARPU_CACHELINE_SIZE] |
Keep this last, to make sure to separate worker data in separate cache lines.