Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
THAPI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HeteroFlow
THAPI
Commits
f7f20104
Commit
f7f20104
authored
Jan 12, 2021
by
Brice Videau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new event to dump device timer when available.
parent
3b9d82f0
Pipeline
#12269
failed with stage
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
4 deletions
+40
-4
opencl/opencl_events.yaml
opencl/opencl_events.yaml
+9
-0
opencl/opencl_model.rb
opencl/opencl_model.rb
+16
-2
opencl/tracer_opencl_helpers.include.c
opencl/tracer_opencl_helpers.include.c
+14
-1
utils/xprof.sh.erb.in
utils/xprof.sh.erb.in
+1
-1
No files found.
opencl/opencl_events.yaml
View file @
f7f20104
...
...
@@ -243,3 +243,12 @@ lttng_ust_opencl_devices:
fields
:
-
[
ctf_integer_hex
,
uintptr_t
,
device
,
"
(uintptr_t)device"
]
-
[
ctf_string
,
name
,
name
]
-
name
:
device_timer
args
:
-
[
cl_device_id
,
device
]
-
[
cl_ulong
,
device_timestamp
]
-
[
cl_ulong
,
host_timestamp
]
fields
:
-
[
ctf_integer_hex
,
uintptr_t
,
device
,
"
(uintptr_t)device"
]
-
[
ctf_integer
,
cl_ulong
,
device_timestamp
,
device_timestamp
]
-
[
ctf_integer
,
cl_ulong
,
host_timestamp
,
host_timestamp
]
opencl/opencl_model.rb
View file @
f7f20104
...
...
@@ -1150,8 +1150,14 @@ EOF
register_prologue
"clGetDeviceIDs"
,
<<
EOF
cl_uint n_e;
if (tracepoint_enabled(lttng_ust_opencl_devices, device_name) && !num_devices && devices) {
num_devices = &n_e;
}
num_devices = &n_e;
}
EOF
register_prologue
"clGetDeviceIDs"
,
<<
EOF
if (tracepoint_enabled(lttng_ust_opencl_devices, device_timer) && !num_devices && devices) {
num_devices = &n_e;
}
EOF
register_epilogue
"clGetDeviceIDs"
,
<<
EOF
...
...
@@ -1162,6 +1168,14 @@ register_epilogue "clGetDeviceIDs", <<EOF
}
EOF
register_epilogue
"clGetDeviceIDs"
,
<<
EOF
if (tracepoint_enabled(lttng_ust_opencl_devices, device_timer) && _retval == CL_SUCCESS && devices) {
for (cl_uint i = 0; i < *num_devices; i++) {
dump_device_timer(devices[i]);
}
}
EOF
str
=
$opencl_commands
.
select
{
|
c
|
c
.
extension?
}.
collect
{
|
c
|
<<
EOF
if (strcmp(func_name, "
#{
c
.
prototype
.
name
}
") == 0) {
...
...
opencl/tracer_opencl_helpers.include.c
View file @
f7f20104
...
...
@@ -23,7 +23,7 @@ struct opencl_version {
//static const struct opencl_version opencl_version_1_1 = {1, 1};
static
const
struct
opencl_version
opencl_version_1_2
=
{
1
,
2
};
//static const struct opencl_version opencl_version_2_0 = {2, 0};
//
static const struct opencl_version opencl_version_2_1 = {2, 1};
static
const
struct
opencl_version
opencl_version_2_1
=
{
2
,
1
};
//static const struct opencl_version opencl_version_2_2 = {2, 2};
static
inline
int
compare_opencl_version
(
const
struct
opencl_version
*
v1
,
const
struct
opencl_version
*
v2
)
{
...
...
@@ -759,6 +759,19 @@ cleanup:
free
(
name
);
}
static
inline
void
dump_device_timer
(
cl_device_id
device
)
{
struct
opencl_version
version
=
{
1
,
0
};
get_device_platform_version
(
device
,
&
version
);
if
(
compare_opencl_version
(
&
version
,
&
opencl_version_2_1
)
>=
0
)
{
cl_ulong
device_timestamp
;
cl_ulong
host_timestamp
;
if
(
CL_GET_DEVICE_AND_HOST_TIMER_PTR
(
device
,
&
device_timestamp
,
&
host_timestamp
)
!=
CL_SUCCESS
)
return
;
do_tracepoint
(
lttng_ust_opencl_devices
,
device_timer
,
device
,
device_timestamp
,
host_timestamp
);
}
}
static
inline
void
dump_program_device_build_infos
(
cl_program
program
,
cl_device_id
device
)
{
cl_build_status
build_status
;
char
*
build_options
=
""
;
...
...
utils/xprof.sh.erb.in
View file @
f7f20104
...
...
@@ -73,7 +73,7 @@ trace_and_summary() {
lttng
$quiet
enable-event
--channel
=
blocking-channel
--userspace
lttng_ust_opencl_build:infos
*
lttng
$quiet
enable-event
--channel
=
blocking-channel
--userspace
lttng_ust_opencl_profiling:
*
lttng
$quiet
enable-event
--channel
=
blocking-channel
--userspace
lttng_ust_opencl_arguments:kernel_info
lttng
$quiet
enable-event
--channel
=
blocking-channel
--userspace
lttng_ust_opencl_devices:
device_name
lttng
$quiet
enable-event
--channel
=
blocking-channel
--userspace
lttng_ust_opencl_devices:
*
<% end %>
<%
if
languages.include?
(
"ze"
)
%>
lttng
$quiet
enable-event
--channel
=
blocking-channel
--userspace
lttng_ust_ze:
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment