-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Original ImportError was: ModuleNotFoundError("No module named 'amp_C') #573
Comments
Should by fixed by #553. Try puling the latest master and reinstalling:
|
Thanks for your reply ! |
Hi, I did not understand how you fix this error? I was stuck for two days for this error, if someone can help me, I would be happy! |
Also getting this error and not sure how you fixed @misslibra |
Phew. this was hard to get working. To the couple new commenters from the past week - this won't work in an environment with cuda-tookit-11+ you will need cuda-toolkit-10-2. don't touch your cuda drivers just follow the instructions here: https://www.mathworks.com/matlabcentral/answers/687133-how-to-install-supported-cuda-toolkit-10-2-on-ubuntu-20-04-lts-linux when it references: https://developer.nvidia.com/cuda-10.2-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=debnetwork follow all steps from the archive EXCEPT when it says to install cuda (this will overwrite your drivers and cause incompatibility). Instead, install cuda-toolkit-10-2 this should update nvcc -V to reference 10.2, but if it doesnt check /usr/local/cuda:
often multiple toolkits can live there.. and often you will see a symlink from /usrl/local/cuda to whichever version of cuda nvcc will reference for compile (you can replace the symlink to your desired version). after that is setup and you follow the instructions for setting alternative gcc version you can proceed with the install listed in mcarills comment from Oct 31, 2019 |
After install apex, it still has some errors
Install torch-1.12.1 gpu version:
|
ERROR: Could not build wheels for apex, which is required to install pyproject.toml-based projects |
maybe try this: |
@misslibra I am having the same issue.. |
my env is CUDA 10.1, and pytorch 1.3,GPU v100,python 3.6,
and I get error:
Warning: multi_tensor_applier fused unscale kernel is unavailable, possibly because apex was installed without --cuda_ext --cpp_ext. Using Python fallback. Original ImportError was: ModuleNotFoundError("No module named 'amp_C'",)
Traceback (most recent call last):
File "train.py", line 104, in
lr_scheduler = config_lr_scheduler(args, optimizer)
File "/home/perception/Documents/apex-master/geely_yolo3D/utils/utils.py", line 553, in config_lr_scheduler
return torch.optim.lr_scheduler.StepLR(optimizer, args.lr_decay_epoch, args.gamma)
File "/home/perception/anaconda3/envs/new/lib/python3.6/site-packages/torch/optim/lr_scheduler.py", line 208, in init
super(StepLR, self).init(optimizer, last_epoch)
File "/home/perception/anaconda3/envs/new/lib/python3.6/site-packages/torch/optim/lr_scheduler.py", line 58, in init
self.optimizer.step = with_counter(self.optimizer.step)
File "/home/perception/anaconda3/envs/new/lib/python3.6/site-packages/torch/optim/lr_scheduler.py", line 40, in with_counter
instance_ref = weakref.ref(method.self)
AttributeError: 'function' object has no attribute 'self'
My code run well in env : CUDA 9,pytorch 1.2,GPU P4000,python 3.6
Please help me with this issue.
The text was updated successfully, but these errors were encountered: