StarPU Handbook - StarPU Introduction
Loading...
Searching...
No Matches
starpu_profiling_tool.h
Go to the documentation of this file.
1/* StarPU --- Runtime system for heterogeneous multicore architectures.
2 *
3 * Copyright (C) 2022-2023 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
4 * Copyright (C) 2022-2022 Camille Coti
5 *
6 * StarPU is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or (at
9 * your option) any later version.
10 *
11 * StarPU is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 *
15 * See the GNU Lesser General Public License in COPYING.LGPL for more details.
16 */
17
18#ifndef __STARPU_PROFILING_TOOL_H__
19#define __STARPU_PROFILING_TOOL_H__
20
21#include <starpu.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
36{
37 starpu_prof_tool_event_none = 0,
38 starpu_prof_tool_event_init,
39 starpu_prof_tool_event_terminate,
40 starpu_prof_tool_event_init_begin,
41 starpu_prof_tool_event_init_end,
42
43 starpu_prof_tool_event_driver_init,
44 starpu_prof_tool_event_driver_deinit,
45 starpu_prof_tool_event_driver_init_start,
46 starpu_prof_tool_event_driver_init_end,
47 starpu_prof_tool_event_start_cpu_exec,
48 starpu_prof_tool_event_end_cpu_exec,
49 starpu_prof_tool_event_start_gpu_exec,
50 starpu_prof_tool_event_end_gpu_exec,
51 starpu_prof_tool_event_start_transfer,
52 starpu_prof_tool_event_end_transfer,
53
54 starpu_prof_tool_event_user_start,
55 starpu_prof_tool_event_user_end
56};
57
62{
63 starpu_prof_tool_driver_cpu,
64 starpu_prof_tool_driver_gpu,
65 starpu_prof_tool_driver_hip,
66 starpu_prof_tool_driver_ocl
67};
68
73{
74 starpu_prof_tool_command_reg = 0,
75 starpu_prof_tool_command_toggle = 1,
76 starpu_prof_tool_command_toggle_per_thread = 2
77};
78
83{
84 struct starpu_conf *conf;
85 enum starpu_prof_tool_event event_type;
86 unsigned int starpu_version[3];
87 int thread_id;
88 int worker_id;
89
90 int device_number;
91 enum starpu_prof_tool_driver_type driver_type; // not sure
92
93 unsigned memnode;
94 unsigned bytes_to_transfer;
95 unsigned bytes_transfered;
96
97 void* fun_ptr; /* NULL when not relevant (driver init etc) */
98
99 /* int valid_bytes;
100 int version;
101 starpu_device_t device_type;
102 int device_number;
103 starpu_ssize_t async;
104 starpu_ssize_t async_queue;
105 const char* src_file;
106 const char* func_name;
107 int line_no, end_line_no;
108 int func_line_no, func_end_line_no;*/
109};
110
115{
116 enum starpu_prof_tool_event event_type;
117 /* starpu_data_event_info data_event;
118 starpu_launch_event_info launch_event;
119 starpu_other_event_info other_event;*/
120};
121
126{
127 /*acc_device_api device_api;
128 int valid_bytes;
129 acc_device_t device_type;
130 int vendor;
131 const void* device_handle;
132 const void* context_handle;
133 const void* async_handle;*/
134};
135
136typedef void (*starpu_prof_tool_cb_func)(struct starpu_prof_tool_info*, union starpu_prof_tool_event_info*, struct starpu_prof_tool_api_info*);
137
141typedef void (*starpu_prof_tool_entry_register_func)(enum starpu_prof_tool_event event_type, starpu_prof_tool_cb_func cb, enum starpu_prof_tool_command info);
142
147
150#ifdef __cplusplus
151}
152#endif
153
154#endif /* __STARPU_PROFILING_TOOL_H__ */
Definition starpu.h:110
void(* starpu_prof_tool_entry_register_func)(enum starpu_prof_tool_event event_type, starpu_prof_tool_cb_func cb, enum starpu_prof_tool_command info)
Definition starpu_profiling_tool.h:141
starpu_prof_tool_event
Definition starpu_profiling_tool.h:36
void(* starpu_prof_tool_entry_func)(starpu_prof_tool_entry_register_func reg, starpu_prof_tool_entry_register_func unreg)
Definition starpu_profiling_tool.h:146
starpu_prof_tool_driver_type
Definition starpu_profiling_tool.h:62
starpu_prof_tool_command
Definition starpu_profiling_tool.h:73
Definition starpu_profiling_tool.h:126
Definition starpu_profiling_tool.h:83
Definition starpu_profiling_tool.h:115