[BUG]: No module named 'colossalai.kernel.op_builder'
🐛 Describe the bug
from colossalai.kernel.op_builder.layernorm import LayerNormBuilder ModuleNotFoundError: No module named 'colossalai.kernel.op_builder'
Environment
pyhton 3.8.0 CUDA 11.6 torch 1.13.0+cu116
Please build Colossalai with cuda extension and try again. Refer to this file for relevant details.
Did you install from pypi or from source?
Did you install from pypi or from source?
from source
The given file's env: pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
but mine is: pyhton==3.8.0 CUDA==11.6 torch==1.13.0+cu116
I did as the file's command, but the error still exists: No module named 'colossalai.kernel.op_builder'
This is likely that you are importing colossalai in the repository root directory, which means you current directory is Colossal-AI as given below. If this is the case, that means Python is importing from the colossalai folder instead of the installed package.
- Colossal-AI
- colossalai
- setup.py
- examples
- ...
This is likely that you are importing colossalai in the repository root directory, which means you current directory is
Colossal-AIas given below. If this is the case, that means Python is importing from thecolossalaifolder instead of the installed package.- Colossal-AI - colossalai - setup.py - examples - ...
So, I should install from pypi?
You can give it a try and do not execute your code from the root directory.
You can give it a try and do not execute your code from the root directory.
It works, thank you, Frank!
No problem! I will close this issue for now.