文件历史

提交图

1369 次代码提交

作者 SHA1 备注 提交日期
Pengfei Xia 2cf05c5342 [Transform] Allow add data to self loop created by AddSelfLoop or add_self_loop (#4261)
* Update

* Update functional.py

* Update

* Update test_transform.py

* Update

* Update functional.py

* Update functional.py

* Update functional.py

* Update functional.py

* Update

* Update

* Update functional.py

* Update functional.py

* Update functional.py

* Update functional.py

* Update module.py

* Update test_transform.py

* Update test_transform.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-07-27 15:14:03 +08:00
Chang Liu 4f7972957b [Bugfix] Fix dataloader pytorch cuda indexing (#4297)
* Modify to repro crash

* Revert to orig. scenario and add fix

* Update

Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-07-26 16:59:58 +08:00
Dewvin 7e6a6b4ac0 [Feature] Add CUDA Weighted Randomwalk Sampling (#4243)
* [Feature] Add CUDA Weighted Randomwalk Sampling

* [Feature] Add CUDA Weighted Randomwalk Sampling

* [Feature] Add CUDA Weighted Randomwalk Sampling

* [Feature] Add CUDA Weighted Randomwalk Sampling

* fix empty prob array && enable non-uniform for restart && enable unit tests

* update doc and guide for randomwalk and pinsage

* update comments

Co-authored-by: zhenliangqiu <ubuntu@ip-172-31-24-245.ap-southeast-1.compute.internal>
Co-authored-by: xiny <xiny@nvidia.com>
2022-07-26 13:42:39 +08:00
Serge Panev 7cd531c4d6 [Dist][Optim] Change op order in SparseAdagrad to be numerically closer to PyTorch (#4253)
Signed-off-by: Serge Panev <spanev@nvidia.com>

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-07-25 14:53:53 +08:00
Rhett Ying 8292bf329f [Dist] remove deprecated arguments from initialize() (#4284) 2022-07-25 10:45:19 +08:00
Rhett Ying 740cd70610 [Doc]Fix doc typo in DistEmbedding (#4258)
* [Doc] fix docstring typo

* Update sparse_emb.py

* Update sparse_emb.py

* update link
2022-07-19 10:37:14 +08:00
Mufei Li fdbf5a0fda [DGL-Go][Doc] Update DGL-Go version to 0.0.2 and misc fix from bug bash (#4236)
* Update

* Update

* Update

* Update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-53-142.us-west-2.compute.internal>
Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-07-14 21:30:38 +08:00
Quan (Andy) Gan 2efdaa5df3 [Bug] Revert clearing backward cache for retain_graph flag (#4249)
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-07-14 16:32:01 +08:00
Xin Yao 82ca781911 [Bug] Record stream when using another CUDA stream for data transfer (#4250)
* record stream when using another cuda stream for data transfer

* fix linting

* fix None stream
2022-07-14 13:17:37 +08:00
Rhett Ying 2f322a94b9 [BugFix] fetch device from graph (#4245)
Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-07-14 10:25:07 +08:00
Chang Liu c56e27a807 [Bugfix] Accessing data from the indexes stored in same device (#4242)
* First update to fix two examples

* Update to fix RGCN/graphsage example and dataloader

* Update
2022-07-13 09:02:07 +08:00
Rhett Ying 14e4e1b0f7 [Dist] enable to specify sort_etype for sample_etype_neighbours (#4212)
* [Dist] enable to specify sort_etype for sample_etype_neighbours

* fix lint

* pass argument instead of env

* fix lint and doc string

* refine args

* remove unnecessary lines

* debug only

* debug add sort time log

* change interface

* fix typo

Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-07-11 18:37:25 +08:00
Rhett Ying c65d6fa55f [Dist] format dtypes when loading graph in server (#4228)
* [Dist] format dtypes when loading graph in server

* add test

* refine

* add comments
2022-07-11 14:08:17 +08:00
Vibhu Jawa 9ae117d3cd [Feature] Add to_cugraph and from_cugraph to DGL (#4166)
* Added to_cugraph and from_cugraph functionality

* fix from_cugraph example

* Addressed Reviews

* Fix linting

* Apply suggestions to docstrings from code review

Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>

* Add API docs and remove `from_cugraph` alias

* move cugraph tests to  tests/cugraph/test_basics.py

* remove ununsed imports from test_basics.py

* remove pytest.importorskip as no longer needed

Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-07-07 11:52:17 +08:00
Rhett Ying 6a6597a02a [Feature] extend sort_csr/csc_by_tag to edge (#4164)
* [Feature] extend sort_csr/csc_by_tag to edge

* fix test ffailure in tensorflow

* refine sorting by edges

* fix docstring

* remove unnecessary mem

Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-07-01 13:16:11 +08:00
Chang Liu b76d0ed1db [Example][Refactor] Regolden graphsage example for future guide (#4186)
* Regolden graphsage example to guide others

* update golden

* update

* Update example and propagate to original folder

* Update to remove ^M (windows DOS) character

* update

* Merge file changes and update README

* Minor comment update

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-06-30 21:56:13 +08:00
Quan (Andy) Gan 7735473b44 [Doc] fix typo (#4193)
Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-06-30 15:00:43 +08:00
nv-dlasalle d2a22984c1 [bugfix] Implement __setstate__ for Column (fixes #4107) (#4174)
* * Workaround for graph data saving/loading compatibility problem in Column class.  There may be more places in DGL with the same issue, due to using Python serialization, instead of a more cohesive, comprehensive strategy.  This is just a local fix.

* Add checking for non-empty states

* Add unit test

* Handle the case of columns without storage

Co-authored-by: ndickson <ndickson@nvidia.com>
Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-06-30 10:10:44 +08:00
Xin Yao 32f12ee19e [Doc] Unify the minimal versions required for PyTorch/TensorFlow/MXNet (#4180) 2022-06-29 18:37:19 +08:00
Xin Yao 5bef48dfda [Performance] Optimize the use of alternative streams in dataloader (#4177)
* fix using alternative streams

* use a alternative stream for subgraph transferring

* fix StreamContext when stream is None
2022-06-29 16:02:25 +08:00
nv-dlasalle 1dddaad4f0 [bugfix] Allow communicators of size one when NCCL is missing (#3713)
* Update nccl communicator for when NCCL is missing

* Use static_cast

* Add doc string

* Fix whitespace

* Resrtict unit test to GPU runs

Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-06-29 11:48:16 +08:00
Mufei Li a25a14f2fa [Bug Fix] Fix A Bug Related to GroupRevRes (#4181)
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-06-28 21:17:20 +08:00
Xin Yao b8f905f18b [Bugfix] Fix that pin_prefetcher is not actually enabled (#4169) 2022-06-27 16:07:22 +08:00
nv-dlasalle 020f02498c [Performance][Optimizer] Enable using UVA and FP16 with SparseAdam Optimizer (#3885)
* Add uva by default to embedding

* More updates

* Update optimizer

* Add new uva functions

* Expose new pinned memory function

* Add unit tests

* Update formatting

* Fix unit test

* Handle auto UVA case when training is on CPU

* Allow per-embedding decisions for whether to use UVA

* Address spares_optim.py comments

* Remove unused templates

* Update unit test

* Use dgl allocate memory for pinning

* allow automatically unpin

* workaround for d2h copy with a different dtype

* fix linting

* update error message

* update copyright

Co-authored-by: Xin Yao <xiny@nvidia.com>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-06-24 09:20:08 +08:00
Xin Yao 077e002fe5 [Bugfix][Rework] Automatically unpin tensors pinned by DGL (rework #3997) (#4135)
* Explicitly unpin tensoradapter allocated arrays

* Undo unrelated change

* Add unit test

* update unit test

* add pinned_by_dgl flag to NDArray::Container

* use dgl.ndarray for holding the pinning status

* update multi-gpu uva inference

* reinterpret cast NDArray::Container* to DLTensor* in MoveAsDLTensor

* update unpin column and examples

* add unit test for unpin column

Co-authored-by: Dominique LaSalle <dlasalle@nvidia.com>
Co-authored-by: nv-dlasalle <63612878+nv-dlasalle@users.noreply.github.com>
2022-06-23 13:56:54 +08:00
Rhett Ying ab1b28111d [Dist] etype is not guaranteed to be sorted (#4156) 2022-06-23 09:23:08 +08:00
Mufei Li 4d3c01d671 [Bug Fix] Fix the case when reverse_edge is False for citation graphs (#3840)
* Update citation_graph.py

* Update

* Update

* Update

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-06-22 23:52:02 +08:00
Quan (Andy) Gan 71157b05a8 [Bug] Fix problem with ShaDowKHopSampler working with reverse edge type exclusion (#4145)
* fix

* fix

* Update utils.py
2022-06-22 21:37:13 +08:00
maqy 794ec4a440 [BugFix] fix unstable sort when using dataloader with HeteroGraph (#4147)
* fix unstable sort

* add torch version check

* reformat

* split too long comments

* Update dataloader.py

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-06-22 18:05:42 +08:00
Rhett Ying 69226588a5 [Dist] defer to load node/edge feats (#4143)
* [Dist] defer to load node/edge feats

* fix lint

* Update python/dgl/distributed/partition.py

Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>

* Update python/dgl/distributed/partition.py

Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>

* fix lint

Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>
2022-06-20 19:44:37 +08:00
Rhett Ying b258729b3f [Dist] set socket as default backend for RPC (#4120)
* [Dist] set socket as default backend for RPC

* add tests both for socket and tensorpipe
2022-06-16 13:08:19 +08:00
彭齐荣 9a6f292493 [Bugfix] Fix fail to create_shared_mem_array in ddp spawn train #4110 (#4111)
* Fix fail to create_shared_mem_array in ddp spawn train #4110

Fix fail to create_shared_mem_array in ddp spawn train #4110

* [Bugfix] Fix fail to create_shared_mem_array in ddp spawn train #4110

[Bugfix] Fix fail to create_shared_mem_array in ddp spawn train #4110
Replace random.seed() to random_ = random.Random()

* Update pytorch.py

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-06-14 23:39:36 +08:00
RecLusIve-F defa292bc0 [Dataset] Add Flickr and Yelp dataset (#4099)
* Add Flickr and Yelp dataset

* Update flickr.py

* update

* Update yelp.py

* Update yelp.py

* update

* Update yelp.py

* Update test_data.py

* Update yelp.py

* update

* Update test_data.py

* Update yelp.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-06-14 16:14:12 +08:00
Huarui HE 92e7733065 [dataset] Add a reorder flag to builtin datasets (#4104)
* add argument reorder=False for citation_graph

* add description of the argument reorder

* add reordered/un_reordered save_path

* add version number postfix

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-06-12 12:35:30 +08:00
Rhett Ying abcc9cce83 disable multiple groups tests due to random failure in CI (#4101) 2022-06-09 17:40:53 +08:00
Rhett Ying cac3720b48 [Dist] enable time out when fetching msg (#4043)
* [ist] enable time out when fetching msg

* fix lint error

* minor refinements

* improve minor log

* fix dist test

* fix timeout issue in tensorpipe
2022-06-08 20:20:03 +08:00
ndickson-nvidia d92a4e8b64 [Bug] Fixed missing dgl.transforms.functional __all__ entries (#4089) 2022-06-08 09:31:44 +08:00
Sai Kandregula c9c79b4401 typo fix in TUDataset docs (#4056)
Co-authored-by: decoherencer <decoherencer@users.noreply.github.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-06-03 13:29:32 +08:00
Riju Mukherjee efd909e62e [NN] Enhance EGATConv branch (#4062)
* enhance EGATConv| nfeats as tuples

* egatconv modified for bipartite graphs

* modified docstrings

* added/modified unittests for EGATConv

* Update egatconv.py

* rectified lint errors

Co-authored-by: rijulizer <riju.mukherjee@gmail.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-06-03 11:53:10 +08:00
RecLusIve-F 89655cfda2 [Dataset] Add WikiCS Dataset (#4035)
* Fix bugs & Update dataset

* Update

* Update wikics.py

* Update wikics.py

* Update test_data.py

* Update wikics.py

* Update wikics.py

* Update wikics.py

* update

* Update module.py

* Update dgl.data.rst

* Update wikics.py

* Update wikics.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-06-02 23:03:17 +08:00
Mufei Li d9c25521bc [Data] AsGraphPredDataset (#4073)
* Update

* CI

* Update

* Update

* Fix

* Fix
2022-06-02 16:18:48 +08:00
Sai Kandregula 7ec165c2c5 default value typo fix in GlobalUniform negative sampler (#4060)
Co-authored-by: decoherencer <decoherencer@users.noreply.github.com>
2022-05-28 13:22:41 +08:00
Minjie Wang 3c129ad71f [Bugfix] Cython CAPI holding GIL causes deadlock when Python callback is asynchronous (#4036)
* cython nogil

* move APIs to internal and add unit test

* fix lint

* disable callback array test
2022-05-25 10:02:44 +08:00
Mufei Li 230b886ec5 [Bug fix] Misc Fix for Transforms and NN Modules (#4038)
* Update module.py

* Update utils.py

* Update utils.py

* Update utils.py

* Update module.py

* Update

* Update

* Update
2022-05-24 18:08:08 +08:00
Feiyang(Vance) Chen d70a362dba Update shadow.py (#4034)
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-05-23 19:06:18 +08:00
rudongyu 3fe5eea791 [NN] Label Propagation & Directional Graph Networks (#4017)
* add label propagation module

* fix prev bug in example

* add dgn

* fix linting and doc issues

* update label propagation & dgn

* update label propagation & dgn

* update example

* fix unit test

* fix agg heritage issue

* fix agg issue

* fix lint

* fix idx

* fix lp gpu issue

* Update

* Update

Co-authored-by: mufeili <mufeili1996@gmail.com>
2022-05-20 15:23:19 +08:00
Rhett Ying 53835bdb75 [Dist][BugFix] enable sampling on bipartite (#4014)
* [Dist][BugFix] enable sampling on bipartite

* add comments for tests
2022-05-18 10:14:54 +08:00
Mufei Li de5543e3db Update functional.py (#4015) 2022-05-17 14:14:04 +08:00
ndickson-nvidia e0e8736fa0 [Feature] Added floating-point conversion functions to dgl.transforms.functional (#3890)
* * Added half_(), float_(), and double_() functions to DGLHeteroGraph, HeteroNodeDataView, and HeteroEdgeDataView, for converting floating-point tensor data to float16, float32, or float64 precision

* * Extracted out private functions for floating-point type conversion, to reduce code duplication

* * Added test for floating-point data conversion functions, half_(), float_(), and double_()

* * Moved half_(), float_(), and double_() functions from HeteroNodeDataView and HeteroEdgeDataView to Frame class

* * Updated test_float_cast() to use dgl.heterograph instead of dgl.graph

* Added to CONTRIBUTORS.md

* * Changed data type conversion to be deferred until the data is accessed, to avoid redundant conversions of data that isn't used.

* * Addressed issues flagged by linter

* * Worked around a bug in the old version of mxnet that's currently used for DGL testing

* * Only defer Column data type conversion if there is a pending device transfer or index sampling to be done.  This is expected to be the desired behaviour based on discussions of a few use cases, as described in the comments.

* * Moved floating-point feature data conversion functions to dgl.transforms.functional
* Changed them from in-place behaviour to shallow copy (out-of-place) behaviour

* * Fixed linter issues

* * Removed lines that unintentionally added to_half, to_float, and to_double to DGLHeteroGraph
* Moved _init_api line to the end of the file again

* * Removed one of the two leading underscores from Frame.__astype_float, making it not fully private

Co-authored-by: nv-dlasalle <63612878+nv-dlasalle@users.noreply.github.com>
2022-05-16 18:17:15 -07:00
nv-dlasalle 1f2e696080 Prevent users from attempting to pin PyTorch non-contiguous tensors or views only encompassing part of tensor. (#3992)
* Disable pinning non-contiguous memory

* Prevent views from being converted for write

* Fix linting

* Add unit tests

* Improve error message for users

* Switch to pytest function

* exclude mxnet and tensorflow from inplace pinning

* Add skip

* Restrict to pytorch backend

* Use backend to retrieve device

* Fix capitalization in decorator

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-05-16 14:49:36 -07:00