Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpvm-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
hpvm-release
Commits
fe7c3614
Commit
fe7c3614
authored
9 years ago
by
Maria Kotsifakou
Browse files
Options
Downloads
Patches
Plain Diff
Edited script for plotting
parent
a61d9f78
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/test/VISC/parboil/parboilParser.py
+78
-64
78 additions, 64 deletions
llvm/test/VISC/parboil/parboilParser.py
with
78 additions
and
64 deletions
llvm/test/VISC/parboil/parboilParser.py
+
78
−
64
View file @
fe7c3614
...
...
@@ -219,11 +219,14 @@ def printTimerDecomposition(csvDict, isVisc):
line
=
line
+
csvDict
[
app
][
v
][
test
][
t
][
cat
]
+
"
,
"
print
line
def
plotTimerDecomposition
(
csvDict
,
isVisc
):
def
plotTimerDecomposition
(
csvDict
,
plotapp
):
global
num_figs
# get apps
apps
=
csvDict
.
keys
()
if
not
plotapp
:
apps
=
csvDict
.
keys
()
else
:
apps
=
[
plotapp
]
# get tests for each app
tests
=
dict
()
...
...
@@ -231,79 +234,89 @@ def plotTimerDecomposition(csvDict, isVisc):
tests
[
app
]
=
getTests
(
app
,
csvDict
)
# list of timer-category pairs
if
isVisc
:
timers
=
[(
'
Final
'
,
'
Kernel
'
),
(
'
Final
'
,
'
Load Program Binary
'
),
(
'
Final
'
,
'
Argument Unpack
'
),
(
'
Final
'
,
'
Marshal Arguments
'
),
(
'
Final
'
,
'
Free Memory
'
),
(
'
Final
'
,
'
Memory Track
'
),
(
'
Final
'
,
'
Clear Context
'
),
(
'
Final
'
,
'
Total GPU Computation
'
),
(
'
Final
'
,
'
Copy Pointer Arguments
'
),
(
'
Final
'
,
'
Initialize Context
'
),
(
'
Final
'
,
'
Read Output
'
),
(
'
Final
'
,
'
Pthread Create
'
),
(
'
Final
'
,
'
Copy Scalar Arguments
'
),
(
'
Final
'
,
'
WorkGroup Size Calculation
'
),
(
'
Final
'
,
'
IO
'
),
(
'
Final
'
,
'
Output Pack
'
),
(
'
Parboil
'
,
'
Mem_Untrack
'
),
(
'
Parboil
'
,
'
Clear_Ctx
'
),
(
'
GenVISC_Timer
'
,
'
Timer Wall Time
'
)]
else
:
timers
=
[(
'
Final
'
,
'
Init_Ctx
'
),
(
'
Final
'
,
'
Arg_Unpack
'
),
(
'
Final
'
,
'
Copy_Scalar
'
),
(
'
Final
'
,
'
Mem_Track
'
),
(
'
Final
'
,
'
Driver
'
),
(
'
Final
'
,
'
Output_Unpack
'
),
(
'
Final
'
,
'
Arg_Pack
'
),
(
'
Final
'
,
'
Copy
'
),
(
'
Final
'
,
'
Compute
'
),
(
'
Final
'
,
'
Setup
'
),
(
'
Final
'
,
'
Read_Output
'
),
(
'
Final
'
,
'
IO
'
),
(
'
Final
'
,
'
Pthread_Create
'
),
(
'
Final
'
,
'
Kernel
'
),
(
'
Final
'
,
'
Mem_Free
'
),
(
'
Final
'
,
'
Copy Async
'
),
(
'
Final
'
,
'
Copy_Ptr
'
),
(
'
Final
'
,
'
Output_Pack
'
),
(
'
Final
'
,
'
Mem_Untrack
'
),
(
'
Final
'
,
'
Clear_Ctx
'
),
(
'
Final
'
,
'
Timer Wall Time
'
)]
# num_experiments = 0;
# for app in apps:
# for test in tests[app]:
# num_experiments += 1
visc_timers
=
[(
'
Final
'
,
'
Kernel
'
),
(
'
Final
'
,
'
Load Program Binary
'
),
(
'
Final
'
,
'
Argument Unpack
'
),
(
'
Final
'
,
'
Marshal Arguments
'
),
(
'
Final
'
,
'
Free Memory
'
),
(
'
Final
'
,
'
Memory Track
'
),
(
'
Final
'
,
'
Clear Context
'
),
(
'
Final
'
,
'
Total GPU Computation
'
),
(
'
Final
'
,
'
Copy Pointer Arguments
'
),
(
'
Final
'
,
'
Initialize Context
'
),
(
'
Final
'
,
'
Read Output
'
),
(
'
Final
'
,
'
Pthread Create
'
),
(
'
Final
'
,
'
Copy Scalar Arguments
'
),
(
'
Final
'
,
'
WorkGroup Size Calculation
'
),
(
'
Final
'
,
'
IO
'
),
(
'
Final
'
,
'
Output Pack
'
),
(
'
Parboil
'
,
'
Mem_Untrack
'
),
(
'
Parboil
'
,
'
Clear_Ctx
'
),
(
'
GenVISC_Timer
'
,
'
Timer Wall Time
'
)]
opencl_timers
=
[(
'
Final
'
,
'
Init_Ctx
'
),
(
'
Final
'
,
'
Arg_Unpack
'
),
(
'
Final
'
,
'
Copy_Scalar
'
),
(
'
Final
'
,
'
Mem_Track
'
),
(
'
Final
'
,
'
Driver
'
),
(
'
Final
'
,
'
Output_Unpack
'
),
(
'
Final
'
,
'
Arg_Pack
'
),
(
'
Final
'
,
'
Copy
'
),
(
'
Final
'
,
'
Compute
'
),
(
'
Final
'
,
'
Setup
'
),
(
'
Final
'
,
'
Read_Output
'
),
(
'
Final
'
,
'
IO
'
),
(
'
Final
'
,
'
Pthread_Create
'
),
(
'
Final
'
,
'
Kernel
'
),
(
'
Final
'
,
'
Mem_Free
'
),
(
'
Final
'
,
'
Copy Async
'
),
(
'
Final
'
,
'
Copy_Ptr
'
),
(
'
Final
'
,
'
Output_Pack
'
),
(
'
Final
'
,
'
Mem_Untrack
'
),
(
'
Final
'
,
'
Clear_Ctx
'
),
(
'
Final
'
,
'
Timer Wall Time
'
)]
# exp_count = 0
for
app
in
apps
:
v
=
'
visc
'
if
isVisc
else
getOpenCLVersionName
(
app
)
for
test
in
tests
[
app
]:
# exp_count += 1
# Plotting visc timers
v
=
'
visc
'
n_vals
=
0
;
axis_values
=
[]
time_decomp
=
[]
for
(
t
,
cat
)
in
timers
:
visc_
time_decomp
=
[]
for
(
t
,
cat
)
in
visc_
timers
:
n_vals
+=
1
axis_values
.
append
(
cat
);
time_decomp
.
append
(
float
(
csvDict
[
app
][
v
][
test
][
t
][
cat
]))
visc_
time_decomp
.
append
(
float
(
csvDict
[
app
][
v
][
test
][
t
][
cat
]))
opacity
=
0.4
num_figs
+=
1
fig
,
ax
=
plt
.
subplots
(
num
=
num_figs
)
fig
=
plt
.
figure
(
num
=
num_figs
)
ax
=
fig
.
add_subplot
(
211
);
index
=
np
.
arange
(
n_vals
)
plt
.
barh
(
index
,
time_decomp
,
alpha
=
opacity
,
color
=
'
b
'
,
label
=
v
)
plt
.
barh
(
index
,
visc_
time_decomp
,
alpha
=
opacity
,
color
=
'
b
'
,
label
=
v
)
plt
.
xlabel
(
'
Time (s)
'
)
plt
.
ylabel
(
'
Timers
'
)
plt
.
title
(
'
Time Decomposition -
'
+
app
+
'
'
+
test
+
'
'
+
v
)
plt
.
yticks
(
index
,
axis_values
)
plt
.
tight_layout
()
v
=
getOpenCLVersionName
(
app
)
n_vals
=
0
;
axis_values
=
[]
opencl_time_decomp
=
[]
for
(
t
,
cat
)
in
opencl_timers
:
n_vals
+=
1
axis_values
.
append
(
cat
);
opencl_time_decomp
.
append
(
float
(
csvDict
[
app
][
v
][
test
][
t
][
cat
]))
opacity
=
0.4
ax
=
fig
.
add_subplot
(
212
);
index
=
np
.
arange
(
n_vals
)
plt
.
barh
(
index
,
opencl_time_decomp
,
alpha
=
opacity
,
color
=
'
r
'
,
label
=
v
)
plt
.
xlabel
(
'
Time (s)
'
)
plt
.
ylabel
(
'
Timers
'
)
plt
.
title
(
'
Time Decomposition -
'
+
app
+
'
'
+
test
+
'
'
+
v
)
plt
.
yticks
(
index
,
axis_values
)
plt
.
tight_layout
()
# command line options parser
...
...
@@ -314,9 +327,9 @@ parser.add_option("--print-timers-visc",action="store_true",default=False,dest="
parser
.
add_option
(
"
--print-timers-opencl
"
,
action
=
"
store_true
"
,
default
=
False
,
dest
=
"
printTimersOpencl
"
)
parser
.
add_option
(
"
--print-all
"
,
action
=
"
store_true
"
,
default
=
False
,
dest
=
"
printAll
"
)
parser
.
add_option
(
"
--plot-totals
"
,
action
=
"
store_true
"
,
default
=
False
,
dest
=
"
plotTotals
"
)
parser
.
add_option
(
"
--plot-timers-visc
"
,
action
=
"
store_true
"
,
default
=
False
,
dest
=
"
plotTimersVisc
"
)
parser
.
add_option
(
"
--plot-timers-opencl
"
,
action
=
"
store_true
"
,
default
=
False
,
dest
=
"
plotTimersOpencl
"
)
parser
.
add_option
(
"
--plot-timers
"
,
action
=
"
store_true
"
,
default
=
False
,
dest
=
"
plotTimers
"
)
parser
.
add_option
(
"
--plot-all
"
,
action
=
"
store_true
"
,
default
=
False
,
dest
=
"
plotAll
"
)
parser
.
add_option
(
"
--plot-app
"
,
action
=
"
store
"
,
type
=
"
string
"
,
dest
=
"
plotapp
"
)
# main
def
main
():
...
...
@@ -350,14 +363,15 @@ def main():
print
''
# plot graphs
if
options
.
plotTotals
or
options
.
plotAll
:
plotTotalExecutionTimeTable
(
csvDict
)
if
options
.
plot
TimersVisc
or
options
.
plotAll
:
p
lotTimerDecomposition
(
csvDict
,
isVisc
=
True
)
if
options
.
plotTimers
Opencl
or
options
.
plotAll
:
plotTimerDecomposition
(
csvDict
,
isVisc
=
False
)
if
options
.
plot
app
and
not
options
.
plotapp
in
csvDict
.
keys
()
:
p
rint
"
parboilReader.py: Error: No input file was given!
"
raise
OSError
el
if
options
.
plot
app
or
options
.
plot
Timers
or
options
.
plotAll
:
plotTimerDecomposition
(
csvDict
,
options
.
plotapp
)
plt
.
show
()
for
i
in
range
(
num_figs
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment