message: [XLA][Rematerialization] Add error message
diff: @@ -179,7 +179,8 @@ class InstructionList {
  Item* CreateItem(HloInstruction* inst) {
  Item* item = new Item;
  item->instruction = inst;
  - CHECK(item_map_.insert({inst, item}).second) << "inserting inst twice";
  + CHECK(item_map_.insert({inst, item}).second)
  + << "inserting inst twice " << inst->name();
  return item;
  }
  @@ -418,11 +419,12 @@ class MemoryUsageTracker {
  // the given uses.
  Buffer& RematerializeBuffer(const Buffer& original_buffer, Item* remat_item,
  ItemList&& rematerialized_uses) {
  - CHECK(original_buffer.defining_instruction->placed);
  - CHECK(!original_buffer.has_indirect_uses);
  - CHECK(!original_buffer.live_out);
  + CHECK(original_buffer.defining_instruction->placed)
  + << original_buffer.defining_instruction->instruction->name();
  + CHECK(!original_buffer.has_indirect_uses) << original_buffer.ToString();
  + CHECK(!original_buffer.live_out) << original_buffer.ToString();
  for (Item* use : rematerialized_uses) {
  - CHECK(!use->placed);
  + CHECK(!use->placed) << use->instruction->name();
  }
  return NewBuffer(remat_item, original_buffer.size,
  std::move(rematerialized_uses), /*live_out=*/false,
  @@ -677,8 +679,8 @@ Status MemoryUsageTracker::AddRematerializedInstruction(Item* original_item,
  << ", remat_instruction = " << remat_item->instruction->name();
  TF_RET_CHECK(in_progress_item_ != nullptr);
  - TF_RET_CHECK(original_item->placed);
  - TF_RET_CHECK(!remat_item->placed);
  + TF_RET_CHECK(original_item->placed) << original_item->instruction->name();
  + TF_RET_CHECK(!remat_item->placed) << remat_item->instruction->name();
  // Construct the list of buffers used and defined by the rematerialization.
  remat_item->buffers_used = original_item->buffers_used;
  @@ -707,7 +709,7 @@ Status MemoryUsageTracker::AddRematerializedInstruction(Item* original_item,
  ItemList unplaced_users;
  for (Item* user : old_buffer.users) {
  if (user->placed) {
  - CHECK(IsFinished(user));
  + CHECK(IsFinished(user)) << user->instruction->name();
  placed_users.push_back(user);
  } else {
  unplaced_users.push_back(user);
  @@ -1094,7 +1096,7 @@ StatusOr<bool> HloRematerialization::RematerializeComputation(
  Item* successor_item = instruction_list.GetItem(successor);
  // Assert to make sure we never remat an operation with control
  // successor already placed.
  - CHECK(!successor_item->placed);
  + CHECK(!successor_item->placed) << successor_item->instruction->name();
  place_before.push_back(successor_item);
  }
  instruction_list.InsertBeforeInstructions(remat_item, place_before);
  @@ -1164,7 +1166,7 @@ StatusOr<bool> HloRematerialization::RematerializeComputation(
  // Verify some invariants on the memory tracker.
  CHECK_EQ(memory_tracker.memory_usage(), 0);
  for (auto* instruction : computation->instructions()) {
  - CHECK(memory_tracker.IsPlaced(instruction));
  + CHECK(memory_tracker.IsPlaced(instruction)) << instruction->name();
  }
  VLOG(1) << "In computation " << computation->name() << " rematerialized "
  