Fix build for conflicting PRs (8520 vs 9038) (#9061)
This commit is contained in:
parent
6ef59ce3e4
commit
b30adc7abd
@ -1178,25 +1178,25 @@ TEST(pre_post_process, postprocess_convert_layout_invalid_dims_dyn_shape) {
|
|||||||
|
|
||||||
TEST(pre_post_process, postprocess_preserve_rt_info) {
|
TEST(pre_post_process, postprocess_preserve_rt_info) {
|
||||||
auto f = create_simple_function(element::f32, Shape{1, 3, 2, 2});
|
auto f = create_simple_function(element::f32, Shape{1, 3, 2, 2});
|
||||||
f->get_results()[0]->get_rt_info()["someKey"] = ov::make_variant("someValue");
|
f->get_results()[0]->get_rt_info()["someKey"] = "someValue";
|
||||||
f->input().get_rt_info()["someKey_in"] = ov::make_variant("someValue_in");
|
f->input().get_rt_info()["someKey_in"] = "someValue_in";
|
||||||
f->output().get_rt_info()["someKey_out"] = ov::make_variant("someValue_out");
|
f->output().get_rt_info()["someKey_out"] = "someValue_out";
|
||||||
auto p = PrePostProcessor(f);
|
auto p = PrePostProcessor(f);
|
||||||
p.output().tensor().set_element_type(element::u8);
|
p.output().tensor().set_element_type(element::u8);
|
||||||
f = p.build();
|
f = p.build();
|
||||||
EXPECT_EQ(f->output().get_element_type(), element::u8);
|
EXPECT_EQ(f->output().get_element_type(), element::u8);
|
||||||
|
|
||||||
ASSERT_EQ(f->get_results()[0]->get_rt_info().count("someKey"), 1);
|
ASSERT_EQ(f->get_results()[0]->get_rt_info().count("someKey"), 1);
|
||||||
auto var0 = std::dynamic_pointer_cast<VariantImpl<std::string>>(f->get_results()[0]->get_rt_info()["someKey"]);
|
auto var0 = f->get_results()[0]->get_rt_info()["someKey"].as<std::string>();
|
||||||
EXPECT_EQ(var0->get(), "someValue");
|
EXPECT_EQ(var0, "someValue");
|
||||||
|
|
||||||
ASSERT_EQ(f->input().get_rt_info().count("someKey_in"), 1);
|
ASSERT_EQ(f->input().get_rt_info().count("someKey_in"), 1);
|
||||||
auto var0_in = std::dynamic_pointer_cast<VariantImpl<std::string>>(f->input().get_rt_info()["someKey_in"]);
|
auto var0_in = f->input().get_rt_info()["someKey_in"].as<std::string>();
|
||||||
EXPECT_EQ(var0_in->get(), "someValue_in");
|
EXPECT_EQ(var0_in, "someValue_in");
|
||||||
|
|
||||||
ASSERT_EQ(f->output().get_rt_info().count("someKey_out"), 1);
|
ASSERT_EQ(f->output().get_rt_info().count("someKey_out"), 1);
|
||||||
auto var0_out = std::dynamic_pointer_cast<VariantImpl<std::string>>(f->output().get_rt_info()["someKey_out"]);
|
auto var0_out = f->output().get_rt_info()["someKey_out"].as<std::string>();
|
||||||
EXPECT_EQ(var0_out->get(), "someValue_out");
|
EXPECT_EQ(var0_out, "someValue_out");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(pre_post_process, postprocess_custom_step) {
|
TEST(pre_post_process, postprocess_custom_step) {
|
||||||
|
Loading…
Reference in New Issue
Block a user