Loading...
Searching...
No Matches
starpu.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2009-2023 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
* Copyright (C) 2021 Federal University of Rio Grande do Sul (UFRGS)
*
* 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 __STARPU_H__
#define __STARPU_H__
#include <stdlib.h>
#ifndef _MSC_VER
#include <stdint.h>
#else
#include <windows.h>
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
typedef UINT_PTR uintptr_t;
typedef char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef INT_PTR intptr_t;
#endif
#include <starpu_config.h>
#ifdef STARPU_HAVE_WINDOWS
#include <windows.h>
#endif
#if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
#include <starpu_opencl.h>
#endif
#include <starpu_thread.h>
#include <starpu_thread_util.h>
#include <starpu_util.h>
#include <starpu_data.h>
#include <starpu_helper.h>
#include <starpu_disk.h>
#include <starpu_data_interfaces.h>
#include <starpu_data_filters.h>
#include <starpu_stdlib.h>
#include <starpu_task_bundle.h>
#include <starpu_task_dep.h>
#include <starpu_task.h>
#include <starpu_worker.h>
#include <starpu_perfmodel.h>
#include <starpu_worker.h>
#ifndef BUILDING_STARPU
#include <starpu_task_list.h>
#endif
#include <starpu_task_util.h>
#include <starpu_scheduler.h>
#include <starpu_sched_ctx.h>
#include <starpu_expert.h>
#include <starpu_rand.h>
#include <starpu_cuda.h>
#include <starpu_hip.h>
#include <starpu_hipblas.h>
#include <starpu_cublas.h>
#include <starpu_cusparse.h>
#include <starpu_bound.h>
#include <starpu_hash.h>
#include <starpu_profiling.h>
#include <starpu_profiling_tool.h>
#include <starpu_fxt.h>
#include <starpu_driver.h>
#include <starpu_tree.h>
#include <starpu_openmp.h>
#include <starpu_simgrid_wrap.h>
#include <starpu_bitmap.h>
#include <starpu_parallel_worker.h>
#include <starpu_perf_monitoring.h>
#include <starpu_perf_steering.h>
#include <starpu_max_fpga.h>
#ifdef __cplusplus
extern "C" {
#endif
struct starpu_conf
{
int magic;
int will_use_mpi;
const char *sched_policy_name;
struct starpu_sched_policy *sched_policy;
void (*sched_policy_callback)(unsigned);
int precedence_over_environment_variables;
int ncpus;
int reserve_ncpus;
int ncuda;
int nhip;
int nopencl;
int nmax_fpga;
int nmpi_ms;
int ntcpip_ms;
unsigned use_explicit_workers_bindid;
unsigned workers_bindid[STARPU_NMAXWORKERS];
unsigned use_explicit_workers_cuda_gpuid;
unsigned workers_cuda_gpuid[STARPU_NMAXWORKERS];
unsigned use_explicit_workers_hip_gpuid;
unsigned workers_hip_gpuid[STARPU_NMAXWORKERS];
unsigned use_explicit_workers_opencl_gpuid;
unsigned workers_opencl_gpuid[STARPU_NMAXWORKERS];
unsigned use_explicit_workers_max_fpga_deviceid;
unsigned workers_max_fpga_deviceid[STARPU_NMAXWORKERS];
#ifdef STARPU_USE_MAX_FPGA
struct starpu_max_load *max_fpga_load;
#else
void *max_fpga_load;
#endif
unsigned use_explicit_workers_mpi_ms_deviceid;
unsigned workers_mpi_ms_deviceid[STARPU_NMAXWORKERS];
int bus_calibrate;
int calibrate;
int data_locality_enforce;
int single_combined_worker;
int disable_asynchronous_copy;
int disable_asynchronous_cuda_copy;
int disable_asynchronous_hip_copy;
int disable_asynchronous_opencl_copy;
int disable_asynchronous_mpi_ms_copy;
int disable_asynchronous_tcpip_ms_copy;
int disable_asynchronous_max_fpga_copy;
int enable_map;
unsigned *cuda_opengl_interoperability;
unsigned n_cuda_opengl_interoperability;
struct starpu_driver *not_launched_drivers;
unsigned n_not_launched_drivers;
uint64_t trace_buffer_size;
int global_sched_ctx_min_priority;
int global_sched_ctx_max_priority;
#ifdef STARPU_WORKER_CALLBACKS
void (*callback_worker_going_to_sleep)(unsigned workerid);
void (*callback_worker_waking_up)(unsigned workerid);
#endif
int catch_signals;
unsigned start_perf_counter_collection;
unsigned driver_spinning_backoff_min;
unsigned driver_spinning_backoff_max;
int cuda_only_fast_alloc_other_memnodes;
};
int starpu_conf_init(struct starpu_conf *conf);
int starpu_conf_noworker(struct starpu_conf *conf);
int starpu_init(struct starpu_conf *conf) STARPU_WARN_UNUSED_RESULT;
int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv);
int starpu_is_initialized(void);
void starpu_wait_initialized(void);
void starpu_shutdown(void);
void starpu_pause(void);
void starpu_resume(void);
int starpu_is_paused(void);
#define STARPU_THREAD_ACTIVE (1 << 0)
unsigned starpu_get_next_bindid(unsigned flags, unsigned *preferred, unsigned npreferred);
int starpu_bind_thread_on(int cpuid, unsigned flags, const char *name);
void starpu_bind_thread_on_worker(unsigned workerid);
void starpu_bind_thread_on_main(void);
void starpu_bind_thread_on_cpu(int cpuid);
int starpu_cpu_os_index(int cpuid);
void starpu_topology_print(FILE *f);
int starpu_asynchronous_copy_disabled(void);
int starpu_asynchronous_cuda_copy_disabled(void);
int starpu_asynchronous_hip_copy_disabled(void);
int starpu_asynchronous_opencl_copy_disabled(void);
int starpu_asynchronous_max_fpga_copy_disabled(void);
int starpu_asynchronous_mpi_ms_copy_disabled(void);
int starpu_asynchronous_tcpip_ms_copy_disabled(void);
int starpu_asynchronous_copy_disabled_for(enum starpu_node_kind kind);
int starpu_map_enabled(void);
void starpu_display_stats(void);
void starpu_get_version(int *major, int *minor, int *release);
#ifdef __cplusplus
}
#endif
#include "starpu_deprecated_api.h"
#endif /* __STARPU_H__ */
starpu_conf::magic
int magic
Definition starpu.h:116
starpu_conf::driver_spinning_backoff_max
unsigned driver_spinning_backoff_max
Definition starpu.h:584
starpu_conf::sched_policy_callback
void(* sched_policy_callback)(unsigned)
Definition starpu.h:143
starpu_conf::disable_asynchronous_tcpip_ms_copy
int disable_asynchronous_tcpip_ms_copy
Definition starpu.h:476
starpu_conf::single_combined_worker
int single_combined_worker
Definition starpu.h:391
starpu_conf::workers_bindid
unsigned workers_bindid[STARPU_NMAXWORKERS]
Definition starpu.h:237
starpu_conf::use_explicit_workers_cuda_gpuid
unsigned use_explicit_workers_cuda_gpuid
Definition starpu.h:248
starpu_conf::disable_asynchronous_cuda_copy
int disable_asynchronous_cuda_copy
Definition starpu.h:420
starpu_conf::disable_asynchronous_copy
int disable_asynchronous_copy
Definition starpu.h:407
starpu_conf::trace_buffer_size
uint64_t trace_buffer_size
Definition starpu.h:535
starpu_conf::start_perf_counter_collection
unsigned start_perf_counter_collection
Definition starpu.h:574
starpu_conf::use_explicit_workers_opencl_gpuid
unsigned use_explicit_workers_opencl_gpuid
Definition starpu.h:284
starpu_conf::use_explicit_workers_mpi_ms_deviceid
unsigned use_explicit_workers_mpi_ms_deviceid
Definition starpu.h:335
starpu_conf::max_fpga_load
struct starpu_max_load * max_fpga_load
Definition starpu.h:322
starpu_conf::n_cuda_opengl_interoperability
unsigned n_cuda_opengl_interoperability
Definition starpu.h:511
starpu_conf::workers_max_fpga_deviceid
unsigned workers_max_fpga_deviceid[STARPU_NMAXWORKERS]
Definition starpu.h:309
starpu_conf::workers_hip_gpuid
unsigned workers_hip_gpuid[STARPU_NMAXWORKERS]
Definition starpu.h:273
starpu_conf::sched_policy_name
const char * sched_policy_name
Definition starpu.h:129
starpu_conf::driver_spinning_backoff_min
unsigned driver_spinning_backoff_min
Definition starpu.h:579
starpu_conf::disable_asynchronous_mpi_ms_copy
int disable_asynchronous_mpi_ms_copy
Definition starpu.h:463
starpu_conf::disable_asynchronous_hip_copy
int disable_asynchronous_hip_copy
Definition starpu.h:433
starpu_conf::will_use_mpi
int will_use_mpi
Definition starpu.h:122
starpu_conf::global_sched_ctx_min_priority
int global_sched_ctx_min_priority
Definition starpu.h:543
starpu_conf::nmax_fpga
int nmax_fpga
Definition starpu.h:200
starpu_conf::workers_opencl_gpuid
unsigned workers_opencl_gpuid[STARPU_NMAXWORKERS]
Definition starpu.h:291
starpu_conf::ncpus
int ncpus
Definition starpu.h:161
starpu_conf::precedence_over_environment_variables
int precedence_over_environment_variables
Definition starpu.h:154
starpu_conf::bus_calibrate
int bus_calibrate
Definition starpu.h:352
starpu_conf::use_explicit_workers_max_fpga_deviceid
unsigned use_explicit_workers_max_fpga_deviceid
Definition starpu.h:302
starpu_conf::cuda_only_fast_alloc_other_memnodes
int cuda_only_fast_alloc_other_memnodes
Definition starpu.h:596
starpu_conf::reserve_ncpus
int reserve_ncpus
Definition starpu.h:168
starpu_conf::enable_map
int enable_map
Definition starpu.h:496
starpu_conf::nopencl
int nopencl
Definition starpu.h:192
starpu_conf::calibrate
int calibrate
Definition starpu.h:364
starpu_conf::data_locality_enforce
int data_locality_enforce
Definition starpu.h:376
starpu_conf::workers_mpi_ms_deviceid
unsigned workers_mpi_ms_deviceid[STARPU_NMAXWORKERS]
Definition starpu.h:343
starpu_conf::sched_policy
struct starpu_sched_policy * sched_policy
Definition starpu.h:136
starpu_conf::ntcpip_ms
int ntcpip_ms
Definition starpu.h:216
starpu_conf::disable_asynchronous_max_fpga_copy
int disable_asynchronous_max_fpga_copy
Definition starpu.h:489
starpu_conf::nhip
int nhip
Definition starpu.h:184
starpu_conf::cuda_opengl_interoperability
unsigned * cuda_opengl_interoperability
Definition starpu.h:506
starpu_conf::catch_signals
int catch_signals
Definition starpu.h:568
starpu_conf::n_not_launched_drivers
unsigned n_not_launched_drivers
Definition starpu.h:526
starpu_conf::global_sched_ctx_max_priority
int global_sched_ctx_max_priority
Definition starpu.h:551
starpu_conf::nmpi_ms
int nmpi_ms
Definition starpu.h:208
starpu_conf::use_explicit_workers_hip_gpuid
unsigned use_explicit_workers_hip_gpuid
Definition starpu.h:266
starpu_conf::workers_cuda_gpuid
unsigned workers_cuda_gpuid[STARPU_NMAXWORKERS]
Definition starpu.h:255
starpu_conf::ncuda
int ncuda
Definition starpu.h:176
starpu_conf::disable_asynchronous_opencl_copy
int disable_asynchronous_opencl_copy
Definition starpu.h:450
starpu_conf::not_launched_drivers
struct starpu_driver * not_launched_drivers
Definition starpu.h:518
starpu_conf::use_explicit_workers_bindid
unsigned use_explicit_workers_bindid
Definition starpu.h:226
starpu_asynchronous_copy_disabled_for
int starpu_asynchronous_copy_disabled_for(enum starpu_node_kind kind)
starpu_topology_print
void starpu_topology_print(FILE *f)
starpu_bind_thread_on_cpu
void starpu_bind_thread_on_cpu(int cpuid)
starpu_asynchronous_copy_disabled
int starpu_asynchronous_copy_disabled(void)
starpu_map_enabled
int starpu_map_enabled(void)
starpu_shutdown
void starpu_shutdown(void)
starpu_init
int starpu_init(struct starpu_conf *conf)
starpu_asynchronous_max_fpga_copy_disabled
int starpu_asynchronous_max_fpga_copy_disabled(void)
starpu_is_initialized
int starpu_is_initialized(void)
starpu_get_next_bindid
unsigned starpu_get_next_bindid(unsigned flags, unsigned *preferred, unsigned npreferred)
starpu_conf_init
int starpu_conf_init(struct starpu_conf *conf)
starpu_asynchronous_hip_copy_disabled
int starpu_asynchronous_hip_copy_disabled(void)
starpu_pause
void starpu_pause(void)
starpu_asynchronous_opencl_copy_disabled
int starpu_asynchronous_opencl_copy_disabled(void)
starpu_bind_thread_on_main
void starpu_bind_thread_on_main(void)
starpu_bind_thread_on_worker
void starpu_bind_thread_on_worker(unsigned workerid)
starpu_asynchronous_cuda_copy_disabled
int starpu_asynchronous_cuda_copy_disabled(void)
starpu_asynchronous_tcpip_ms_copy_disabled
int starpu_asynchronous_tcpip_ms_copy_disabled(void)
starpu_initialize
int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv)
starpu_is_paused
int starpu_is_paused(void)
starpu_cpu_os_index
int starpu_cpu_os_index(int cpuid)
starpu_resume
void starpu_resume(void)
starpu_conf_noworker
int starpu_conf_noworker(struct starpu_conf *conf)
starpu_asynchronous_mpi_ms_copy_disabled
int starpu_asynchronous_mpi_ms_copy_disabled(void)
starpu_wait_initialized
void starpu_wait_initialized(void)
starpu_display_stats
void starpu_display_stats(void)
starpu_bind_thread_on
int starpu_bind_thread_on(int cpuid, unsigned flags, const char *name)
starpu_conf
Definition starpu.h:110
starpu_max_load
Definition starpu_max_fpga.h:38
starpu_driver
Definition starpu_driver.h:49
starpu_sched_policy
Definition starpu_scheduler.h:82
starpu_get_version
void starpu_get_version(int *major, int *minor, int *release)
starpu_node_kind
starpu_node_kind
Definition starpu_worker.h:44
STARPU_NMAXWORKERS
#define STARPU_NMAXWORKERS
Definition starpu_config.h:296
starpu_bitmap.h
starpu_bound.h
starpu_config.h
starpu_cublas.h
starpu_cuda.h
starpu_cusparse.h
starpu_data.h
starpu_data_filters.h
starpu_data_interfaces.h
starpu_deprecated_api.h
starpu_disk.h
starpu_driver.h
starpu_expert.h
starpu_fxt.h
starpu_hash.h
starpu_helper.h
starpu_hip.h
starpu_max_fpga.h
starpu_opencl.h
starpu_openmp.h
starpu_parallel_worker.h
starpu_perf_monitoring.h
starpu_perf_steering.h
starpu_perfmodel.h
starpu_profiling.h
starpu_profiling_tool.h
starpu_rand.h
starpu_sched_ctx.h
starpu_scheduler.h
starpu_simgrid_wrap.h
starpu_stdlib.h
starpu_task.h
starpu_task_bundle.h
starpu_task_dep.h
starpu_task_list.h
starpu_task_util.h
starpu_thread.h
starpu_thread_util.h
starpu_tree.h
starpu_util.h
starpu_worker.h