Loading...
Searching...
No Matches
starpurm_private.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2017-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
*
* StarPU is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* StarPU is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU Lesser General Public License in COPYING.LGPL for more details.
*/
#ifndef __STARPURM_PRIVATE_H
#define __STARPURM_PRIVATE_H
enum e_state
{
state_uninitialized = 0,
state_init
};
enum e_starpurm_unit_type
{
starpurm_unit_cpu = 0,
starpurm_unit_opencl = 1,
starpurm_unit_cuda = 2,
starpurm_unit_mic = 3,
starpurm_unit_ntypes = 4
};
struct s_starpurm
{
hwloc_topology_t topology;
unsigned max_ncpus;
unsigned selected_ncpus;
unsigned selected_nworkers;
int state;
int dynamic_resource_sharing;
unsigned sched_ctx_id;
int unit_ntypes;
int *nunits_by_type;
int nunits;
int *unit_offsets_by_type;
struct s_starpurm_unit *units;
hwloc_cpuset_t global_cpuset;
hwloc_cpuset_t all_cpu_workers_cpuset;
hwloc_cpuset_t all_opencl_device_workers_cpuset;
hwloc_cpuset_t all_cuda_device_workers_cpuset;
hwloc_cpuset_t all_mic_device_workers_cpuset;
hwloc_cpuset_t all_device_workers_cpuset;
hwloc_cpuset_t selected_cpuset;
hwloc_cpuset_t initially_owned_cpuset_mask;
int max_worker_id;
int *worker_unit_ids;
unsigned int max_temporary_ctxs;
unsigned int avail_temporary_ctxs;
pthread_mutex_t temporary_ctxs_mutex;
pthread_cond_t temporary_ctxs_cond;
int starpu_in_pause;
pthread_t event_thread;
pthread_mutex_t event_list_mutex;
pthread_cond_t event_list_cond;
pthread_cond_t event_processing_cond;
int event_processing_enabled;
int event_processing_ended;
struct s_starpurm_event *event_list_head;
struct s_starpurm_event *event_list_tail;
};
#ifdef STARPURM_HAVE_DLB
void starpurm_dlb_init(struct s_starpurm *rm);
void starpurm_dlb_exit(void);
int starpurm_dlb_notify_starpu_worker_mask_going_to_sleep(const hwloc_cpuset_t hwloc_workers_cpuset);
int starpurm_dlb_notify_starpu_worker_mask_waking_up(const hwloc_cpuset_t hwloc_workers_cpuset);
#ifdef STARPURM_STARPU_HAVE_WORKER_CALLBACKS
void starpurm_enqueue_event_cpu_unit_available(int cpuid);
#endif
#endif
#endif /* __STARPURM_PRIVATE_H */
s_starpurm::all_device_workers_cpuset
hwloc_cpuset_t all_device_workers_cpuset
Definition starpurm_private.h:95
s_starpurm::units
struct s_starpurm_unit * units
Definition starpurm_private.h:77
s_starpurm::max_worker_id
int max_worker_id
Definition starpurm_private.h:104
s_starpurm::all_cuda_device_workers_cpuset
hwloc_cpuset_t all_cuda_device_workers_cpuset
Definition starpurm_private.h:89
s_starpurm::topology
hwloc_topology_t topology
Definition starpurm_private.h:40
s_starpurm::selected_nworkers
unsigned selected_nworkers
Definition starpurm_private.h:49
s_starpurm::global_cpuset
hwloc_cpuset_t global_cpuset
Definition starpurm_private.h:80
s_starpurm::dynamic_resource_sharing
int dynamic_resource_sharing
Definition starpurm_private.h:59
s_starpurm::initially_owned_cpuset_mask
hwloc_cpuset_t initially_owned_cpuset_mask
Definition starpurm_private.h:101
s_starpurm::nunits_by_type
int * nunits_by_type
Definition starpurm_private.h:68
s_starpurm::state
int state
Definition starpurm_private.h:52
s_starpurm::worker_unit_ids
int * worker_unit_ids
Definition starpurm_private.h:107
s_starpurm::unit_ntypes
int unit_ntypes
Definition starpurm_private.h:65
s_starpurm::all_cpu_workers_cpuset
hwloc_cpuset_t all_cpu_workers_cpuset
Definition starpurm_private.h:83
s_starpurm::starpu_in_pause
int starpu_in_pause
Definition starpurm_private.h:116
s_starpurm::selected_cpuset
hwloc_cpuset_t selected_cpuset
Definition starpurm_private.h:98
s_starpurm::max_ncpus
unsigned max_ncpus
Definition starpurm_private.h:43
s_starpurm::nunits
int nunits
Definition starpurm_private.h:71
s_starpurm::event_thread
pthread_t event_thread
Definition starpurm_private.h:119
s_starpurm::all_opencl_device_workers_cpuset
hwloc_cpuset_t all_opencl_device_workers_cpuset
Definition starpurm_private.h:86
s_starpurm::unit_offsets_by_type
int * unit_offsets_by_type
Definition starpurm_private.h:74
s_starpurm::max_temporary_ctxs
unsigned int max_temporary_ctxs
Definition starpurm_private.h:110
s_starpurm::all_mic_device_workers_cpuset
hwloc_cpuset_t all_mic_device_workers_cpuset
Definition starpurm_private.h:92
s_starpurm::sched_ctx_id
unsigned sched_ctx_id
Definition starpurm_private.h:62
s_starpurm::selected_ncpus
unsigned selected_ncpus
Definition starpurm_private.h:46
s_starpurm
Definition starpurm_private.h:38