Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
0b851159
Commit
0b851159
authored
Nov 24, 2021
by
Shucai Xiao
Browse files
fix review comments
parent
d3267bb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
tools/test_runner.py
tools/test_runner.py
+2
-9
No files found.
tools/test_runner.py
View file @
0b851159
...
...
@@ -111,10 +111,7 @@ def model_parameter_names(model_file_name):
model_proto
=
onnx
.
ModelProto
()
model_proto
.
ParseFromString
(
data_str
)
init_names
=
set
([(
i
.
name
)
for
i
in
model_proto
.
graph
.
initializer
])
param_names
=
[]
for
input
in
model_proto
.
graph
.
input
:
if
input
.
name
not
in
init_names
:
param_names
.
append
(
input
.
name
)
param_names
=
[
input
.
name
for
input
in
model_proto
.
graph
.
input
if
input
.
name
not
in
init_names
]
return
param_names
...
...
@@ -149,7 +146,7 @@ def get_input_shapes(sample_case, param_names):
return
param_shape_map
for
name
in
param_names
:
if
not
name
in
param_shape_map
.
keys
()
:
if
not
name
in
param_shape_map
:
print
(
"Input {} does not exist!"
.
format
(
name
))
sys
.
exit
()
...
...
@@ -160,7 +157,6 @@ def run_one_case(model, param_map):
# convert np array to model argument
pp
=
{}
for
key
,
val
in
param_map
.
items
():
#print("input: {} = {}".format(key, val))
pp
[
key
]
=
migraphx
.
argument
(
val
)
# run the model
...
...
@@ -257,9 +253,6 @@ def main():
# run the model and return outputs
output_data
=
run_one_case
(
model
,
input_data
)
# gold_output_data = []
# for i in range(len((output_data))):
# gold_output_data.append(gold_outputs[output_names[i]])
# check output correctness
ret
=
check_correctness
(
gold_outputs
,
output_data
)
...
...
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