Recently I also encountered this problem. I solved it by modifying the code in compile.py as shown in the last line of the error (mine was in /cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.7/site-packages/pycuda
):
class SourceModule(CudaModule):
'''
Creates a Module from a single .cu source object linked against the
static CUDA runtime.
'''
def __init__(self, source, nvcc="nvcc", options=None, keep=False,
no_extern_c=False, arch=None, code=None, cache_dir=None,
include_dirs=[]):
self._check_arch(arch)
cubin = compile(source, nvcc, options, keep, no_extern_c,
arch, code, cache_dir, include_dirs)
from pycuda.driver import module_from_buffer
self.module = module_from_buffer(cubin)
self._bind_module()
Upon googling, it seems that the arch parameter would cause error. So I simply removed it:
class SourceModule(CudaModule):
'''
Creates a Module from a single .cu source object linked against the
static CUDA runtime.
'''
def __init__(self, source, nvcc="nvcc", options=None, keep=False,
no_extern_c=False, code=None, cache_dir=None,
include_dirs=[]):
#self._check_arch(arch)
cubin = compile(source, nvcc, options, keep, no_extern_c,
code, cache_dir, include_dirs)
from pycuda.driver import module_from_buffer
self.module = module_from_buffer(cubin)
self._bind_module()
And 2D class and 3D ab initio can be run again!