Skip to content

Commit

Permalink
test previous def range
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalandi committed Apr 18, 2024
1 parent d0310f0 commit f295449
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include "transformations/convert_precision.hpp"
#include "functional_test_utils/skip_tests_config.hpp"

#include "common_test_utils/ov_tensor_utils.hpp"

namespace ov {
namespace test {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@
#include "openvino/op/multiply.hpp"
#include "openvino/op/strided_slice.hpp"
#include "openvino/op/lstm_sequence.hpp"
#include "openvino/op/variadic_split.hpp"
#include "openvino/op/subtract.hpp"
#include "openvino/op/space_to_batch.hpp"
#include "openvino/op/gather_nd.hpp"
#include "openvino/op/gather.hpp"

namespace ov {
namespace test {
Expand Down Expand Up @@ -216,6 +221,7 @@ static std::map<ov::NodeTypeInfo, std::vector<std::vector<ov::test::utils::Input
{ ov::op::v1::ReduceLogicalOr::get_type_info_static(), {{{0, 2}}, {{0, 2}}} },
{ ov::op::v1::Reshape::get_type_info_static(), {{{-1000, 2000}, {0, 256, 1, 1, true}}, {{-100, 200, 32768}} }},
{ ov::op::v4::Interpolate::get_type_info_static(), {{{0, 15}}, {{0, 8, 32}}} },
{ ov::op::v3::TopK::get_type_info_static(), {{{-1000, 2000}, {0, 1000, 1, 1, true}}, {{-1000, 2000, 32768}}} },
{ ov::op::v11::TopK::get_type_info_static(), {{{-1000, 2000}, {0, 1000, 1, 1, true}}, {{-1000, 2000, 32768}}} },
{ ov::op::v4::Range::get_type_info_static(), {{{0, 15}, {1, 1000, 1, 1, true}}, {{-1000, 2000, 32768}, {1, 1000, 1, 1, true}}} },
{ ov::op::v11::Interpolate::get_type_info_static(), {{{0, 15}}, {{-1000, 2000, 32768}, }} },
Expand All @@ -228,6 +234,11 @@ static std::map<ov::NodeTypeInfo, std::vector<std::vector<ov::test::utils::Input
{ ov::op::v1::Multiply::get_type_info_static(), {{{0, 15}}, {{0, 8, 32}}} },
{ ov::op::v1::StridedSlice::get_type_info_static(), {{{0, 15}}, {{0, 8, 32}}} },
{ ov::op::v5::LSTMSequence::get_type_info_static(), {{{0, 15}}, {{0, 8, 32}}} },
{ ov::op::v1::VariadicSplit::get_type_info_static(), {{{0, 10}}, {{0, 8, 32}}} },
{ ov::op::v1::Subtract::get_type_info_static(), {{{0, 15}}, {{0, 8, 32}}} },
{ ov::op::v2::SpaceToBatch::get_type_info_static(), {{{0, 15}}, {{0, 8, 32}}} },
{ ov::op::v8::GatherND::get_type_info_static(), {{{0, 15}}, {{0, 8, 32}}} },
{ ov::op::v8::Gather::get_type_info_static(), {{{0, 15}}, {{0, 8, 32}}} },
};

ov::test::utils::InputGenerateData get_range_by_type(ov::element::Type temp_type, uint64_t kMaxRange);
Expand Down
10 changes: 10 additions & 0 deletions src/tests/functional/shared_test_classes/src/base/utils/ranges.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ ov::test::utils::InputGenerateData get_range_by_type(ov::element::Type temp_type
double min_start = 0 - (int32_t)round(kMaxRange / 2);
uint32_t max_range = kMaxRange - 1;

// ov::test::utils::InputGenerateData inData;
// if (temp_type.is_real()) {
// inData.start_from = -1000;
// inData.range = 2000;
// inData.resolution = 32;
// } else if (temp_type.is_signed()) {
// inData.start_from = -1000;
// inData.range = 2000;
// }

ov::test::utils::InputGenerateData inData(min_start, max_range);
#define CASE(X) \
case X: { \
Expand Down

0 comments on commit f295449

Please sign in to comment.