Common test infrastructure suggestions (#14343)
* Common test infrastructure: test helper for partial shapes, data generation fix * Overload static_shapes_to_test_representation to accept PartialShape vector * Rename to static_partial_shapes_to_test_representation
This commit is contained in:
parent
7fad6f9b29
commit
1d59a5a29b
@ -62,6 +62,16 @@ protected:
|
||||
virtual std::vector<ov::Tensor> get_plugin_outputs();
|
||||
};
|
||||
|
||||
inline std::vector<InputShape> static_partial_shapes_to_test_representation(const std::vector<ov::PartialShape>& shapes) {
|
||||
std::vector<InputShape> result;
|
||||
for (const auto& staticShape : shapes) {
|
||||
if (staticShape.is_dynamic())
|
||||
throw std::runtime_error("static_partial_shapes_to_test_representation can process only static partial shapes");
|
||||
result.push_back({{staticShape}, {staticShape.get_shape()}});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
inline std::vector<std::vector<InputShape>> static_shapes_to_test_representation(const std::vector<std::vector<ov::Shape>>& shapes) {
|
||||
std::vector<std::vector<InputShape>> result;
|
||||
for (const auto& staticShapes : shapes) {
|
||||
|
@ -45,7 +45,7 @@ ov::runtime::Tensor generate(const std::shared_ptr<ov::Node>& node,
|
||||
namespace Activation {
|
||||
ov::runtime::Tensor generate(const ov::element::Type& elemType,
|
||||
const ov::Shape& targetShape,
|
||||
InputGenerateData inGenData = InputGenerateData(10, 20, 32768, 1)) {
|
||||
InputGenerateData inGenData = InputGenerateData(-1, 2*32768, 32768, 1)) {
|
||||
if (!elemType.is_signed()) {
|
||||
inGenData.range = 15;
|
||||
inGenData.start_from = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user