    def ait_data_to_numpy(
        self,
        ait_data: AITData,
        stream_ptr: Optional[int] = None,
        sync: bool = True,
    ) -> np.ndarray:
        """
        Create numpy array from an AITData.
        Copies on the given stream.
        """
        arr = np.empty(ait_data.shape, dtype=ait_data.dtype)
        self.memcpy(
            arr.ctypes._data.value,
            ait_data.data_ptr,
            arr.nbytes,
            AITemplateMemcpyKind.DeviceToHost,
            sync=sync,
            stream_ptr=stream_ptr,
        )
        return arr
Create numpy array from an AITData.
Copies on the given stream.
python/aitemplate/compiler/model.py