Apex: module not found error : no module named 'fused_layer_norm_cuda'

Created on 23 Aug 2019  路  1Comment  路  Source: NVIDIA/apex

I EXECUTED THE FOLLWOING COMMANDS FOR INSTALLING THE APEX :

pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

AND THEN

pip install -v --no-cache-dir ./

AND WHEN I RUN THE FOLLOWING COMMAND

python3 code/run_typing.py --do_train --do_lower_case --data_dir data/OpenEntity --ernie_model ernie_base --max_seq_length 256 --train_batch_size 32 --learning_rate 2e-5 --num_train_epochs 10.0 --output_dir output_open --threshold 0.3 --fp16 --loss_scale 128

I GET THIS ERROR
Traceback (most recent call last): File "code/run_typing.py", line 573, in <module> main() File "code/run_typing.py", line 446, in main num_labels = len(label_list)) File "/home/local/ZOHOCORP/ravi-9151/Downloads/ERNIE/code/knowledge_bert/modeling.py", line 636, in from_pretrained model = cls(config, *inputs, **kwargs) File "/home/local/ZOHOCORP/ravi-9151/Downloads/ERNIE/code/knowledge_bert/modeling.py", line 977, in __init__ self.bert = BertModel(config) File "/home/local/ZOHOCORP/ravi-9151/Downloads/ERNIE/code/knowledge_bert/modeling.py", line 731, in __init__ self.embeddings = BertEmbeddings(config) File "/home/local/ZOHOCORP/ravi-9151/Downloads/ERNIE/code/knowledge_bert/modeling.py", line 185, in __init__ self.LayerNorm = BertLayerNorm(config.hidden_size, eps=1e-12) File "/home/local/ZOHOCORP/ravi-9151/anaconda3/envs/keyword/lib/python3.6/site-packages/apex/normalization/fused_layer_norm.py", line 133, in __init__ fused_layer_norm_cuda = importlib.import_module("fused_layer_norm_cuda") File "/home/local/ZOHOCORP/ravi-9151/anaconda3/envs/keyword/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'fused_layer_norm_cuda'
CAN ANYONE HELP ME WHAT THE ERROR I PLEASE
THANKS IN ADVANCE !!!!!!!!!!!!!!!!!

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings