| 71 | } |
| 72 | |
| 73 | size_t getTotalByteSizeOf(const std::vector<loco::Node *> &nodes) |
| 74 | { |
| 75 | size_t total_byte_size = 0; |
| 76 | |
| 77 | for (const auto node : nodes) |
| 78 | { |
| 79 | const auto input_node = loco::must_cast<const luci::CircleInput *>(node); |
| 80 | size_t byte_size = luci::size(input_node->dtype()); |
| 81 | |
| 82 | for (uint32_t index = 0; index < input_node->rank(); index++) |
| 83 | { |
| 84 | byte_size *= input_node->dim(index).value(); |
| 85 | } |
| 86 | |
| 87 | total_byte_size += byte_size; |
| 88 | } |
| 89 | |
| 90 | return total_byte_size; |
| 91 | } |
| 92 | |
| 93 | } // namespace circle_eval_diff |
| 94 |