message: [XLA:GPU] Temporarily disable the check for non-layout-changing instructions
  should not change layouts.
  Enable melody_rnn.
diff: @@ -238,10 +238,11 @@ Status OptimizeHloModule(HloModule* hlo_module, se::StreamExecutor* stream_exec,
  {
  HloPassPipeline pipeline("post-layout_assignment");
  + /* TODO(b/117531509): Use LayoutAssignment::InstructionCanChangeLayout after
  + * fixing the ticket. */
  pipeline.AddInvariantChecker<HloVerifier>(
  /*layout_sensitive=*/true,
  - /*allow_mixed_precision=*/false,
  - LayoutAssignment::InstructionCanChangeLayout);
  + /*allow_mixed_precision=*/false, nullptr);
  // The LayoutAssignment pass may leave behind kCopy instructions which are
  // duplicate or NOPs, so remove them with algebraic simplification and CSE.
  @@ -290,10 +291,11 @@ Status OptimizeHloModule(HloModule* hlo_module, se::StreamExecutor* stream_exec,
  // We try to split variadic ops with many parameters into several such ops
  // to avoid exceeding the parameter space.
  fusion.AddPass<VariadicOpSplitter>();
  + /* TODO(b/117531509): Use LayoutAssignment::InstructionCanChangeLayout after
  + * fixing the ticket. */
  fusion.AddInvariantChecker<HloVerifier>(
  /*layout_sensitive=*/true,
  - /*allow_mixed_precision=*/false,
  - LayoutAssignment::InstructionCanChangeLayout);
  + /*allow_mixed_precision=*/false, nullptr);
  fusion.AddPass<GpuInstructionFusion>(/*may_duplicate=*/false);
  fusion.AddPass<GpuInstructionFusion>(/*may_duplicate=*/true);
  fusion.AddPass<FusionMerger>();
  @@ -304,9 +306,10 @@ Status OptimizeHloModule(HloModule* hlo_module, se::StreamExecutor* stream_exec,
  TF_RETURN_IF_ERROR(fusion.Run(hlo_module).status());
  HloPassPipeline reduce_pipeline("reduce-precision");
  + /* TODO(b/117531509): Use LayoutAssignment::InstructionCanChangeLayout after
  + * fixing the ticket. */
  reduce_pipeline.AddInvariantChecker<HloVerifier>(
  - /*is_layout_sensitive=*/true, /*allow_mixed_precision=*/false,
  - LayoutAssignment::InstructionCanChangeLayout);
  + /*is_layout_sensitive=*/true, /*allow_mixed_precision=*/false, nullptr);
  ReducePrecisionInsertion::AddPasses(
  &reduce_pipeline, hlo_module->config().debug_options(),
  ReducePrecisionInsertion::PassTiming::AFTER_FUSION);
  @@ -332,10 +335,11 @@ Status PrepareHloModuleForIrEmitting(HloModule* hlo_module) {
  // (b/27180329). Therefore, in that case, we set the output to be a copy of
  // the parameter.
  HloPassPipeline pipeline("GPU-ir-emit-prepare");
  + /* TODO(b/117531509): Use LayoutAssignment::InstructionCanChangeLayout after
  + * fixing the ticket. */
  pipeline.AddInvariantChecker<HloVerifier>(
  /*layout_sensitive=*/true,
  - /*allow_mixed_precision=*/false,
  - LayoutAssignment::InstructionCanChangeLayout);
  + /*allow_mixed_precision=*/false, nullptr);
  // Copy insertion should be performed immediately before IR emission to avoid
  // inserting unnecessary copies (later pass adds an instruction which
  