9 #include "ngraph/except.hpp"
10 #include "ngraph/ngraph_visibility.hpp"
31 void add_in_place_oi_pair(
const struct oi_pair& oi)
33 for (
auto e : m_in_place_oi_pairs)
35 if (e.input == oi.input || e.output == oi.output)
37 throw ngraph_error(
"In_place hint conflicts with an existing entry");
40 m_in_place_oi_pairs.emplace_back(oi);
43 const std::vector<struct oi_pair>& get_in_place_oi_pairs()
const
45 return m_in_place_oi_pairs;
47 bool is_cacheable()
const {
return m_cacheable; }
48 void set_cacheable(
bool val) { m_cacheable = val; }
52 std::vector<struct oi_pair> m_in_place_oi_pairs;
54 bool m_cacheable =
false;
Base error for ngraph runtime errors.
Definition: except.hpp:16
Base class for annotations added to graph ops.
Definition: op_annotations.hpp:27
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16
Definition: op_annotations.hpp:19