Skip to content
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

apex version not match pytorch version 1.3 or lower #117

Open
LilyDaytoy opened this issue Aug 17, 2022 · 3 comments
Open

apex version not match pytorch version 1.3 or lower #117

LilyDaytoy opened this issue Aug 17, 2022 · 3 comments

Comments

@LilyDaytoy
Copy link

If cloning the latest apex repo directly, line 19 of apex/apex/transformer/amp/grad_scaler.py used torch.cuda.amp.GradScaler, which requires torch version to be greater than 1.6 in order for torch.cuda to have amp module. However, mega repo requires pytorch to be 1.3 or lower.

May I ask which version of apex mega is using? How can I install the correct apex version :D

@Scalsol
Copy link
Owner

Scalsol commented Aug 17, 2022

As this repo is not maintained for quite a while, I do not remember what version of amp I'm using. One solution is find a version that is released around the end of 2019 and install it:)
Actually amp is not used for this project so another solution is that you can just avoid installing amp if you find there are problems with it. Also comment several lines of code by searching the word amp (no need for mixed precision) and half (no need to transfer the vector to half percision). The INSTALL.md mostly follows the original maskrcnn_benchmark's installation guide.
I may update the repo to make it work with latest pytorch version when I have time. Sorry for the incovenience. And thanks for your interest!

@LilyDaytoy
Copy link
Author

Ohh, thanks for your kind reply and help!
I actually tried to check out apex repo to commit e3794f422628d453b036f69de476bf16a0a838ac, and this worked fine!
thanks for the great work~

@meikorol
Copy link

have you run this code successfully?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants