| 34 | } |
| 35 | |
| 36 | void VerifiedHloModule::VerifyOrAddFailure(absl::string_view message) { |
| 37 | Status status = Verify(); |
| 38 | if (!status.ok()) { |
| 39 | ADD_FAILURE() << "HloVerifier failed on module " << name() |
| 40 | << (message.empty() ? "" : absl::StrCat(" (", message, ")")) |
| 41 | << ": " << status; |
| 42 | LOG(ERROR) << "Contents of bad module:"; |
| 43 | XLA_LOG_LINES(tensorflow::ERROR, ToString()); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | Status VerifiedHloModule::Verify() { |
| 48 | if (computation_count() == 0) { |