fftn on GPU array
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mojtaba Zarei
am 28 Mär. 2021
Kommentiert: Mojtaba Zarei
am 29 Mär. 2021
In my code, somewhere, I generate a gpuArray matrix with a size of 331x331x331x32, (single float) and I want to get an fftn from the array in a for loop. I have a 24GB TITAN RTX GPU, and before getting each fftn, I have 10 GB free on the GPU. But, when I run the code, it can calculate it without problem, but for the second loop, it returns:
An invalid FFT plan was used on the GPU.
If I pause the code and rerun the fftn, it works fine, but again, I get the error for the next loop, and the same story goes for the next loops!
I also tried the reset(gpuDevice(1)) before each for loop and noticed when I have this pice before each iteration, I will get the error, and if I run it twice, the problem will be solved! Would you please explain to me why I have this problem?
0 Kommentare
Akzeptierte Antwort
Matt J
am 28 Mär. 2021
Bearbeitet: Matt J
am 28 Mär. 2021
before getting each fftn, I have 10 GB free on the GPU
But wit the array dimensions you've mentioned the result will consume more than 17 GB in double floating point.
331^3*64*8/2^30
You could try using single floats, but it will be a tight squeeze.
6 Kommentare
Matt J
am 29 Mär. 2021
Incidentally, you might find whosGPU useful
for an approximate idea of how much memory is consumed by your gpuArray variables on the GPU.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu GPU Computing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!