ColossalAI
ColossalAI copied to clipboard
ModuleNotFoundError: No module named 'colossalai._C.cpu_adam'
🐛 Describe the bug
Hello All..!
Please find the below bug and suggest solution for me. Thanks in advance.
When I am running the simplest usage code NaiveStrategy on the Google colab. I am getting the error as shown below. Kindly help me to resolve this.
========================================================================================= No pre-built kernel is found, build and load the cpu_adam kernel during runtime now
No modifications detected for re-loaded extension module cpu_adam, skipping build step... Loading extension module cpu_adam...
ModuleNotFoundError Traceback (most recent call last) /usr/local/lib/python3.8/dist-packages/colossalai-0.2.5-py3.8.egg/colossalai/kernel/op_builder/builder.py in load(self, verbose) 134 try: --> 135 op_module = self.import_op() 136 if verbose:
13 frames ModuleNotFoundError: No module named 'colossalai._C.cpu_adam'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last) /usr/lib/python3.8/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
ImportError: /root/.cache/colossalai/torch_extensions/torch1.13_cu11.6/cpu_adam.so: cannot open shared object file: No such file or directory.
Environment
1.Using Single GPU on Google Colab 2.Pytorch Version : 1.13.1+cu116 3.Python Version : Python 3.8.10 4.Cuda Version: NVIDIA-SMI 525.85.12 Driver Version: 525.85.12 CUDA Version: 12.0
CUDA 12.0 may not be currently supported. Can you try reconfigure the environment to use CUDA11.x?
Hello JThh, resolved...!!! I have used the below commands to resolve
!wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin !mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 !wget https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda-!repo-ubuntu1804-11-7-local_11.7.0-515.43.04-1_amd64.deb !dpkg -i cuda-repo-ubuntu1804-11-7-local_11.7.0-515.43.04-1_amd64.deb !cp /var/cuda-repo-ubuntu1804-11-7-local/cuda-*-keyring.gpg /usr/share/keyrings/ !apt-get update !apt-get -y install cuda-11-7
you can try: rm -rf /root/.cache/colossalai
Glad to hear it was resolved. Thanks.