Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
HeteroFlow
THAPI
Commits
e95527fd
Commit
e95527fd
authored
Oct 23, 2020
by
Brice Videau
Browse files
Updated extract enqueues to support linked programs.
parent
da846796
Pipeline
#11699
canceled with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
opencl/extract_enqueues.in
View file @
e95527fd
...
...
@@ -40,9 +40,15 @@ def get_enqueues(it)
program
=
{}
program
[
:context
]
=
v
[
"context"
]
program
[
:type
]
=
:il
when
"lttng_ust_opencl:clLinkProgram_
#{
START
}
"
#context: 0x210c880, num_devices: 1, device_list: 0x21bd830, options: 0x7ffe538fc169, num_input_programs: 1, input_programs: 0x21bdb90, pfn_notify: 0x0, user_data: 0x0, errcode_ret: 0x7ffe538fc084, device_list_vals: [0x21b9d30], options_val: -cl-match-sincospi , input_programs_vals: [0x1f03ae0]
program
=
{}
program
[
:context
]
=
v
[
"context"
]
program
[
:type
]
=
:link
program
[
:programs
]
=
v
[
"input_programs_vals"
]
when
"lttng_ust_opencl_source:program_string"
,
"lttng_ust_opencl_source:program_il"
program
[
:source
]
=
v
[
"path"
]
when
"lttng_ust_opencl:clCreateProgramWithIL_
#{
STOP
}
"
,
"lttng_ust_opencl:clCreateProgramWithSource_
#{
STOP
}
"
when
"lttng_ust_opencl:clCreateProgramWithIL_
#{
STOP
}
"
,
"lttng_ust_opencl:clCreateProgramWithSource_
#{
STOP
}
"
,
"lttng_ust_opencl:clLinkProgram_
#{
STOP
}
"
if
v
[
"errcode_ret_val"
]
==
0
programs
[
v
[
"program"
]]
=
program
end
...
...
@@ -98,7 +104,13 @@ def dump_enqueues(enqueues)
enqueues
.
each
{
|
enqueue_counter
,
enqueue
|
kerdir
=
File
.
join
(
"enqueue_data"
,
"
#{
enqueue
[
:kernel
][
:name
]
}
"
)
FileUtils
.
mkdir
(
kerdir
)
unless
Dir
.
exist?
(
kerdir
)
if
enqueue
[
:kernel
][
:program
][
:type
]
==
:link
enqueue
[
:kernel
][
:program
][
:programs
].
each
{
|
prog
|
FileUtils
.
cp
(
programs
[
prog
][
:source
],
File
.
join
(
kerdir
,
"source"
))
}
else
FileUtils
.
cp
(
enqueue
[
:kernel
][
:program
][
:source
],
File
.
join
(
kerdir
,
"source"
))
end
dirname
=
File
.
join
(
kerdir
,
"
#{
enqueue_counter
}
"
)
FileUtils
.
mkdir
(
dirname
)
unless
Dir
.
exist?
(
dirname
)
enqueue
[
:args
].
each
{
|
arg_index
,
arg
|
...
...
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