Skip to content

Commit

Permalink
add template test for all supported types in Acosh
Browse files Browse the repository at this point in the history
  • Loading branch information
pelszkow committed Jul 19, 2021
1 parent 79c83bf commit 3653844
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions docs/template_plugin/tests/functional/op_reference/acosh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,24 @@ TEST_P(ReferenceAcoshLayerTest, AcoshWithHardcodedRefs) {

} // namespace

INSTANTIATE_TEST_SUITE_P(smoke_Acosh_With_Hardcoded_Refs, ReferenceAcoshLayerTest,
::testing::Values(Builder {}
.input({{8}, element::f32, std::vector<float> {1.f, 2.f, 3.f, 4.f, 5.f, 10.f, 100.f, 1000.f}})
.expected({{8}, element::f32, std::vector<float> {0., 1.317, 1.763, 2.063, 2.292, 2.993, 5.298, 7.6012}}),
Builder {}
.input({{8}, element::i32, std::vector<int32_t> {1, 2, 3, 4, 5, 10, 100, 1000}})
.expected({{8}, element::i32, std::vector<int32_t> {0, 1, 2, 2, 2, 3, 5, 8}}),
Builder {}
.input({{8}, element::u32, std::vector<uint32_t> {1, 2, 3, 4, 5, 10, 100, 1000}})
.expected({{8}, element::u32, std::vector<uint32_t> {0, 1, 2, 2, 2, 3, 5, 8}})),
ReferenceAcoshLayerTest::getTestCaseName);
INSTANTIATE_TEST_SUITE_P(
smoke_Acosh_With_Hardcoded_Refs, ReferenceAcoshLayerTest,
::testing::Values(Builder {}
.input({{8}, element::f16, std::vector<ngraph::float16> {1.f, 2.f, 3.f, 4.f, 5.f, 10.f, 100.f, 1000.f}})
.expected({{8}, element::f16, std::vector<ngraph::float16> {0., 1.317, 1.763, 2.063, 2.292, 2.993, 5.298, 7.6012}}),
Builder {}
.input({{8}, element::f32, std::vector<float> {1.f, 2.f, 3.f, 4.f, 5.f, 10.f, 100.f, 1000.f}})
.expected({{8}, element::f32, std::vector<float> {0., 1.317, 1.763, 2.063, 2.292, 2.993, 5.298, 7.6012}}),
Builder {}
.input({{8}, element::i32, std::vector<int32_t> {1, 2, 3, 4, 5, 10, 100, 1000}})
.expected({{8}, element::i32, std::vector<int32_t> {0, 1, 2, 2, 2, 3, 5, 8}}),
Builder {}
.input({{8}, element::i64, std::vector<int64_t> {1, 2, 3, 4, 5, 10, 100, 1000}})
.expected({{8}, element::i64, std::vector<int64_t> {0, 1, 2, 2, 2, 3, 5, 8}}),
Builder {}
.input({{8}, element::u32, std::vector<uint32_t> {1, 2, 3, 4, 5, 10, 100, 1000}})
.expected({{8}, element::u32, std::vector<uint32_t> {0, 1, 2, 2, 2, 3, 5, 8}}),
Builder {}
.input({{8}, element::u64, std::vector<uint64_t> {1, 2, 3, 4, 5, 10, 100, 1000}})
.expected({{8}, element::u64, std::vector<uint64_t> {0, 1, 2, 2, 2, 3, 5, 8}})),
ReferenceAcoshLayerTest::getTestCaseName);

0 comments on commit 3653844

Please sign in to comment.