def test_output_is_view_of_output(self, test_name="output_is_view_of_output"):
        """
        Case: An output is a view of an output.
        Graph: ( gelu ) <--view-- ( output_0 ) <--view-- ( output_1 )
        """
        x = gen_input_tensor(shape=self.SHAPE, name="input_x")
        gelu = ops.elementwise(FuncEnum.GELU)(x)  # has an output alias
        output0 = ops.flatten()(gelu)
        output0._attrs["is_output"] = True
        output0._attrs["name"] = "output_0"

        output1 = ops.flatten()(output0)
        output1._attrs["is_output"] = True
        output1._attrs["name"] = "output_1"

        compile_model(
            [output0, output1],
            detect_target(),
            self.WORKDIR,
            test_name,
            do_optimize_graph=False,
        )

        view_name = output0._attrs["is_view_of"]._attrs["name"]
        expected_codegen = (
            set_value("output_0", view_name),
            set_value("output_1", "output_0"),
            device_copy(output1, output0, dst_idx=2),
        )
        self._assert_codegen_exists(
            test_name, expected_codegen, self.MODEL_GENERATED_FILE
        )

        Case: An output is a view of an output.
        Graph: ( gelu ) <--view-- ( output_0 ) <--view-- ( output_1 )
        
tests/unittest/backend/test_codegen_output_tensor.py