-
Notifications
You must be signed in to change notification settings - Fork 1.5k
RuntimeError: apex.optimizers.FusedAdam requires cuda extensions #1193
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
Comments
hi, i meet the same problem, has it happen before? it's my first time use this optimizer. my env this ubuntu 18.0.4 torch 1.8.0 cuda 11.1 |
Sorry, I haven't solved this problem yet. I use imagenaire mainly because I want to run the MUNIT model, and I can run through the official code before, so I didn't continue to solve this problem. |
hi, i meet the same problem. Have you solved this problem? |
yeah, it sames like that apex is installed on only cpu, you can solve this trying to reinstall apex CUDA contained follow the readme. hope it works. |
hi, i have meet the same problem, have u solved the problem? |
This is because of apex cannot import amp_C,you can check the file "G:\Anaconda3\envs\xyy_imagenaire\lib\site-packages\apex\optimizers\fused_adam.py", also you can use your python shell to verify this:
Maybe you can get error like:
And you can add |
Some error. Not solved yet. |
I have also experienced this error: |
I solved this problem by building with
rather than
My pip version is 22.3.1. |
I have installed the apex with the below command. but still getting the error
|
I get the same issue using
I noticed that even with the command above,
|
Anyone who solved this issue? |
this solution works in my case |
@frankielp thanks. I tried but got another error: |
Finally solve my problem, you are so fucking bralliant Bro! |
THANK YOU VERY MUCH,IT IS HELPFUL |
This solution didn't work for me (on pip 24.0), and instead I had to use #1204 (comment) |
this works for me, thanks a lot. |
The build failed due to the error: "RuntimeError: Cuda extensions are being compiled with a version of Cuda that does not match the version used to compile Pytorch binaries." |
My environment is configured as Windows server2016, torch 1.8.1, torchvision 0.9.1, cuda10.2, apex is successfully installed, but when running the project code (NVlabs/imagenaire), an error is reported:
Initialize net_G and net_D weights using type: orthogonal gain: 1
net_G parameter count: 30,258,966
net_D parameter count: 32,322,498
Traceback (most recent call last):
File "H:\19xyy\project\imaginaire-master\train.py", line 100, in
main()
File "H:\19xyy\project\imaginaire-master\train.py", line 60, in main
get_model_optimizer_and_scheduler(cfg, seed=args.seed)
File "H:\19xyy\project\imaginaire-master\imaginaire\utils\trainer.py", line 115, in get_model_optimizer_and_scheduler
opt_G = get_optimizer(cfg.gen_opt, net_G)
File "H:\19xyy\project\imaginaire-master\imaginaire\utils\trainer.py", line 257, in get_optimizer
return get_optimizer_for_params(cfg_opt, params)
File "H:\19xyy\project\imaginaire-master\imaginaire\utils\trainer.py", line 274, in get_optimizer_for_params
opt = FusedAdam(params,
File "G:\Anaconda3\envs\xyy_imagenaire\lib\site-packages\apex\optimizers\fused_adam.py", line 80, in init
raise RuntimeError('apex.optimizers.FusedAdam requires cuda extensions')
RuntimeError: apex.optimizers.FusedAdam requires cuda extensions
The versions of nvcc -V and print(torch.version.cuda) are the same. I don’t know why this error is reported. Are there any good suggestions to make the code run correctly? Looking forward to your reply, thank you very much!


The text was updated successfully, but these errors were encountered: