def test_multiple_dst_view_ops(self):
        """
        Given

          x0 -> reshape -> x1 -> unsqueeze -> ...
                            |--> unsqueeze -> ...

        We want to merge both unsqueeze calls into the preceding reshape call.
        """
        dtype = "float"
        x0_shape = [2, 4, 8]
        y_shape = [8, 8]

        x0 = Tensor(
            shape=x0_shape,
            dtype=dtype,
            name="x0",
            is_input=True,
        )
        x1 = ops.reshape()(x0, [8, 8])
        x2 = ops.unsqueeze(dim=1)(x1)
        x3 = ops.unsqueeze(dim=2)(x1)

        y0 = ops.reduce_sum(dim=1)(x2)
        y0._attrs["name"] = "y0"
        y0._attrs["is_output"] = True

        y1 = ops.reduce_sum(dim=2)(x3)
        y1._attrs["name"] = "y1"
        y1._attrs["is_output"] = True

        x0_pt = get_random_torch_tensor(x0_shape, dtype)
        y0_pt = get_torch_empty_tensor(y_shape, dtype)
        y1_pt = get_torch_empty_tensor(y_shape, dtype)

        target = detect_target()
        module = compile_model(
            [y0, y1],
            target,
            "./tmp",
            "test_multiple_dst_view_ops",
        )
        result_graph = module.debug_sorted_graph
        module.run_with_tensors({"x0": x0_pt}, {"y0": y0_pt, "y1": y1_pt})

        self.assertEqual(len(result_graph), 5)
        self.assertFalse(graph_has_op(result_graph, "unsqueeze"))
        sorted_ops = graph_utils.get_sorted_ops(result_graph)
        self.assertEqual(count_ops(sorted_ops, "reshape"), 2)

        y_expected = torch.reshape(x0_pt, [8, 8])
        torch.testing.assert_close(y_expected, y0_pt, atol=5e-2, rtol=5e-2)
        torch.testing.assert_close(y_expected, y1_pt, atol=5e-2, rtol=5e-2)

        Given

          x0 -> reshape -> x1 -> unsqueeze -> ...
                            |--> unsqueeze -> ...

        We want to merge both unsqueeze calls into the preceding reshape call.
        
tests/unittest/compiler/test_merge_view_ops.py