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 an attribute to FunctionNode to indicate it supports arrays on different devices #4459

Open
niboshi opened this issue Mar 12, 2018 · 2 comments
Labels
cat:feature Implementation that introduces new interfaces. prio:low Low priority. Nice-to-have. roadmap Included in future roadmap.

Comments

@niboshi
Copy link
Member

niboshi commented Mar 12, 2018

This idea came from an offline discussion related to #454.

Currently only array types are checked in FunctionNode inputs, but not their devices.
If the arrays are on different GPU devices, it causes an error that comes from CuPy, not easy to investigate the fault. It's better for users if Chainer can catch such error earlier and present more easy-to-understand error message.

On the other hand, there may exist (user-defined) functions that support arrays on multiple GPU devices.

The proposed solution is:

  • Introduce an attribute in FunctionNode to indicate whether it supports multiple devices. It's "disabled" by default (i.e. only single device is supported).
  • If it's "disabled", Chainer checks array devices in function inputs.
  • If a FunctionNode implementation wants to support multiple device, it should be explicitly set to "enabled".
@niboshi niboshi added the cat:feature Implementation that introduces new interfaces. label Mar 12, 2018
@stale
Copy link

stale bot commented Jun 10, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Not updated for a longer period of time. label Jun 10, 2018
@kmaehashi kmaehashi removed the stale Not updated for a longer period of time. label Jun 11, 2018
@kmaehashi kmaehashi added the roadmap Included in future roadmap. label Jul 2, 2018
@kmaehashi
Copy link
Member

This should solve issues like #4144 (GPU mismatch).

@kmaehashi kmaehashi added the prio:low Low priority. Nice-to-have. label Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:feature Implementation that introduces new interfaces. prio:low Low priority. Nice-to-have. roadmap Included in future roadmap.
Projects
None yet
Development

No branches or pull requests

2 participants