descriptor/tensor.hpp
dimension.cpp
dimension.hpp
- distributed/null.cpp
- distributed/null.hpp
distributed.cpp
distributed.hpp
enum_names.hpp
op/quantized_dot.hpp
op/range.cpp
op/range.hpp
- op/recv.cpp
- op/recv.hpp
op/relu.cpp
op/relu.hpp
op/replace_slice.cpp
op/scatter_update.hpp
op/select.cpp
op/select.hpp
- op/send.cpp
- op/send.hpp
op/shape_of.cpp
op/shape_of.hpp
op/sigmoid.cpp
slice_plan.hpp
specialize_function.cpp
specialize_function.hpp
- state/bernoulli_rng_state.cpp
- state/bernoulli_rng_state.hpp
- state/uniform_rng_state.cpp
- state/uniform_rng_state.hpp
strides.cpp
strides.hpp
type/bfloat16.cpp
//*****************************************************************************
#include "ngraph/distributed.hpp"
-#include "ngraph/distributed/null.hpp"
#include "ngraph/log.hpp"
#include "ngraph/type.hpp"
{
return out << as_string(obj);
}
-
-static std::unique_ptr<DistributedInterface> s_distributed_interface;
-
-void ngraph::set_distributed_interface(std::unique_ptr<DistributedInterface> distributed_interface)
-{
- NGRAPH_DEBUG << "Setting distributed interface to: " << distributed_interface->get_name();
- s_distributed_interface = std::move(distributed_interface);
-}
-
-DistributedInterface* ngraph::get_distributed_interface()
-{
- if (nullptr == s_distributed_interface)
- {
- set_distributed_interface(
- std::unique_ptr<DistributedInterface>(new ngraph::distributed::Null()));
- }
- return s_distributed_interface.get();
-}
static constexpr DiscreteTypeInfo type_info{"AttributeAdapter<reduction::Type>", 0};
const DiscreteTypeInfo& get_type_info() const override { return type_info; }
};
-
- class DistributedInterface
- {
- public:
- virtual ~DistributedInterface() {}
- virtual const std::string& get_name() const = 0;
- virtual int get_size() = 0;
- virtual int get_rank() = 0;
-
- virtual void all_reduce(void* in,
- void* out,
- element::Type_t element_type,
- reduction::Type reduce_type,
- size_t count) = 0;
- virtual void
- broadcast(void* in, element::Type_t element_type, size_t count, int root_id) = 0;
- virtual void recv(void* in, element::Type_t element_type, size_t count, int src_id) = 0;
- virtual void
- send(const void* in, element::Type_t element_type, size_t count, int dest_id) = 0;
- };
-
- void set_distributed_interface(std::unique_ptr<DistributedInterface> distributed_interface);
-
- NGRAPH_API
- DistributedInterface* get_distributed_interface();
}
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#include <cstdio>
-#include <string>
-
-#include "ngraph/distributed/null.hpp"
-#include "ngraph/except.hpp"
-
-const std::string& ngraph::distributed::Null::get_name() const
-{
- return m_name;
-}
-
-int ngraph::distributed::Null::get_size()
-{
- return 0;
-}
-
-int ngraph::distributed::Null::get_rank()
-{
- return 0;
-}
-
-void ngraph::distributed::Null::all_reduce(void*, void*, element::Type_t, reduction::Type, size_t)
-{
- throw ngraph_error("Distributed Library not supported/mentioned");
-}
-
-void ngraph::distributed::Null::broadcast(void*, element::Type_t, size_t, int)
-{
- throw ngraph_error("Distributed Library not supported/mentioned");
-}
-
-void ngraph::distributed::Null::recv(void*, element::Type_t, size_t, int)
-{
- throw ngraph_error("Distributed Library not supported/mentioned");
-}
-
-void ngraph::distributed::Null::send(const void*, element::Type_t, size_t, int)
-{
- throw ngraph_error("Distributed Library not supported/mentioned");
-}
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#pragma once
-
-#include <cstdio>
-#include <string>
-
-#include "ngraph/distributed.hpp"
-
-namespace ngraph
-{
- namespace distributed
- {
- class Null : public DistributedInterface
- {
- const std::string& get_name() const override;
- int get_size() override;
- int get_rank() override;
- void all_reduce(void* in,
- void* out,
- element::Type_t element_type,
- reduction::Type reduce_type,
- size_t count) override;
-
- void broadcast(void* in,
- element::Type_t element_type,
- size_t count,
- int root_id) override;
-
- void recv(void* in, element::Type_t element_type, size_t count, int src_id) override;
-
- void send(const void* in,
- element::Type_t element_type,
- size_t count,
- int dest_id) override;
-
- protected:
- std::string m_name{"NULL"};
- };
- }
-}
NGRAPH_OP(RNNCell, ngraph::op::v0, 0)
NGRAPH_OP(ROIPooling, ngraph::op::v0, 0)
NGRAPH_OP(Range, ngraph::op::v0, 0)
-NGRAPH_OP(Recv, ngraph::op::v0, 0)
NGRAPH_OP(ReduceMax, ngraph::op::v1, 1)
NGRAPH_OP(ReduceLogicalAnd, ngraph::op::v1, 1)
NGRAPH_OP(ReduceLogicalOr, ngraph::op::v1, 1)
NGRAPH_OP(Select, ngraph::op::v0, 0)
NGRAPH_OP(Select, ngraph::op::v1, 1)
NGRAPH_OP(Selu, ngraph::op::v0, 0)
-NGRAPH_OP(Send, ngraph::op::v0, 0)
NGRAPH_OP(ShapeOf, ngraph::op::v0, 0)
NGRAPH_OP(ShapeOf, ngraph::op::v3, 3)
NGRAPH_OP(ShuffleChannels, ngraph::op::v0, 0)
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#include "ngraph/op/recv.hpp"
-
-using namespace std;
-using namespace ngraph;
-
-constexpr NodeTypeInfo op::Recv::type_info;
-
-op::Recv::Recv(const Output<Node>& arg, int src_id)
- : Op({arg})
- , m_src_id(src_id)
-{
- constructor_validate_and_infer_types();
-}
-
-void op::Recv::validate_and_infer_types()
-{
- NODE_VALIDATION_CHECK(this,
- get_input_element_type(0).is_dynamic() ||
- get_input_element_type(0) == element::f32 ||
- get_input_element_type(0) == element::f64,
- "Only element types f32 and f64 are supported (argument element type: ",
- get_input_element_type(0),
- ").");
-
- set_output_type(0, get_input_element_type(0), get_input_partial_shape(0));
-}
-
-shared_ptr<Node> op::Recv::clone_with_new_inputs(const OutputVector& new_args) const
-{
- check_new_args_count(this, new_args);
- return make_shared<Recv>(new_args.at(0), m_src_id);
-}
-
-int op::Recv::get_src_id() const
-{
- return m_src_id;
-}
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#pragma once
-
-#include <memory>
-
-#include "ngraph/op/op.hpp"
-
-namespace ngraph
-{
- namespace op
- {
- namespace v0
- {
- class NGRAPH_API Recv : public Op
- {
- public:
- static constexpr NodeTypeInfo type_info{"Recv", 0};
- const NodeTypeInfo& get_type_info() const override { return type_info; }
- /// \brief Constructs an unitialized recv operation.
- Recv() = default;
- /// \brief Constructs a Recv operation.
- ///
- /// \param arg The node for tensor to receive data
- /// \param src_id the source id which could be rank or node id.
- Recv(const Output<Node>& arg, int src_id);
-
- void validate_and_infer_types() override;
-
- virtual std::shared_ptr<Node>
- clone_with_new_inputs(const OutputVector& new_args) const override;
- int get_src_id() const;
-
- private:
- int m_src_id;
- };
- }
- using v0::Recv;
- }
-}
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#include "ngraph/op/send.hpp"
-
-using namespace std;
-using namespace ngraph;
-
-constexpr NodeTypeInfo op::Send::type_info;
-
-op::Send::Send(const Output<Node>& arg, int dest_id)
- : Op({arg})
- , m_dest_id(dest_id)
-{
- constructor_validate_and_infer_types();
-}
-
-void op::Send::validate_and_infer_types()
-{
- NODE_VALIDATION_CHECK(this,
- get_input_element_type(0).is_dynamic() ||
- get_input_element_type(0) == element::f32 ||
- get_input_element_type(0) == element::f64,
- "Only element types f32 and f64 are supported (argument element type: ",
- get_input_element_type(0),
- ").");
-
- set_output_type(0, get_input_element_type(0), get_input_partial_shape(0));
-}
-
-shared_ptr<Node> op::Send::clone_with_new_inputs(const OutputVector& new_args) const
-{
- check_new_args_count(this, new_args);
- return make_shared<Send>(new_args.at(0), m_dest_id);
-}
-
-int op::Send::get_dest_id() const
-{
- return m_dest_id;
-}
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#pragma once
-
-#include <memory>
-
-#include "ngraph/op/op.hpp"
-
-namespace ngraph
-{
- namespace op
- {
- namespace v0
- {
- class NGRAPH_API Send : public Op
- {
- public:
- static constexpr NodeTypeInfo type_info{"Send", 0};
- const NodeTypeInfo& get_type_info() const override { return type_info; }
- /// \brief Constructs an unitialized send operation.
- Send() = default;
- /// \brief Constructs a send operation.
- ///
- /// \param arg The node for input tensor
- /// \param dest_id the target id which could be rank of node id.
- Send(const Output<Node>& arg, int dest_id);
-
- void validate_and_infer_types() override;
-
- virtual std::shared_ptr<Node>
- clone_with_new_inputs(const OutputVector& new_args) const override;
- int get_dest_id() const;
-
- private:
- int m_dest_id;
- };
- }
- using v0::Send;
- }
-}
#include "ngraph/op/quantized_dot.hpp"
#include "ngraph/op/range.hpp"
#include "ngraph/op/read_value.hpp"
-#include "ngraph/op/recv.hpp"
#include "ngraph/op/reduce_logical_and.hpp"
#include "ngraph/op/reduce_logical_or.hpp"
#include "ngraph/op/reduce_mean.hpp"
#include "ngraph/op/scatter_nd_update.hpp"
#include "ngraph/op/scatter_update.hpp"
#include "ngraph/op/select.hpp"
-#include "ngraph/op/send.hpp"
#include "ngraph/op/shape_of.hpp"
#include "ngraph/op/sigmoid.hpp"
#include "ngraph/op/sign.hpp"
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#pragma once
-
-#include "ngraph/distributed.hpp"
-
-namespace ngraph
-{
- namespace runtime
- {
- namespace reference
- {
- template <typename T>
- void recv(T* arg, const element::Type_t element_type, size_t count, int src_id)
- {
- get_distributed_interface()->recv(arg, element_type, count, src_id);
- }
- }
- }
-}
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#pragma once
-
-#include "ngraph/distributed.hpp"
-
-namespace ngraph
-{
- namespace runtime
- {
- namespace reference
- {
- template <typename T>
- void send(const T* arg, const element::Type_t element_type, size_t count, int dest_id)
- {
- get_distributed_interface()->send(arg, element_type, count, dest_id);
- }
- }
- }
-}
break;
}
- case OP_TYPEID::Recv:
- {
- auto src_id = node_js.at("source_id").get<size_t>();
- node = make_shared<op::Recv>(args[0], src_id);
- break;
- }
case OP_TYPEID::Range:
{
node = make_shared<op::Range>(args[0], args[1], args[2]);
node = make_shared<op::Selu>(args[0], args[1], args[2]);
break;
}
- case OP_TYPEID::Send:
- {
- auto dest_id = node_js.at("dest_id").get<size_t>();
- node = make_shared<op::Send>(args[0], dest_id);
- break;
- }
case OP_TYPEID::ShapeOf:
{
node = make_shared<op::ShapeOf>(args[0]);
}
case OP_TYPEID::Range: { break;
}
- case OP_TYPEID::Recv:
- {
- auto tmp = static_cast<const op::Recv*>(&n);
- node["source_id"] = tmp->get_src_id();
- break;
- }
case OP_TYPEID::Relu: { break;
}
case OP_TYPEID::ReplaceSlice:
}
case OP_TYPEID::Selu: { break;
}
- case OP_TYPEID::Send:
- {
- auto tmp = static_cast<const op::Send*>(&n);
- node["dest_id"] = tmp->get_dest_id();
- break;
- }
case OP_TYPEID::ShapeOf: { break;
}
case OP_TYPEID::ShuffleChannels:
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#include <random>
-
-#include "bernoulli_rng_state.hpp"
-#include "except.hpp"
-
-using namespace std;
-using namespace ngraph;
-
-void ngraph::BernoulliRNGState::activate()
-{
-}
-
-void ngraph::BernoulliRNGState::deactivate()
-{
-}
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#pragma once
-
-#include <functional>
-#include <memory>
-#include <random>
-
-#include "state.hpp"
-
-namespace ngraph
-{
- class NGRAPH_API BernoulliRNGState : public State
- {
- public:
- BernoulliRNGState(unsigned int seed, double probability)
- : State()
- , m_generator(seed)
- , m_distribution(probability)
- {
- }
- virtual void activate() override;
- virtual void deactivate() override;
- virtual ~BernoulliRNGState() override {}
- std::mt19937& get_generator() { return m_generator; }
- std::bernoulli_distribution& get_distribution() { return m_distribution; }
- protected:
- std::mt19937 m_generator;
- std::bernoulli_distribution m_distribution;
- };
-}
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#pragma once
-
-#include <ngraph/ngraph_visibility.hpp>
-
-namespace ngraph
-{
- class State
- {
- public:
- // TODO: add name and id
- State() {}
- virtual void activate() = 0;
- virtual void deactivate() = 0;
- bool is_active() const { return m_is_active; }
- void set_active(bool flag) { m_is_active = flag; }
- virtual ~State() {}
- protected:
- bool m_is_active = false;
- };
-}
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#include "ngraph/state/uniform_rng_state.hpp"
+++ /dev/null
-//*****************************************************************************
-// Copyright 2017-2020 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//*****************************************************************************
-
-#pragma once
-
-#include <functional>
-#include <memory>
-#include <random>
-
-#include "state.hpp"
-
-namespace ngraph
-{
- class UniformRNGState : public State
- {
- public:
- UniformRNGState(std::mt19937::result_type seed)
- : State()
- , m_generator(std::mt19937::result_type(seed))
- , m_distribution()
- {
- }
- UniformRNGState()
- : State()
- , m_generator(std::random_device()())
- , m_distribution()
- {
- }
- virtual void activate() override {}
- virtual void deactivate() override {}
- virtual ~UniformRNGState() override {}
- std::mt19937& get_generator() { return m_generator; }
- std::uniform_real_distribution<double>& get_distribution() { return m_distribution; }
- private:
- std::mt19937 m_generator;
- std::uniform_real_distribution<double> m_distribution;
- };
-}
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
}
- void op_is_Recv()
- {
- op::Recv node;
- EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
- EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
- EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
- EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
- }
-
void op_is_Range()
{
op::Range node;
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
}
- void op_is_Send()
- {
- op::Send node;
- EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
- EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node));
- EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
- EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
- }
-
void op_is_ShapeOf()
{
op::ShapeOf node;
#include "ngraph/runtime/reference/pad.hpp"
#include "ngraph/runtime/reference/product.hpp"
#include "ngraph/runtime/reference/quantize.hpp"
-#include "ngraph/runtime/reference/recv.hpp"
#include "ngraph/runtime/reference/relu.hpp"
#include "ngraph/runtime/reference/replace_slice.hpp"
#include "ngraph/runtime/reference/reshape.hpp"
#include "ngraph/runtime/reference/reverse_sequence.hpp"
#include "ngraph/runtime/reference/round.hpp"
#include "ngraph/runtime/reference/select.hpp"
-#include "ngraph/runtime/reference/send.hpp"
#include "ngraph/runtime/reference/sigmoid.hpp"
#include "ngraph/runtime/reference/sign.hpp"
#include "ngraph/runtime/reference/sin.hpp"
#include "ngraph/runtime/reference/tanh.hpp"
#include "ngraph/runtime/reference/topk.hpp"
#include "ngraph/runtime/tensor.hpp"
-#include "ngraph/state/bernoulli_rng_state.hpp"
-#include "ngraph/state/uniform_rng_state.hpp"
#include "op/avg_pool.hpp"
namespace ngraph
std::shared_ptr<Function> m_function;
std::unordered_map<std::shared_ptr<const Node>, stopwatch> m_timer_map;
std::vector<std::shared_ptr<Node>> m_nodes;
- std::unordered_map<const Node*, std::shared_ptr<State>> m_states;
std::set<std::string> m_unsupported_op_name_list;
static OP_TYPEID get_typeid(const Node& node);
break;
}
- case OP_TYPEID::Recv:
- {
- size_t element_count = shape_size(node.get_output_shape(0));
- size_t memSize = element_count * sizeof(T);
- const auto* op = static_cast<const ngraph::op::Recv*>(&node);
- int src_id = op->get_src_id();
-
- reference::recv<T>(
- args[0]->get_data_ptr<T>(), node.get_input_element_type(0), element_count, src_id);
-
- memcpy(out[0]->get_data_ptr<T>(), args[0]->get_data_ptr<T>(), memSize);
- break;
- }
case OP_TYPEID::Relu:
{
size_t element_count = shape_size(node.get_output_shape(0));
element_count);
break;
}
- case OP_TYPEID::Send:
- {
- size_t element_count = shape_size(node.get_output_shape(0));
- size_t memSize = element_count * sizeof(T);
- const auto* op = static_cast<const ngraph::op::Send*>(&node);
- int dest_id = op->get_dest_id();
-
- reference::send<T>(args[0]->get_data_ptr<const T>(),
- node.get_input_element_type(0),
- element_count,
- dest_id);
-
- memcpy(out[0]->get_data_ptr<T>(), args[0]->get_data_ptr<T>(), memSize);
- break;
- }
case OP_TYPEID::Sigmoid:
{
size_t element_count = shape_size(node.get_output_shape(0));
NGRAPH_OP(Quantize, ngraph::op)
NGRAPH_OP(QuantizedConvolution, ngraph::op)
NGRAPH_OP(QuantizedDot, ngraph::op)
-NGRAPH_OP(Recv, ngraph::op)
NGRAPH_OP(Range, ngraph::op)
NGRAPH_OP(Relu, ngraph::op)
NGRAPH_OP(ReplaceSlice, ngraph::op)
NGRAPH_OP(Round, ngraph::op)
NGRAPH_OP(Select, ngraph::op)
NGRAPH_OP(Selu, ngraph::op)
-NGRAPH_OP(Send, ngraph::op)
NGRAPH_OP(ShapeOf, ngraph::op)
NGRAPH_OP(ShuffleChannels, ngraph::op)
NGRAPH_OP(Sigmoid, ngraph::op)