FFT of large 3D arrays, memory issue

Skip to first unread message

Luis Perdigao

Sep 14, 2021, 9:50:49 AM9/14/21
to reikna
Dear all,

I have recently been trying Reikna to perform FFT and deconvolution algorithms using OpenCL.

It works really well however I met a problem with GPU memory usage. I hope you can help.

I am getting a memory error. I wonder if there is a way to overcome this limitation, please.

import numpy as np
import reikna.cluda as cluda
from reikna.fft import FFT

api = cluda.ocl_api()
thr = api.Thread.create()

a = np.random.rand(60,1026,1544) #my data has this size
a_cmplx = a.astype(np.complex64)
a_cmplx_dev = thr.to_device(a_cmplx)

fft_gpu = FFT(a_cmplx)
cfft_gpu = fft_gpu.compile(thr)

res_dev = thr.array(a_cmplx.shape, np.complex64)

cfft_gpu(res_dev , a_cmplx_dev)
#Throws error 
# MemoryError: clEnqueueNDRangeKernel failed: MEM_OBJECT_ALLOCATION_FAILURE
# ...

Task manager shows that the only 0.8GB of GPU RAM (4GB) is being used out of 4GB total available, T600 Nvidia.

Any help is appreciated.

Reply all
Reply to author
0 new messages