| 1109 | } |
| 1110 | |
| 1111 | bool HloMapInstruction::IsElementwiseImpl( |
| 1112 | const absl::optional<int64>& operand_idx) const { |
| 1113 | if (!dimensions().empty()) { |
| 1114 | // Check that the map is executed in elementwise compatible dimensions. |
| 1115 | if (dimensions().size() != shape().dimensions_size()) { |
| 1116 | return false; |
| 1117 | } |
| 1118 | for (int i = 0; i < dimensions().size(); ++i) { |
| 1119 | if (dimensions()[i] != i) { |
| 1120 | return false; |
| 1121 | } |
| 1122 | } |
| 1123 | } |
| 1124 | return true; |
| 1125 | } |
| 1126 | |
| 1127 | std::vector<string> HloMapInstruction::ExtraAttributesToStringImpl( |
| 1128 | const HloPrintOptions& options) const { |
nothing calls this directly
no test coverage detected