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
c7ee3931
Commit
c7ee3931
authored
9 years ago
by
Prakalp Srivastava
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a bug in calculating opencl timers average
parent
18e12d80
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/test/VISC/parboil/driver/options.py
+11
-7
11 additions, 7 deletions
llvm/test/VISC/parboil/driver/options.py
with
11 additions
and
7 deletions
llvm/test/VISC/parboil/driver/options.py
+
11
−
7
View file @
c7ee3931
...
@@ -16,6 +16,7 @@ import StringIO
...
@@ -16,6 +16,7 @@ import StringIO
import
re
import
re
import
actions
import
actions
import
csv
import
csv
import
copy
import
globals
import
globals
def
invalid_option_message
(
progname
,
cmd
,
args
):
def
invalid_option_message
(
progname
,
cmd
,
args
):
...
@@ -257,9 +258,9 @@ def time_options(progname, cmd, args):
...
@@ -257,9 +258,9 @@ def time_options(progname, cmd, args):
return
val
return
val
def
compileTimings
(
timings
):
def
compileTimings
(
timings
):
label_f
=
'
Final
'
label_pb
=
'
Parboil
'
if
len
(
timings
)
==
4
:
if
len
(
timings
)
==
4
:
label_f
=
'
Final
'
label_pb
=
'
Parboil
'
label_ptx
=
'
NVPTX_Timer
'
label_ptx
=
'
NVPTX_Timer
'
label_x86
=
'
X86_Timer
'
label_x86
=
'
X86_Timer
'
label_gen
=
'
GenVISC_Timer
'
label_gen
=
'
GenVISC_Timer
'
...
@@ -279,13 +280,13 @@ def time_options(progname, cmd, args):
...
@@ -279,13 +280,13 @@ def time_options(progname, cmd, args):
timings
[
label_f
][
'
WorkGroup Size Calculation
'
]
=
addTime
([(
label_ptx
,
'
Misc
'
)],
timings
)
timings
[
label_f
][
'
WorkGroup Size Calculation
'
]
=
addTime
([(
label_ptx
,
'
Misc
'
)],
timings
)
timings
[
label_f
][
'
Kernel
'
]
=
addTime
([(
label_ptx
,
'
Kernel
'
)],
timings
)
timings
[
label_f
][
'
Kernel
'
]
=
addTime
([(
label_ptx
,
'
Kernel
'
)],
timings
)
timings
[
label_f
][
'
Read Output
'
]
=
addTime
([(
label_ptx
,
'
Read_Output
'
),
(
label_pb
,
'
Copy
'
)],
timings
)
timings
[
label_f
][
'
Read Output
'
]
=
addTime
([(
label_ptx
,
'
Read_Output
'
),
(
label_pb
,
'
Copy
'
)],
timings
)
timings
[
label_f
][
'
Free Memory
'
]
=
addTime
([(
label_ptx
,
'
Mem_Free
'
),
(
label_p
tx
,
'
Mem_Untrack
'
)],
timings
)
timings
[
label_f
][
'
Free Memory
'
]
=
addTime
([(
label_ptx
,
'
Mem_Free
'
),
(
label_p
b
,
'
Mem_Untrack
'
)],
timings
)
timings
[
label_f
][
'
Clear Context
'
]
=
addTime
([(
label_ptx
,
'
Clear_Ctx
'
)],
timings
)
timings
[
label_f
][
'
Clear Context
'
]
=
addTime
([(
label_ptx
,
'
Clear_Ctx
'
)],
timings
)
timings
[
label_f
][
'
Timer Wall Time
'
]
=
addTime
([(
label_pb
,
'
Timer Wall Time
'
)],
timings
)
else
:
else
:
if
len
(
timings
)
==
1
:
if
len
(
timings
)
==
1
:
label_f
=
'
Final
'
timings
[
label_f
]
=
copy
.
deepcopy
(
timings
[
label_pb
])
label_pb
=
'
Parboil
'
timings
[
label_f
][
'
Timer Wall - IO
'
]
=
timings
[
label_f
][
'
Timer Wall Time
'
]
-
timings
[
label_f
][
'
IO
'
]
timings
[
label_f
]
=
timings
[
label_pb
]
def
parseLogForTimer
():
def
parseLogForTimer
():
timings
=
{}
timings
=
{}
...
@@ -302,10 +303,13 @@ def time_options(progname, cmd, args):
...
@@ -302,10 +303,13 @@ def time_options(progname, cmd, args):
if
timerName
!=
'
NVPTX_Timer
'
and
timerName
!=
'
X86_Timer
'
and
timerName
!=
'
GenVISC_Timer
'
:
if
timerName
!=
'
NVPTX_Timer
'
and
timerName
!=
'
X86_Timer
'
and
timerName
!=
'
GenVISC_Timer
'
:
print
"
Warning: Found unknown timer
"
+
timerName
print
"
Warning: Found unknown timer
"
+
timerName
continue
continue
m
=
re
.
search
(
'
(?P<timerID>[a-zA-Z _]+) *: *(?P<value>[0-9]*\.[0-9]*) *$
'
,
line
)
m
=
re
.
search
(
'
(?P<timerID>[a-zA-Z _
/
]+) *: *(?P<value>[0-9]*\.[0-9]*) *$
'
,
line
)
if
m
:
if
m
:
if
timings
[
timerName
]
is
not
None
:
if
timings
[
timerName
]
is
not
None
:
timings
[
timerName
][
m
.
group
(
'
timerID
'
).
strip
()]
=
float
(
m
.
group
(
'
value
'
).
strip
())
timings
[
timerName
][
m
.
group
(
'
timerID
'
).
strip
()]
=
float
(
m
.
group
(
'
value
'
).
strip
())
#print timings[timerName][m.group('timerID').strip()]
#print m.group('value').strip()
#print
else
:
else
:
print
"
Error: Found unknown timer:
"
+
timerName
print
"
Error: Found unknown timer:
"
+
timerName
if
timings
is
not
{}:
if
timings
is
not
{}:
...
...
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