Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 29c22b6

Browse files
authored
Don't use get_argument in ops. (#3726)
1 parent dd8c9ed commit 29c22b6

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

src/ngraph/op/experimental/layers/interpolate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void op::Interpolate::validate_and_infer_types()
4949
}
5050
}
5151

52-
if (auto const_shape = dynamic_pointer_cast<op::Constant>(get_argument(1)))
52+
if (auto const_shape = dynamic_pointer_cast<op::Constant>(input_value(1).get_node_shared_ptr()))
5353
{
5454
auto out_shape = static_cast<const int64_t*>(const_shape->get_data_ptr());
5555
size_t i = 0;

src/ngraph/op/experimental/layers/prior_box.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void op::PriorBox::validate_and_infer_types()
5858

5959
set_input_is_relevant_to_shape(0);
6060

61-
if (auto const_shape = dynamic_pointer_cast<op::Constant>(get_argument(0)))
61+
if (auto const_shape = dynamic_pointer_cast<op::Constant>(input_value(0).get_node_shared_ptr()))
6262
{
6363
NODE_VALIDATION_CHECK(this,
6464
shape_size(const_shape->get_shape()) == 2,

src/ngraph/op/experimental/layers/prior_box_clustered.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void op::PriorBoxClustered::validate_and_infer_types()
7272

7373
set_input_is_relevant_to_shape(0);
7474

75-
if (auto const_shape = dynamic_pointer_cast<op::Constant>(get_argument(0)))
75+
if (auto const_shape = dynamic_pointer_cast<op::Constant>(input_value(0).get_node_shared_ptr()))
7676
{
7777
NODE_VALIDATION_CHECK(this,
7878
shape_size(const_shape->get_shape()) == 2,

src/ngraph/op/quantized_convolution.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ namespace ngraph
7373
const CoordinateDiff& get_padding_below() const { return m_padding_below; }
7474
const CoordinateDiff& get_padding_above() const { return m_padding_above; }
7575
const Strides& get_data_dilation_strides() const { return m_data_dilation_strides; }
76-
std::shared_ptr<Node> get_filters() { return get_argument(1); }
77-
std::shared_ptr<Node> get_data_batch() { return get_argument(0); }
76+
Output<Node> get_filters() { return input_value(1); }
77+
Output<Node> get_data_batch() { return input_value(0); }
7878
const ngraph::element::Type& get_output_type() const { return m_output_type; }
7979
const ngraph::AxisSet& get_input_axes() const { return m_input_axes; }
8080
const ngraph::AxisSet& get_filter_axes() const { return m_filter_axes; }

src/ngraph/op/quantized_dot.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ namespace ngraph
5656
const AxisSet& input1_axes = ngraph::AxisSet{},
5757
const AxisSet& output_axes = ngraph::AxisSet{});
5858

59-
std::shared_ptr<Node> get_input0() { return get_argument(0); }
60-
std::shared_ptr<Node> get_input1() { return get_argument(1); }
59+
Output<Node> get_input0() { return input_value(0); }
60+
Output<Node> get_input1() { return input_value(1); }
6161
const ngraph::element::Type& get_output_type() const { return m_output_type; }
6262
const ngraph::AxisSet& get_input0_axes() const { return m_input0_axes; }
6363
const ngraph::AxisSet& get_input1_axes() const { return m_input1_axes; }

src/ngraph/op/util/arithmetic_reduction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ op::util::ArithmeticReduction::ArithmeticReduction(const Output<Node>& arg,
4242

4343
bool op::util::ArithmeticReduction::reduction_axes_constant() const
4444
{
45-
return dynamic_pointer_cast<op::Constant>(get_argument(1)) != nullptr;
45+
return dynamic_pointer_cast<op::Constant>(input_value(1).get_node_shared_ptr()) != nullptr;
4646
}
4747

4848
const AxisSet op::util::ArithmeticReduction::get_reduction_axes() const
4949
{
5050
AxisSet axes;
51-
if (auto const_op = dynamic_pointer_cast<op::Constant>(get_argument(1)))
51+
if (auto const_op = dynamic_pointer_cast<op::Constant>(input_value(1).get_node_shared_ptr()))
5252
{
5353
axes = const_op->get_axis_set_val();
5454
}

src/ngraph/op/util/logical_reduction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ op::util::LogicalReduction::LogicalReduction(const Output<Node>& arg, const Axis
3030
element::i64, Shape{reduction_axes.size()}, reduction_axes.to_vector())
3131
->output(0)})
3232
{
33-
add_provenance_group_member(input(1).get_source_output().get_node_shared_ptr());
33+
add_provenance_group_member(input_value(1).get_node_shared_ptr());
3434
}
3535

3636
op::util::LogicalReduction::LogicalReduction(const Output<Node>& arg,
@@ -41,7 +41,7 @@ op::util::LogicalReduction::LogicalReduction(const Output<Node>& arg,
4141

4242
bool op::util::LogicalReduction::reduction_axes_constant() const
4343
{
44-
return dynamic_pointer_cast<op::Constant>(get_argument(1)) != nullptr;
44+
return dynamic_pointer_cast<op::Constant>(input_value(1).get_node_shared_ptr()) != nullptr;
4545
}
4646

4747
const AxisSet op::util::LogicalReduction::get_reduction_axes() const

0 commit comments

Comments
 (0)