Is DGL support user define ops?


#1

Is DGL can define ops like euler, euler can define new ops in tensorflow, I think may be DGL can define new ops in mxnet?

I was interested in network(graph) embedding and I have also wonder there are three major framework: DGL(dlmc), graph_nets(deepmind), euler(Alibaba),What are the similarities and differences between these frameworks


#2

Hi Zhanpeng,
We do have the plan for custom ops issue335, you might see DGL support user to define ops on the graph with PyTorch/MXNet in future releases.
However, writing specific op for each case is tedious, we’re also interested in converting UDF(user-defined function)s to some intermediate representations(like TVM) and generate optimized code for many devices(CPU/GPU/…).

Best regards


#3

Thank you for you response, because I want to implement some ops for the purpose to handle like random walk or negative sample more efficient, when there have millions of adjlist in the graph, it is impossible to use node2vec’s random walk in python and networkx, so I want to use C++ take a try


#4

That’s a good point. I think we should provide some customop wrapper to ease such development. Just to confirm.

  • If the customop only deals with node/edge features, then the customop solution in the backend is still compatible with DGL. For example, pytorch’s autograd function.
  • If the customop only deals with graph structure, we are thinking about exposing the graph structure out so custom C++ code could be plugged in.
  • Both are required.

What’s your scenario?


#6

Thank for your replying and further confirmation. I think my scenario is to deal with graph structure, such as try some sample strategies and python is not appropriate in the real with hundreds millions nodes and edges. And I think that deal with node/edge features with pytorch’s existing ops are enough in recent public paper.

I also wonder dgl is for research or for industry in the future? If it is for industry and it will provide some solutions to handle billions of nodes with efficient distributed processing scheme?


#7

DGL is designed for both research and industry use, and our team is working on efficient distributed training of giant graphs with several different sampling strategies. Please stay tuned for our update!