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
690dd868
"vscode:/vscode.git/clone" did not exist on "661248a28e9dd0432700b9166bf9c9634b42b711"
Commit
690dd868
authored
Nov 03, 2021
by
Shucai Xiao
Browse files
clang format
parent
544811c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tools/test_runner.py
tools/test_runner.py
+2
-2
No files found.
tools/test_runner.py
View file @
690dd868
...
@@ -95,6 +95,7 @@ def model_parameter_names(model_file_name):
...
@@ -95,6 +95,7 @@ def model_parameter_names(model_file_name):
return
param_names
return
param_names
def
model_output_names
(
model_file_name
):
def
model_output_names
(
model_file_name
):
with
open
(
model_file_name
,
'rb'
)
as
pfile
:
with
open
(
model_file_name
,
'rb'
)
as
pfile
:
data_str
=
pfile
.
read
()
data_str
=
pfile
.
read
()
...
@@ -104,6 +105,7 @@ def model_output_names(model_file_name):
...
@@ -104,6 +105,7 @@ def model_output_names(model_file_name):
return
output_names
return
output_names
def
get_input_shapes
(
sample_case
,
param_names
):
def
get_input_shapes
(
sample_case
,
param_names
):
param_shape_map
=
{}
param_shape_map
=
{}
for
i
in
range
(
len
(
param_names
)):
for
i
in
range
(
len
(
param_names
)):
...
@@ -147,8 +149,6 @@ def check_correctness(gold_outputs, outputs, rtol=1e-3, atol=1e-3):
...
@@ -147,8 +149,6 @@ def check_correctness(gold_outputs, outputs, rtol=1e-3, atol=1e-3):
out_num
=
len
(
gold_outputs
)
out_num
=
len
(
gold_outputs
)
ret
=
True
ret
=
True
for
i
in
range
(
out_num
):
for
i
in
range
(
out_num
):
# print("Expected value: \n{}".format(gold_outputs[i]))
# print("Actual value: \n{}".format(outputs[i]))
if
not
np
.
allclose
(
gold_outputs
[
i
],
outputs
[
i
],
rtol
,
atol
):
if
not
np
.
allclose
(
gold_outputs
[
i
],
outputs
[
i
],
rtol
,
atol
):
print
(
"Output {} is incorrect ..."
.
format
(
i
))
print
(
"Output {} is incorrect ..."
.
format
(
i
))
print
(
"Expected value:
\n
{}"
.
format
(
gold_outputs
[
i
]))
print
(
"Expected value:
\n
{}"
.
format
(
gold_outputs
[
i
]))
...
...
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