apex icon indicating copy to clipboard operation
apex copied to clipboard

ModuleNotFoundError: No module named 'fused_layer_norm_cuda'

Open ajesujoba opened this issue 6 years ago • 3 comments

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:

fused_layer

Using nvcc --version gives: nvidia

I have tried the instructions here, but I am still getting the ModuleNotFoundError: No module named 'fused_layer_norm_cuda'. What can I do?

ajesujoba avatar Aug 27 '20 14:08 ajesujoba

I just installed apex like this and error disappeared: python setup.py install --cuda_ext --cpp_ext

saurabh-kataria avatar Sep 24 '20 15:09 saurabh-kataria

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" ./

Pinging-ZJU avatar Oct 03 '23 07:10 Pinging-ZJU

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.

caseclose avatar Feb 02 '24 12:02 caseclose