forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathov_layout_test.cpp
More file actions
30 lines (24 loc) · 776 Bytes
/
ov_layout_test.cpp
File metadata and controls
30 lines (24 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (C) 2018-2026 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "ov_test.hpp"
TEST(ov_layout, ov_layout_create_static_layout) {
const char* str = "[N,C,H,W]";
const char* desc = "NCHW";
ov_layout_t* layout = nullptr;
OV_ASSERT_OK(ov_layout_create(desc, &layout));
const char* res = ov_layout_to_string(layout);
EXPECT_STREQ(res, str);
ov_layout_free(layout);
ov_free(res);
}
TEST(ov_layout, ov_layout_create_dynamic_layout) {
const char* str = "[N,...,C]";
const char* desc = "N...C";
ov_layout_t* layout = nullptr;
OV_ASSERT_OK(ov_layout_create(desc, &layout));
const char* res = ov_layout_to_string(layout);
EXPECT_STREQ(res, str);
ov_layout_free(layout);
ov_free(res);
}