Loading...
Searching...
No Matches
_starpu_worker Struct Reference

`#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]

## Detailed Description

This is initialized by _starpu_worker_init()

## Field Documentation

## config

struct _starpu_machine_config* _starpu_worker::config

## mutex

starpu_pthread_mutex_t _starpu_worker::mutex

## arch

enum starpu_worker_archtype _starpu_worker::arch

what is the type of worker ?

## worker_mask

uint32_t _starpu_worker::worker_mask

what is the type of worker ?

## perf_arch

struct starpu_perfmodel_arch _starpu_worker::perf_arch

in case there are different models of the same arch

## worker_thread

starpu_pthread_t _starpu_worker::worker_thread

the thread which runs the worker

## devid

unsigned _starpu_worker::devid

which cpu/gpu/etc is controlled by the worker ?

## subworkerid

unsigned _starpu_worker::subworkerid

which sub-worker this one is for the cpu/gpu

## bindid

int _starpu_worker::bindid

which cpu is the driver bound to ? (logical index)

## workerid

int _starpu_worker::workerid

uniquely identify the worker among all processing units types

## combined_workerid

int _starpu_worker::combined_workerid

combined worker currently using this worker

## current_rank

int _starpu_worker::current_rank

current rank in case the worker is used in a parallel fashion

## worker_size

int _starpu_worker::worker_size

size of the worker in case we use a combined worker

## started_cond

starpu_pthread_cond_t _starpu_worker::started_cond

indicate when the worker is ready

## ready_cond

starpu_pthread_cond_t _starpu_worker::ready_cond

indicate when the worker is ready

## memory_node

unsigned _starpu_worker::memory_node

which memory node is the worker associated with ?

## numa_memory_node

unsigned _starpu_worker::numa_memory_node

which numa memory node is the worker associated with? (logical index)

## sched_cond

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

## sched_mutex

starpu_pthread_mutex_t _starpu_worker::sched_mutex

mutex protecting sched_cond

## state_relax_refcnt

unsigned _starpu_worker::state_relax_refcnt

mark scheduling sections where other workers can safely access the worker state

## state_sched_op_pending

unsigned _starpu_worker::state_sched_op_pending

a task pop is ongoing even though sched_mutex may temporarily be unlocked

## state_changing_ctx_waiting

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

## state_changing_ctx_notice

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

## state_blocked_in_parallel

unsigned _starpu_worker::state_blocked_in_parallel

worker is currently blocked on a parallel section

## state_blocked_in_parallel_observed

unsigned _starpu_worker::state_blocked_in_parallel_observed

the blocked state of the worker has been observed by another worker during a relaxed section

## state_block_in_parallel_req

unsigned _starpu_worker::state_block_in_parallel_req

a request for state transition from unblocked to blocked is pending

## state_block_in_parallel_ack

unsigned _starpu_worker::state_block_in_parallel_ack

a block request has been honored

## state_unblock_in_parallel_req

unsigned _starpu_worker::state_unblock_in_parallel_req

a request for state transition from blocked to unblocked is pending

## state_unblock_in_parallel_ack

unsigned _starpu_worker::state_unblock_in_parallel_ack

an unblock request has been honored

## block_in_parallel_ref_count

unsigned _starpu_worker::block_in_parallel_ref_count

cumulative blocking depth

- =0 worker unblocked
- >0 worker blocked
- transition from 0 to 1 triggers a block_req
- transition from 1 to 0 triggers a unblock_req

## thread_changing_ctx

starpu_pthread_t _starpu_worker::thread_changing_ctx

thread currently changing a sched_ctx containing the worker

## ctx_change_list

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

## local_tasks

struct starpu_task_list _starpu_worker::local_tasks

this queue contains tasks that have been explicitely submitted to that queue

## local_ordered_tasks

struct starpu_task** _starpu_worker::local_ordered_tasks

this queue contains tasks that have been explicitely submitted to that queue with an explicit order

## local_ordered_tasks_size

unsigned _starpu_worker::local_ordered_tasks_size

this records the size of local_ordered_tasks

## current_ordered_task

unsigned _starpu_worker::current_ordered_task

this records the index (within local_ordered_tasks) of the next ordered task to be executed

## current_ordered_task_order

unsigned _starpu_worker::current_ordered_task_order

this records the order of the next ordered task to be executed

## current_task

struct starpu_task* _starpu_worker::current_task

task currently executed by this worker (non-pipelined version)

## current_tasks

struct starpu_task* _starpu_worker::current_tasks[STARPU_MAX_PIPELINE]

tasks currently executed by this worker (pipelined version)

## wait

starpu_pthread_wait_t _starpu_worker::wait

## cl_start

struct timespec _starpu_worker::cl_start

Codelet start time of the task currently running

## cl_expend

struct timespec _starpu_worker::cl_expend

Codelet expected end time of the task currently running

## cl_end

struct timespec _starpu_worker::cl_end

Codelet end time of the last task running

## first_task

unsigned char _starpu_worker::first_task

Index of first task in the pipeline

## ntasks

unsigned char _starpu_worker::ntasks

number of tasks in the pipeline

## pipeline_length

unsigned char _starpu_worker::pipeline_length

number of tasks to be put in the pipeline

## pipeline_stuck

unsigned char _starpu_worker::pipeline_stuck

whether a task prevents us from pipelining

## set

struct _starpu_worker_set* _starpu_worker::set

in case this worker belongs to a set

## worker_is_running

unsigned _starpu_worker::worker_is_running

## worker_is_initialized

unsigned _starpu_worker::worker_is_initialized

## status

enum _starpu_worker_status _starpu_worker::status

what is the worker doing now ? (eg. CALLBACK)

## state_keep_awake

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

## name

char _starpu_worker::name[128]

## short_name

char _starpu_worker::short_name[32]

## run_by_starpu

unsigned _starpu_worker::run_by_starpu

Is this run by StarPU or directly by the application ?

## driver_ops

struct _starpu_driver_ops* _starpu_worker::driver_ops

## sched_ctx_list

struct _starpu_sched_ctx_list* _starpu_worker::sched_ctx_list

## tmp_sched_ctx

int _starpu_worker::tmp_sched_ctx

## nsched_ctxs

unsigned _starpu_worker::nsched_ctxs

the no of contexts a worker belongs to

## tasks_barrier

struct _starpu_barrier_counter _starpu_worker::tasks_barrier

wait for the tasks submitted

## has_prev_init

unsigned _starpu_worker::has_prev_init

had already been inited in another ctx

## removed_from_ctx

unsigned _starpu_worker::removed_from_ctx[STARPU_NMAX_SCHED_CTXS+1]

## spinning_backoff

unsigned _starpu_worker::spinning_backoff

number of cycles to pause when spinning

## nb_buffers_transferred

unsigned _starpu_worker::nb_buffers_transferred

number of piece of data already send to worker

## nb_buffers_totransfer

unsigned _starpu_worker::nb_buffers_totransfer

number of piece of data already send to worker

## task_transferring

struct starpu_task* _starpu_worker::task_transferring

The buffers of this task are being sent

## shares_tasks_lists

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

## poped_in_ctx

unsigned _starpu_worker::poped_in_ctx[STARPU_NMAX_SCHED_CTXS+1]

boolean to chose the next ctx a worker will pop into

## reverse_phase

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

## pop_ctx_priority

unsigned _starpu_worker::pop_ctx_priority

indicate which priority of ctx is currently active: the values are 0 or 1

## is_slave_somewhere

unsigned _starpu_worker::is_slave_somewhere

bool to indicate if the worker is slave in a ctx

## stream_ctx

struct _starpu_sched_ctx* _starpu_worker::stream_ctx

## hwloc_cpu_set

hwloc_bitmap_t _starpu_worker::hwloc_cpu_set

## hwloc_obj

hwloc_obj_t _starpu_worker::hwloc_obj

## padding

char _starpu_worker::padding[STARPU_CACHELINE_SIZE]

Keep this last, to make sure to separate worker data in separate cache lines.

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

- workers.h