ModuleNotFoundError: No module named 'fused_layer_norm_cuda'
I was trying to run a NMT model in fairseq but I got the ModuleNotFoundError: No module named 'fused_layer_norm_cuda' . Find the output below:
Using nvcc --version gives:
I have tried the instructions here, but I am still getting the ModuleNotFoundError: No module named 'fused_layer_norm_cuda'. What can I do?
I just installed apex like this and error disappeared: python setup.py install --cuda_ext --cpp_ext
I solved this problem by rolling back the code version to the old one (23.05).
git checkout 0da3ffb
pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
I just installed apex like this and error disappeared:
python setup.py install --cuda_ext --cpp_ext
I used your method and got this error info:
File ".../anaconda3/envs/valor/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 781, in _check_cuda_version
raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))
RuntimeError:
The detected CUDA version (12.2) mismatches the version that was used to compile
PyTorch (11.1). Please make sure to use the same CUDA versions.