pynufft_gpu.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:pynufft 作者: jyhmiinlin 项目源码 文件源码
def finalization(self):
        '''
        Add sparse matrix multiplication on GPU
        Note: use "python-cuda-cffi" generated interface to access cusparse

        '''
        self.gpu_flag = 0

        self.CSR = cuda_cffi.cusparse.CSR.to_CSR(self.st['p'].astype(dtype), )
        self.CSRH = cuda_cffi.cusparse.CSR.to_CSR(self.st['p'].getH().tocsr().astype(dtype), )

        self.scikit_plan = cu_fft.Plan(self.st['Kd'], dtype, dtype)
#         self.pHp = cuda_cffi.cusparse.CSR.to_CSR(
#             self.st['pHp'].astype(dtype))

        self.gpu_flag = 1
        self.sn_gpu = pycuda.gpuarray.to_gpu(self.sn.astype(dtype))
#         tmp_array = skcuda.misc.ones((numpy.prod(self.st['Kd']),1),dtype=dtype)
#         tmp = cuda_cffi.cusolver.csrlsvqr(self.CSR, tmp_array)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号