    def _infer_shapes(self, x: Tensor) -> List[IntVar]:
        """Infers shapes for permute."""

        output_shapes = []
        input_shapes = x.shape()
        for dim in self._attrs["dims"]:
            output_shapes.append(input_shapes[dim])
        return output_shapes
Infers shapes for permute.
python/aitemplate/compiler/ops/tensor/permute.py