Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Templ test] IDFT: Enable whole Tensor comparison #27611

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/plugins/template/tests/functional/op_reference/irdft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ struct IRDFTParams {
m_expected_shape = expected_shape;
m_input_type = input_type;
m_expected_type = expected_type;
m_input_value = CreateTensor(input_type, input_value);
m_expected_value = CreateTensor(expected_type, expected_value);
m_input_value = CreateTensor(m_input_shape, input_type, input_value);
m_expected_value = CreateTensor(m_expected_shape, expected_type, expected_value);
m_axes = axes;
m_signal = signal;
}
Expand All @@ -48,8 +48,7 @@ struct IRDFTParams {
class ReferenceIRDFTLayerTest : public testing::TestWithParam<IRDFTParams>, public CommonReferenceTest {
public:
void SetUp() override {
legacy_compare = true;
auto params = GetParam();
const auto& params = GetParam();
if (params.m_signal != NULL) {
function = CreateFunctionWithSignal(params);
} else {
Expand All @@ -58,10 +57,12 @@ class ReferenceIRDFTLayerTest : public testing::TestWithParam<IRDFTParams>, publ

inputData = {params.m_input_value};
refOutData = {params.m_expected_value};

abs_threshold = 1e-6f;
t-jankowski marked this conversation as resolved.
Show resolved Hide resolved
}

static std::string getTestCaseName(const testing::TestParamInfo<IRDFTParams>& obj) {
const auto param = obj.param;
const auto& param = obj.param;
std::ostringstream result;

result << "input_shape1=" << param.m_input_shape << "; ";
Expand All @@ -74,14 +75,14 @@ class ReferenceIRDFTLayerTest : public testing::TestWithParam<IRDFTParams>, publ
}

private:
static std::shared_ptr<Model> CreateFunction(IRDFTParams& p) {
static std::shared_ptr<Model> CreateFunction(const IRDFTParams& p) {
auto in = std::make_shared<op::v0::Parameter>(p.m_input_type, p.m_input_shape);
auto irdft = std::make_shared<op::v9::IRDFT>(in, p.m_axes);

return std::make_shared<ov::Model>(irdft, ParameterVector{in});
}

static std::shared_ptr<Model> CreateFunctionWithSignal(IRDFTParams& p) {
static std::shared_ptr<Model> CreateFunctionWithSignal(const IRDFTParams& p) {
auto in = std::make_shared<op::v0::Parameter>(p.m_input_type, p.m_input_shape);
auto irdft = std::make_shared<op::v9::IRDFT>(in, p.m_axes, p.m_signal);

Expand Down
Loading