Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
88031947
Commit
88031947
authored
Jul 31, 2019
by
Robert Kimball
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow override of default tolerance for NgraphTestCase
parent
5ece6de2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
12 deletions
+4
-12
fused_op.in.cpp
test/backend/fused_op.in.cpp
+1
-2
test_case.cpp
test/util/test_case.cpp
+2
-7
test_case.hpp
test/util/test_case.hpp
+1
-3
No files found.
test/backend/fused_op.in.cpp
View file @
88031947
...
...
@@ -1540,8 +1540,7 @@ NGRAPH_TEST(${BACKEND_NAME}, group_conv_transpose)
-
0.0270785
f
,
-
0.00680824
f
,
-
0.06650258
f
,
0.08004665
f
,
0.07918708
f
,
-
0.0724144
f
,
0.06256775
f
,
-
0.17838378
f
,
-
0.18863615
f
,
0.20064656
f
,
0.133717
f
,
-
0.06876295
f
,
-
0.06398046
f
,
-
0.00864975
f
,
0.19289537
f
,
-
0.01490572
f
,
-
0.13673618
f
,
0.01949645
f
});
test_case
.
set_tolerance
(
3
);
test_case
.
run
();
test_case
.
run
(
DEFAULT_FLOAT_TOLERANCE_BITS
+
1
);
}
NGRAPH_TEST
(
$
{
BACKEND_NAME
},
group_conv_transpose_output_shape
)
...
...
test/util/test_case.cpp
View file @
88031947
...
...
@@ -19,8 +19,9 @@
#include "gtest/gtest.h"
#include "ngraph/assertion.hpp"
void
ngraph
::
test
::
NgraphTestCase
::
run
()
void
ngraph
::
test
::
NgraphTestCase
::
run
(
size_t
tolerance_bits
)
{
m_tolerance_bits
=
tolerance_bits
;
const
auto
&
function_results
=
m_function
->
get_results
();
NGRAPH_CHECK
(
m_expected_outputs
.
size
()
==
function_results
.
size
(),
"Expected number of outputs is different from the function's number of results."
);
...
...
@@ -52,12 +53,6 @@ void ngraph::test::NgraphTestCase::run()
}
}
ngraph
::
test
::
NgraphTestCase
&
ngraph
::
test
::
NgraphTestCase
::
set_tolerance
(
int
tolerance_bits
)
{
m_tolerance_bits
=
tolerance_bits
;
return
*
this
;
}
ngraph
::
test
::
NgraphTestCase
&
ngraph
::
test
::
NgraphTestCase
::
dump_results
(
bool
dump
)
{
m_dump_results
=
dump
;
...
...
test/util/test_case.hpp
View file @
88031947
...
...
@@ -38,8 +38,6 @@ namespace ngraph
{
}
NgraphTestCase
&
set_tolerance
(
int
tolerance_bits
);
/// \brief Makes the test case print the expected and computed values to the console. This should only be used for debugging purposes.
///
/// Just before the assertion is done, the current test case will gather expected and computed values,
...
...
@@ -130,7 +128,7 @@ namespace ngraph
add_expected_output
(
expected_shape
,
value
);
}
void
run
();
void
run
(
size_t
tolerance_bits
=
DEFAULT_FLOAT_TOLERANCE_BITS
);
private
:
template
<
typename
T
>
...
...
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