    def test_xxr_to_xxс(self, B, layout_a, layout_b, layout_c, dtype):
        """
        Test that bmm_xxr + permute021 is fused into bmm_xxc and the other way round.
        """
        M, N, K = 4, 6, 8
        batch_dim = shape_utils.gen_int_var_min_max(B)

        shape_a = [batch_dim, K, M] if layout_a == "c" else [batch_dim, M, K]
        shape_b = [batch_dim, N, K] if layout_b == "c" else [batch_dim, K, N]

        self._test_bmm_permute(
            B,
            shape_a,
            shape_b,
            layout_a + layout_b + layout_c,
            dtype=dtype,
        )
Test that bmm_xxr + permute021 is fused into bmm_xxc and the other way round.
tests/unittest/compiler/test_fuse_bmm_permute.py