Loading...
Searching...
No Matches
starpurm_private.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2017-2025 University of 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_ntypes = 3
};
struct s_starpurm
{
hwloc_topology_t topology;
int max_ncpus;
int selected_ncpus;
int 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_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;
starpu_pthread_mutex_t temporary_ctxs_mutex;
starpu_pthread_cond_t temporary_ctxs_cond;
int starpu_in_pause;
pthread_t event_thread;
starpu_pthread_mutex_t event_list_mutex;
starpu_pthread_cond_t event_list_cond;
starpu_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:91
s_starpurm::units
struct s_starpurm_unit * units
Definition starpurm_private.h:76
s_starpurm::max_worker_id
int max_worker_id
Definition starpurm_private.h:100
s_starpurm::all_cuda_device_workers_cpuset
hwloc_cpuset_t all_cuda_device_workers_cpuset
Definition starpurm_private.h:88
s_starpurm::topology
hwloc_topology_t topology
Definition starpurm_private.h:39
s_starpurm::global_cpuset
hwloc_cpuset_t global_cpuset
Definition starpurm_private.h:79
s_starpurm::dynamic_resource_sharing
int dynamic_resource_sharing
Definition starpurm_private.h:58
s_starpurm::initially_owned_cpuset_mask
hwloc_cpuset_t initially_owned_cpuset_mask
Definition starpurm_private.h:97
s_starpurm::nunits_by_type
int * nunits_by_type
Definition starpurm_private.h:67
s_starpurm::state
int state
Definition starpurm_private.h:51
s_starpurm::selected_ncpus
int selected_ncpus
Definition starpurm_private.h:45
s_starpurm::worker_unit_ids
int * worker_unit_ids
Definition starpurm_private.h:103
s_starpurm::unit_ntypes
int unit_ntypes
Definition starpurm_private.h:64
s_starpurm::all_cpu_workers_cpuset
hwloc_cpuset_t all_cpu_workers_cpuset
Definition starpurm_private.h:82
s_starpurm::starpu_in_pause
int starpu_in_pause
Definition starpurm_private.h:112
s_starpurm::selected_nworkers
int selected_nworkers
Definition starpurm_private.h:48
s_starpurm::max_ncpus
int max_ncpus
Definition starpurm_private.h:42
s_starpurm::selected_cpuset
hwloc_cpuset_t selected_cpuset
Definition starpurm_private.h:94
s_starpurm::nunits
int nunits
Definition starpurm_private.h:70
s_starpurm::event_thread
pthread_t event_thread
Definition starpurm_private.h:115
s_starpurm::all_opencl_device_workers_cpuset
hwloc_cpuset_t all_opencl_device_workers_cpuset
Definition starpurm_private.h:85
s_starpurm::unit_offsets_by_type
int * unit_offsets_by_type
Definition starpurm_private.h:73
s_starpurm::max_temporary_ctxs
unsigned int max_temporary_ctxs
Definition starpurm_private.h:106
s_starpurm::sched_ctx_id
unsigned sched_ctx_id
Definition starpurm_private.h:61
s_starpurm
Definition starpurm_private.h:37