Files
openvino/ngraph/test/visitors/op/roll.cpp
Steve Yoo f66d9216ef Migrate Movement 2 (BatchToSpace-2, DepthToSpace-1, Roll-7, ShuffleCha… (#8158)
* Migrate Movement2 (BatchToSpace-2, DepthToSpace-1, Roll-7, ShuffleChannels-1, SpaceToBatch-2, SpaceToDepth-1)

* Fix typos while copying

* Update to opset namespace and add i4, u4, bf16 tests when available

* Remove i4, u4 tests from BatchToSpace and Roll
2021-11-16 03:32:29 +03:00

27 lines
829 B
C++

// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "gtest/gtest.h"
#include "ngraph/ngraph.hpp"
#include "ngraph/op/util/attr_types.hpp"
#include "ngraph/opsets/opset7.hpp"
#include "util/visitor.hpp"
using namespace std;
using namespace ngraph;
using ngraph::test::NodeBuilder;
TEST(attributes, roll_op) {
NodeBuilder::get_ops().register_factory<opset7::Roll>();
const auto A = make_shared<op::Parameter>(element::f32, Shape{4, 3});
const auto B = make_shared<op::Constant>(element::i32, Shape{3});
const auto C = make_shared<op::Constant>(element::i32, Shape{3});
const auto roll = make_shared<opset7::Roll>(A, B, C);
NodeBuilder builder(roll);
const auto expected_attr_count = 0;
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
}