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

add gpu selection for opencl/cuda use #49

Merged
merged 4 commits into from
Aug 23, 2016

Conversation

lfuelling
Copy link
Contributor

while trying to fix #30, I implemented GPU switching capatibility. That doesn't fix my issue but is still useful.

@@ -16,6 +16,7 @@ cmd:option('--minLR', 0.00001, 'minimum learning rate')
cmd:option('--saturateEpoch', 20, 'epoch at which linear decayed LR will reach minLR')
cmd:option('--maxEpoch', 50, 'maximum number of epochs to run')
cmd:option('--batchSize', 10, 'mini-batch size')
cmd:option('--gpu', 0, 'Zero-indexed ID of the GPU to use; for CPU mode set --gpu = -1')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why set to -1 w/ CPU? Isn't the value ignored?

Also, why use a zero-indexed ID if torch starts at one?

I'm not familiar w/ multi GPU support, so sorry if I'm missing something...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I used the code from another project and left the comment unchanged. The -1 has absolutely no effect, in fact the number is only important if you want to use GPU.

The zero-index thing is just because I like to count from zero 😁

@macournoyer macournoyer merged commit 7f1d6fb into macournoyer:master Aug 23, 2016
@macournoyer
Copy link
Owner

Awesome! Thx Lukas.

@lfuelling
Copy link
Contributor Author

Glad I could help 😄

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.

opencl training fail
2 participants