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
f736f01f
Commit
f736f01f
authored
5 years ago
by
Elizabeth
Browse files
Options
Downloads
Patches
Plain Diff
Fixed typo
parent
7ae9f2ab
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/projects/soc_simulator/src/driver_new_config_fp16_repl.py
+13
-7
13 additions, 7 deletions
...projects/soc_simulator/src/driver_new_config_fp16_repl.py
with
13 additions
and
7 deletions
llvm/projects/soc_simulator/src/driver_new_config_fp16_repl.py
+
13
−
7
View file @
f736f01f
...
@@ -256,7 +256,7 @@ class Driver:
...
@@ -256,7 +256,7 @@ class Driver:
has_quantized
=
False
has_quantized
=
False
for
layer_ind
,
(
hardware
,
layer
)
in
enumerate
(
curr_conf_results
):
for
layer_ind
,
(
hardware
,
layer
)
in
enumerate
(
curr_conf_results
):
if
len
(
layer
)
==
1
and
layer
[
0
][
2
].
find
(
"
softmax
"
)
!=
-
1
:
continue
if
layer
[
0
][
2
].
find
(
"
softmax
"
)
!=
-
1
:
continue
fp16_layer
=
[]
fp16_layer
=
[]
#print(layer_ind, hardware, layer)
#print(layer_ind, hardware, layer)
layer_table_data
=
self
.
__tensor_layers
[
layer_ind
]
layer_table_data
=
self
.
__tensor_layers
[
layer_ind
]
...
@@ -330,7 +330,7 @@ class Driver:
...
@@ -330,7 +330,7 @@ class Driver:
elif
Driver
.
is_fc
(
layer_name
):
elif
Driver
.
is_fc
(
layer_name
):
rows_a
=
layer_data
[
"
RA
"
]
rows_a
=
layer_data
[
"
RA
"
]
cols_a
=
layer_data
[
"
CA
"
]
cols_a
=
layer_data
[
"
CA
"
]
rows_b
=
cols_
rows_b
=
layer_data
[
"
RB
"
]
cols_b
=
layer_data
[
"
CB
"
]
cols_b
=
layer_data
[
"
CB
"
]
else
:
else
:
print
(
"
PROMISE can
'
t run whatever this layer is.
"
)
print
(
"
PROMISE can
'
t run whatever this layer is.
"
)
...
@@ -427,7 +427,8 @@ class Driver:
...
@@ -427,7 +427,8 @@ class Driver:
def
get_final_times_energies_conf
(
curr_conf
,
curr_conf_name
):
def
get_final_times_energies_conf
(
curr_conf
,
curr_conf_name
):
final_time
=
final_energy
=
0
final_time
=
final_energy
=
0
orig_ft
=
orig_fe
=
0
final_conf
=
[]
# List (conf) of lists (layers) of tuples (operation data)
final_conf
=
[]
# List (conf) of lists (layers) of tuples (operation data)
#for hardware, layer in self.fp16_baseline:
#for hardware, layer in self.fp16_baseline:
...
@@ -447,20 +448,25 @@ class Driver:
...
@@ -447,20 +448,25 @@ class Driver:
#print(op_time, tensor_op)
#print(op_time, tensor_op)
final_tensor_op
=
tensor_op
final_tensor_op
=
tensor_op
#print(op_time > baseline_time)
#print(op_time > baseline_time)
if
op_time
>
baseline_time
:
if
op_time
>
baseline_time
:
#
print("**************** BIGGER ******************")
print
(
"
**************** BIGGER ******************
"
)
#
print(curr_conf_name)
print
(
curr_conf_name
)
#
print(baseline_time, baseline_energy, baseline_op, layer_ind)
print
(
baseline_time
,
baseline_energy
,
baseline_op
,
layer_ind
)
#
print(op_time, tensor_op, layer_ind)
print
(
op_time
,
tensor_op
,
layer_ind
)
final_time
+=
baseline_time
final_time
+=
baseline_time
final_energy
+=
baseline_energy
final_energy
+=
baseline_energy
final_tensor_op
=
baseline_op
final_tensor_op
=
baseline_op
else
:
else
:
final_time
+=
op_time
final_time
+=
op_time
final_energy
+=
op_energy
final_energy
+=
op_energy
orig_ft
+=
op_time
orig_fe
+=
op_energy
final_conf_layer
.
append
((
None
,
None
,
final_tensor_op
))
# Don't care about the times and energies when writing
final_conf_layer
.
append
((
None
,
None
,
final_tensor_op
))
# Don't care about the times and energies when writing
final_conf
.
append
((
hardware
,
final_conf_layer
))
final_conf
.
append
((
hardware
,
final_conf_layer
))
#print("\n")
#print("\n")
print
(
curr_conf_name
,
orig_ft
,
orig_fe
,
final_time
,
final_energy
)
return
final_time
,
final_energy
,
(
curr_conf
[
0
],
final_conf
)
return
final_time
,
final_energy
,
(
curr_conf
[
0
],
final_conf
)
conf_index
=
0
conf_index
=
0
...
...
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