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

Multi-device support #92

Closed
4 tasks done
neubig opened this issue Oct 5, 2016 · 6 comments
Closed
4 tasks done

Multi-device support #92

neubig opened this issue Oct 5, 2016 · 6 comments
Assignees

Comments

@neubig
Copy link
Contributor

neubig commented Oct 5, 2016

Currently, cnn supports running computation on either CPU or GPU, based on the setting of the -DHAVE_CUDA flag. It would be better if a single program could utilize both CPU and one or more GPUs within the same program. The framework for this is mostly there, minus a few remaining issues:

  • There are a number of places, mainly in the parameters and tensor operations that are still hard-coded based on the setting of HAVE_CUDA. These all need to be changed to be dynamic based on the device setting for the tensor.
  • Currently parameters are all declared on the default device. There needs to be an option to let parameters live on other devices.
  • We need to create a node that moves memory between devices.
  • Test code for multi-device support needs to be created.
@iamyoungjo
Copy link
Contributor

@neubig Hello. Is this enhancement still on-going? If not, I would like to jump on this as I have some time & purpose to work on this.

@xunzhang
Copy link
Collaborator

Hi, I have an open pull request #382 but I am currently working on other features so you can go ahead. If I have time, we can work on it together. @neubig what about merging the slight change in that pull request first? Thanks.

@neubig
Copy link
Contributor Author

neubig commented Apr 15, 2017

Done. Also, I think this would be a good place to start for multi-device support: #443

@xunzhang
Copy link
Collaborator

Thanks a lot, I will work on it after finishing dynet-84 and will keep following on this as well.

@neubig
Copy link
Contributor Author

neubig commented Aug 25, 2017

I think this is basically done, although it might have some rough edges. Thanks @xunzhang !

@neubig neubig closed this as completed Aug 25, 2017
@xunzhang
Copy link
Collaborator

Add reference for the related pull request #704 .

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

No branches or pull requests

3 participants