dmlc--dgl
be444e52d9
* Update graph * Fix for dgl.graph * from_scipy * Replace canonical_etypes with relations * from_networkx * Update for hetero_from_relations * Roll back the change of canonical_etypes to relations * heterograph * bipartite * Update doc * Fix lint * Fix lint * Fix test cases * Fix * Fix * Fix * Fix * Fix * Fix * Update * Fix test * Fix * Update * Use DGLError * Update * Update * Update * Update * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Update * Fix * Update * Fix * Fix * Fix * Update * Fix * Update * Fix * Update * Update * Update * Update * Update * Update * Update * Fix * Fix * Update * Update * Update * Update * Update * Update * rewrite sanity checks * delete unnecessary checks * Update * Update * Update * Update * Update * Update * Update * Update * Fix * Update * Update * Update * Fix * Fix * Fix * Update * Fix * Update * Fix * Fix * Update * Fix * Update * Fix Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com> Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com> Co-authored-by: Quan Gan <coin2028@hotmail.com>
22 行
429 B
Python
22 行
429 B
Python
import dgl
|
|
import torch as th
|
|
import torch.multiprocessing as mp
|
|
import os
|
|
import unittest
|
|
|
|
def sub_ipc(g):
|
|
print(g)
|
|
return g
|
|
|
|
@unittest.skipIf(os.name == 'nt', reason='Do not support windows yet')
|
|
def test_torch_ipc():
|
|
g = dgl.graph(([0, 1, 2], [1, 2, 3]))
|
|
ctx = mp.get_context("spawn")
|
|
p = ctx.Process(target=sub_ipc, args=(g, ))
|
|
|
|
p.start()
|
|
p.join()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
test_torch_ipc() |