diff --git a/src/feeder/et_feeder_node.cpp b/src/feeder/et_feeder_node.cpp index e0427e41..366d0a93 100644 --- a/src/feeder/et_feeder_node.cpp +++ b/src/feeder/et_feeder_node.cpp @@ -10,6 +10,18 @@ ETFeederNode::ETFeederNode(std::shared_ptr node) { this->runtime_ = node->duration_micros(); this->is_cpu_op_ = 1; + if (node->has_inputs()){ + this->inputs_values_ = static_cast(node->inputs().values()); + this->inputs_shapes_ = static_cast(node->inputs().shapes()); + this->inputs_types_ = static_cast(node->inputs().types()); + } + + if (node->has_outputs()){ + this->outputs_values_ = static_cast(node->outputs().values()); + this->outputs_shapes_ = static_cast(node->outputs().shapes()); + this->outputs_types_ = static_cast(node->outputs().types()); + } + for (const auto& attr : node->attr()) { const string& attr_name = attr.name(); @@ -144,3 +156,45 @@ uint32_t ETFeederNode::comm_tag() { string ETFeederNode::pg_name() { return pg_name_; } + +string ETFeederNode::get_inputs_values() const { + if (node_->has_inputs()) { + return inputs_values_; + } + return ""; +} + +string ETFeederNode::get_inputs_shapes() const { + if (node_->has_inputs()) { + return inputs_shapes_; + } + return ""; +} + +string ETFeederNode::get_inputs_types() const { + if (node_->has_inputs()) { + return inputs_types_; + } + return ""; +} + +string ETFeederNode::get_outputs_values() const { + if (node_->has_outputs()) { + return outputs_values_; + } + return ""; +} + +string ETFeederNode::get_outputs_shapes() const { + if (node_->has_outputs()) { + return outputs_shapes_; + } + return ""; +} + +string ETFeederNode::get_outputs_types() const { + if (node_->has_outputs()) { + return outputs_types_; + } + return ""; +} diff --git a/src/feeder/et_feeder_node.h b/src/feeder/et_feeder_node.h index c0aede48..d871e2c9 100644 --- a/src/feeder/et_feeder_node.h +++ b/src/feeder/et_feeder_node.h @@ -39,6 +39,12 @@ class ETFeederNode { uint32_t comm_dst(); uint32_t comm_tag(); std::string pg_name(); + std::string get_inputs_values() const; + std::string get_inputs_shapes() const; + std::string get_inputs_types() const; + std::string get_outputs_values() const; + std::string get_outputs_shapes() const; + std::string get_outputs_types() const; private: void assign_attr_val( @@ -67,6 +73,12 @@ class ETFeederNode { uint32_t comm_dst_; uint32_t comm_tag_; std::string pg_name_; + std::string inputs_values_; + std::string inputs_shapes_; + std::string inputs_types_; + std::string outputs_values_; + std::string outputs_shapes_; + std::string outputs_types_; }; } // namespace Chakra