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

Support for chainer? #668

Closed
cmpute opened this issue Jun 17, 2019 · 6 comments
Closed

Support for chainer? #668

cmpute opened this issue Jun 17, 2019 · 6 comments
Assignees
Labels
help wanted Need helps from the community

Comments

@cmpute
Copy link

cmpute commented Jun 17, 2019

🚀 Feature

Support chainer as backend

Motivation

I'm a chainer user and it would be great if chainer is supported as backend. Usage of Chainer is quite similar to Pytorch, so I think it would not be that hard to port it.

Additional context

Chainer Repo
Cupy Repo

@jermainewang
Copy link
Member

Hi, thank you for the suggestion. We do love to have more backends so more users can use DGL. One question, does Chainer support DLPack protocol? It allows framework-specific tensors to expose their raw memory so DGL can perform computation on it in C.

@cmpute
Copy link
Author

cmpute commented Jun 20, 2019

Sorry, I'm not sure about this. Chainer is built based on numpy and cupy. I think this could be answered by chainer developers.

@kmaehashi Sorry to quoting you. I hope this won't makes you too many troubles. Could you kindly help with this issue? Thanks!

@jermainewang jermainewang added the help wanted Need helps from the community label Jun 24, 2019
@BarclayII
Copy link
Collaborator

BarclayII commented Jul 15, 2019

Seems that Chainer tensors are just numpy and cupy arrays, both of which support DLPack (for cupy, see https://github.com/cupy/cupy/blob/master/docs/source/reference/interoperability.rst#dlpack).

@cmpute Could you try implementing the Chainer backend? Since DGL is platform-agnostic, all you need to do to support a new backend is to create a directory python/dgl/backend/chainer and fill in the implementations. You could refer to python/dgl/backend/pytorch/tensor.py to see what are the needed functions and provide the Chainer equivalents accordingly.

For unit-testing the new backend, creating a directory tests/backend/chainer and filling in the implementations should also do most (if not all) of the job.

@cmpute
Copy link
Author

cmpute commented Jul 15, 2019

I can have a try if time permitted. However I'm not working on graph learning recently, the progress may not be much

@BarclayII
Copy link
Collaborator

I can have a try if time permitted. However I'm not working on graph learning recently, the progress may not be much

No problem. I am currently working on Chainer support now. It should take a few days.

@BarclayII BarclayII self-assigned this Jul 17, 2019
@yzh119
Copy link
Member

yzh119 commented Jul 17, 2019

@BarclayII for pooling layer we need more backend functions, please check https://github.com/dmlc/dgl/pull/669/files, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Need helps from the community
Projects
None yet
Development

No branches or pull requests

4 participants