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

Fix support for --cpu in generate.py #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dartdart26
Copy link

@dartdart26 dartdart26 commented Nov 2, 2021

If the --cpu command line option is set, make sure we pass it propery to
torch.load() so that if the system doesn't have CUDA, it uses the CPU.
In order to do so, add the map_location parameter.

Additionally, remove the unused CUDA_MAJOR and CUDA_MINOR
variables in proj_adaptive_softmax.py .

If the --cpu command line option is set, make sure we pass it propery to
torch.load() so that if the system doesn't have CUDA, it uses the CPU.
In order to do so, add the `map_location` parameter.

Additionally, remove the unused CUDA_MAJOR and CUDA_MINOR variables in
proj_adaptive_softmax.py .
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

Successfully merging this pull request may close these issues.

1 participant