Running the following in a clean python context throws pycuda._driver.LogicError: cuMemAlloc failed: context is destroyed on the last line:
import pycuda.autoinit
import numpy as np
import pycuda
import skcuda
import skcuda.fft as cufft
plan = cufft.Plan((2,2), np.complex64, np.complex64)
del plan # equivalent to `skcuda.cufft.cufftDestroy(plan.handle)`
#skcuda.cufft.cufftDestroy(plan.handle) # equivalent to `del plan`
pycuda.gpuarray.empty((2,2), np.float32)
Deleting the FFT plan in scikit-cuda destroys the pycuda context. This happens no matter if you use del plan or skcuda.cufft.cufftDestroy(plan.handle). So maybe CUDA itself is messing up here?
As long as skcuda.cufft.cufftDestroy() is not called, everything is ok. But I want to be able to destroy FFT plans...
Running the following in a clean python context throws
pycuda._driver.LogicError: cuMemAlloc failed: context is destroyed
on the last line:Deleting the FFT plan in scikit-cuda destroys the pycuda context. This happens no matter if you use
del plan
orskcuda.cufft.cufftDestroy(plan.handle)
. So maybe CUDA itself is messing up here?As long as
skcuda.cufft.cufftDestroy()
is not called, everything is ok. But I want to be able to destroy FFT plans...(See also my stackoverflow question: https://stackoverflow.com/questions/72218532/deleting-an-fft-plan-in-scikit-cuda-destroys-the-pycuda-context.)
My system: