Skip to content

Commit

Permalink
merging et_feeder_node
Browse files Browse the repository at this point in the history
  • Loading branch information
rvinaybharadwaj committed Sep 6, 2024
1 parent 6f66943 commit 51200d0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/feeder/et_feeder_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,26 @@ ETFeederNode::ETFeederNode(std::shared_ptr<ChakraProtoMsg::Node> node) {
const string& attr_name = attr.name();

if (attr_name == "is_cpu_op") {
this->is_cpu_op_ = attr.bool_val();
this->is_cpu_op_ = static_cast<bool>(attr.bool_val());
} else if (attr_name == "num_ops") {
this->num_ops_ = attr.uint64_val();
this->num_ops_ = static_cast<uint64_t>(attr.int64_val());
} else if (attr_name == "tensor_size") {
this->tensor_size_ = attr.uint64_val();
} else if (attr_name == "comm_type") {
this->comm_type_ =
static_cast<ChakraProtoMsg::CollectiveCommType>(attr.int64_val());
} else if (attr_name == "comm_priority") {
this->comm_priority_ = attr.uint32_val();
this->comm_priority_ = static_cast<uint32_t>(attr.int32_val());
} else if (attr_name == "comm_size") {
this->comm_size_ = attr.uint64_val();
this->comm_size_ = attr.int64_val();
} else if (attr_name == "comm_src") {
this->comm_src_ = attr.uint32_val();
this->comm_src_ = static_cast<uint32_t>(attr.int32_val());
} else if (attr_name == "comm_dst") {
this->comm_dst_ = attr.uint32_val();
this->comm_dst_ = static_cast<uint32_t>(attr.int32_val());
} else if (attr_name == "comm_tag") {
this->comm_tag_ = attr.uint32_val();
this->comm_tag_ = static_cast<uint32_t>(attr.int32_val());
} else if (attr_name == "pg_name") {
this->pg_name_ = static_cast<string>(attr.string_val());
} else {
this->other_attrs_.emplace(attr_name, attr);
}
Expand Down

0 comments on commit 51200d0

Please sign in to comment.