Compute a string signature which encodes the shapes of the arguments in the supplied list.
| 73 | // Compute a string signature which encodes the shapes of the |
| 74 | // arguments in the supplied list. |
| 75 | string XlaCompilationCache::Signature::HumanString() const { |
| 76 | string result = name; |
| 77 | for (const auto& a : arg_shapes) { |
| 78 | absl::StrAppend(&result, ",", DataTypeString(a.first)); |
| 79 | absl::StrAppend(&result, " [", absl::StrJoin(a.second, ","), "]"); |
| 80 | } |
| 81 | |
| 82 | for (const auto& v : arg_values) { |
| 83 | absl::StrAppend(&result, "; ", v.DebugString()); |
| 84 | } |
| 85 | return result; |
| 86 | } |
| 87 | |
| 88 | bool XlaCompilationCache::Signature::operator==(const Signature& other) const { |
| 89 | if (name != other.name) return false; |