message: Separate out the various tensor allocations for dynamic slicing
diff: @@ -285,15 +285,30 @@ AddTensor(poplar::Graph& graph,
  break;
  }
  case HloOpcode::kDynamicSlice:
  - case HloOpcode::kDynamicUpdateSlice:
  {
  + if (target->second.second == 0) {
  if (ShapeUtil::Rank(shape) == 3) {
  TF_ASSIGN_OR_RETURN(out, AddRnnSequence(graph, src.first, shape));
  } else {
  TF_ASSIGN_OR_RETURN(out, AddPlainTensor(graph, src.first, shape));
  }
  + } else {
  + TF_ASSIGN_OR_RETURN(out, AddPlainTensor(graph, src.first, shape));
  + }
  break;
  }
  + case HloOpcode::kDynamicUpdateSlice:
  + {
  + if (target->second.second == 0) {
  + if (ShapeUtil::Rank(shape) == 3) {
  + TF_ASSIGN_OR_RETURN(out, AddRnnSequence(graph, src.first, shape));
  + } else {
  + TF_ASSIGN_OR_RETURN(out, AddPlainTensor(graph, src.first, shape));
  + }
  + } else {
  + TF_ASSIGN_OR_RETURN(out, AddPlainTensor(graph, src.first, shape));
  + }
  + }
  default:
  return tensorflow::errors::FailedPrecondition(
  port::StrCat("unknown special tensor target on ",
  