(idtype)
| 783 | |
| 784 | @parametrize_idtype |
| 785 | def test_issue_2484(idtype): |
| 786 | import dgl.function as fn |
| 787 | |
| 788 | g = dgl.graph(([0, 1, 2], [1, 2, 3]), idtype=idtype, device=F.ctx()) |
| 789 | x = F.copy_to(F.randn((4,)), F.ctx()) |
| 790 | g.ndata["x"] = x |
| 791 | g.pull([2, 1], fn.u_add_v("x", "x", "m"), fn.sum("m", "x")) |
| 792 | y1 = g.ndata["x"] |
| 793 | |
| 794 | g.ndata["x"] = x |
| 795 | g.pull([1, 2], fn.u_add_v("x", "x", "m"), fn.sum("m", "x")) |
| 796 | y2 = g.ndata["x"] |
| 797 | |
| 798 | assert F.allclose(y1, y2) |