disable cache on CUDA 11.1
# distutils: language = c++
import gc
+import warnings
import weakref
from cupy_backends.cuda.api cimport runtime
@@ -263,6 +264,11 @@ cdef class PlanCache:
# ---------------------- Python methods ---------------------- #
def __init__(self, Py_ssize_t size=16, Py_ssize_t memsize=-1, int dev=-1):
+ if runtime.runtimeGetVersion() == 11010:
+ warnings.warn('cuFFT plan cache is disabled on CUDA 11.1 due to a '
+ 'known bug, so performance may be degraded. The bug '
+ 'is fixed on CUDA 11.2+.')
+ size = 0
self._validate_size_memsize(size, memsize)
self._set_size_memsize(size, memsize)
self._reset()
