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

[Tmpl test] Preprocess: Drop legacy comparison #24622

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
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class ReferencePreprocessTest : public testing::TestWithParam<RefPreprocessParam
public:
void SetUp() override {
SKIP_IF_CURRENT_TEST_IS_DISABLED()
legacy_compare = true;
const auto& params = GetParam();
function = params.function();
for (const auto& inp : params.inputs) {
Expand Down Expand Up @@ -869,7 +868,7 @@ static RefPreprocessParams convert_color_nv12_layout_resize() {
auto exp_out = std::vector<float> {255, 0, 0, 255, // R channel
0, 255, 0, 0, // G channel
0, 0, 255, 0}; // B channel
auto out_shape = Shape{1, 2, 2, 3};
auto out_shape = Shape{1, 3, 2, 2};
// clang-format on
res.inputs.emplace_back(element::u8, input_shape, input);
res.expected.emplace_back(out_shape, element::f32, exp_out);
Expand Down Expand Up @@ -1175,8 +1174,8 @@ static RefPreprocessParams post_convert_color_rgb_to_bgr() {
return f;
};

res.inputs.emplace_back(Shape{2, 3, 1, 1}, element::f32, std::vector<float>{1, 2, 3, 4, 5, 6});
res.expected.emplace_back(Shape{2, 3, 1, 1}, element::f32, std::vector<float>{3, 2, 1, 6, 5, 4});
res.inputs.emplace_back(Shape{2, 1, 1, 3}, element::f32, std::vector<float>{1, 2, 3, 4, 5, 6});
res.expected.emplace_back(Shape{2, 1, 1, 3}, element::f32, std::vector<float>{3, 2, 1, 6, 5, 4});
return res;
}

Expand All @@ -1191,8 +1190,8 @@ static RefPreprocessParams post_convert_color_bgr_to_rgb() {
return f;
};

res.inputs.emplace_back(Shape{2, 3, 1, 1}, element::f32, std::vector<float>{1, 2, 3, 4, 5, 6});
res.expected.emplace_back(Shape{2, 3, 1, 1}, element::f32, std::vector<float>{3, 2, 1, 6, 5, 4});
res.inputs.emplace_back(Shape{2, 1, 1, 3}, element::f32, std::vector<float>{1, 2, 3, 4, 5, 6});
res.expected.emplace_back(Shape{2, 1, 1, 3}, element::f32, std::vector<float>{3, 2, 1, 6, 5, 4});
return res;
}

Expand Down Expand Up @@ -1230,8 +1229,8 @@ static RefPreprocessParams rgb_to_bgr() {
return f;
};

res.inputs.emplace_back(Shape{2, 3, 1, 1}, element::f32, std::vector<float>{1, 2, 3, 4, 5, 6});
res.expected.emplace_back(Shape{2, 3, 1, 1}, element::f32, std::vector<float>{3, 2, 1, 6, 5, 4});
res.inputs.emplace_back(Shape{2, 1, 1, 3}, element::f32, std::vector<float>{1, 2, 3, 4, 5, 6});
res.expected.emplace_back(Shape{2, 1, 1, 3}, element::f32, std::vector<float>{3, 2, 1, 6, 5, 4});
return res;
}

Expand All @@ -1246,8 +1245,8 @@ static RefPreprocessParams bgr_to_rgb() {
return f;
};

res.inputs.emplace_back(Shape{2, 3, 1, 1}, element::f32, std::vector<float>{1, 2, 3, 4, 5, 6});
res.expected.emplace_back(Shape{2, 3, 1, 1}, element::f32, std::vector<float>{3, 2, 1, 6, 5, 4});
res.inputs.emplace_back(Shape{2, 1, 1, 3}, element::f32, std::vector<float>{1, 2, 3, 4, 5, 6});
res.expected.emplace_back(Shape{2, 1, 1, 3}, element::f32, std::vector<float>{3, 2, 1, 6, 5, 4});
return res;
}

Expand Down
Loading