def update_base_tensor_shape(self, new_tensor: Tensor) -> None:
        """
        Updates the TensorAccessor's actual shape.
        This API is useful to handle view ops, e.g. reshape, flatten, etc.
        """

        assert (
            self.stride_dim is None
        ), "Tensor accessor cannot be updated once stride_dim is set!"

        self.actual_shapes = new_tensor._attrs["shape"]
        original_dynamic_dims = {
            dim for dim in self.original_shapes if not isinstance(dim, IntImm)
        }
        new_dynamic_dims = {
            dim for dim in self.actual_shapes if not isinstance(dim, IntImm)
        }
        assert original_dynamic_dims == new_dynamic_dims, (
            "Original tensor and actual tensor have different dynamic dimensions! "
            f"Original tensor: {self.original_shapes}, "
            f"actual tensor: {self.actual_shapes}!"
        )
        self._try_gen_dim_mapping()

        Updates the TensorAccessor's actual shape.
        This API is useful to handle view ops, e.g. reshape, flatten, etc.
        
python/aitemplate/compiler/tensor_accessor.py