Could not find permutation search CUDA kernels, falling back to CPU path
When I follow the command below to import the ASP module, it appears 'Could not find permutation search CUDA kernels, falling back to CPU path'.
from apex.contrib.sparsity import ASP Could not find permutation search CUDA kernels, falling back to CPU path [ASP][Info] permutation_search_kernels can be imported.
Environment OS: Ubuntu Python: 3.8 CUDA: 11.3 PyTorch: 1.12
pip install -v --disable-pip-version-check --no-cache-dir --global-option="--permutation_search" ./
@lfs119 did this command help you fix this error?
I have encountered the same problem. Did you get ways to solve this ?
i found --global-option="--permutation_search" is not work,maybe you can modify setup.py and open permutation_search build by set as flows:
# if "--permutation_search" in sys.argv:
if True:
# sys.argv.remove("--permutation_search")
if CUDA_HOME is None:
raise RuntimeError("--permutation_search was requested, but nvcc was not found. Are you sure your environment has nvcc available? If you're installing within a container from https://hub.docker.com/r/pytorch/pytorch, only images whose names contain 'devel' will provide nvcc.")
else:
cc_flag = ['-Xcompiler', '-fPIC', '-shared']
ext_modules.append(
CUDAExtension(name='permutation_search_cuda',
sources=['apex/contrib/sparsity/permutation_search_kernels/CUDA_kernels/permutation_search_kernels.cu'],
include_dirs=[os.path.join(this_dir, 'apex', 'contrib', 'sparsity', 'permutation_search_kernels', 'CUDA_kernels')],
extra_compile_args={'cxx': ['-O3'] + version_dependent_macros,
'nvcc':['-O3'] + version_dependent_macros + cc_flag}))
Because the cuda ext not compiled.