文件历史

提交图

879 次代码提交

作者 SHA1 备注 提交日期
nv-dlasalle 17d604b5c7 [Feature] Allow using NCCL for communication in dgl.NodeEmbedding and dgl.SparseOptimizer (#2824)
* Split from NCCL PR

* Fix type in comment

* Expand documentation for sparse_all_to_all_push

* Restore previous behavior in example

* Re-work optimizer to use NCCL based on gradient location

* Allow for running with embedding on CPU but using NCCL for gradient exchange

* Optimize single partition case

* Fix pylint errors

* Add missing include

* fix gradient indexing

* Fix line continuation

* Migrate 'first_step'

* Skip tests without enough GPUs to run NCCL

* Improve empty tensor handling for pytorch 1.5

* Fix indentation

* Allow multiple NCCL communicator to coexist

* Improve handling of empty message

* Update python/dgl/nn/pytorch/sparse_emb.py

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>

* Update python/dgl/nn/pytorch/sparse_emb.py

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>

* Keepy empty tensor dimensionaless

* th.empty -> th.tensor

* Preserve shape for empty non-zero dimension tensors

* Use shared state, when embedding is shared

* Add support for gathering an embedding

* Fix typo

* Fix more typos

* Fix backend call

* Use NodeDataLoader to take advantage of ddp

* Update training script to share memory

* Only squeeze last dimension

* Better handle empty message

* Keep embedding on the target device GPU if dgl_sparse if false in RGCN example

* Fix typo in comment

* Add asserts

* Improve documentation in example

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-06-10 21:19:00 -07:00
Mufei Li 5be937a7fb [Kernel] Slicing Batched Graphs (#2965)
* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Update

* Update

* Add files via upload

* Add files via upload

* Update

* Lint

* Add files via upload

* Lint

* Update

* Update

* Update

* Update

* Update

* Lint Fix

* Lint

Co-authored-by: Ubuntu <ubuntu@ip-172-31-12-161.us-west-2.compute.internal>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-06-10 12:07:44 +08:00
Quan (Andy) Gan f91a97d067 [Dataloader] Fix compatibility of DistributedSampler for older PyTorch versions (#2997)
* fix compatibility

* fix

* lint
2021-06-09 20:14:26 +08:00
Quan (Andy) Gan a7fe461c1c [Doc] Single-machine Multi-GPU node classification tutorial (#2976)
* multi-GPU node classification tutorial

* Update 2_node_classification.py

* fixes

* elaborate a bit more

* address comments

* address comments
2021-06-08 10:28:02 +08:00
Tong He 972a9f1323 [Doc] Re-organize the code for dgl.geometry, and expose it in the doc (#2982)
* reorg and expose dgl.geometry

* fix lint

* fix test

* fix
2021-06-07 11:19:39 +08:00
Kay Liu 849cbec6ee [Feature] add positive negative statistics (#2984)
Co-authored-by: zhjwy9343 <6593865@qq.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-06-05 15:48:11 +08:00
Quan (Andy) Gan 2df4a95f3e [Feature] Make to_heterogeneous(to_homogeneous(hg)) return hg (#2958)
* make to_heterogeneous and to_homogeneous invertible

* docstring

* oops

Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-06-03 18:50:18 +08:00
Da Zheng 7a816f4743 [Doc] Minor fix on the distributed training doc. (#2968)
Co-authored-by: Zheng <dzzhen@3c22fba32af5.ant.amazon.com>
2021-06-02 18:46:52 +08:00
Soji Adeshina 0e964ea566 increase timeout for dgl.nn.NodeEmbedding TCPStore get/wait to 10 minutes (#2967)
Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-06-02 14:56:42 +08:00
Qidong Su b8fe2b4837 [Feature][Sampler] Sort CSR by tag (#1664)
* update

* update

* update

* update

* lint

* lint

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* lint

* update

* clone

* update

* update

* update

* update

* replace idarray with ndarray

* refactor cpp part

* refactor python part

* debug

* refactor interface

* test and doc

* lint and test

* lint

* fix

* fix

* fix

* const

* doc

* fix

* fix

* fix

* fix

* fix & doc

* fix

* fix

* fix

* fix

* fix

* fix

* update

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-06-01 23:33:56 +08:00
Quan (Andy) Gan fcfe52aee5 fix residual (#2962) 2021-06-01 13:50:39 +08:00
Jinjing Zhou 2ad7a9e9dd [Fix] Fix #2808 (#2917)
* Fix #2808

* fix

* fix

* fix

* fix

* fix

* fix

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-05-31 19:05:58 +08:00
Kay Liu b8b0fd22b2 [Feature] add two fraud datasets (#2908)
* add two fraud dataset

* add comments and modify to heterogenous graph

* modify the node name based on datasets

* add assertion message

Co-authored-by: zhjwy9343 <6593865@qq.com>
2021-05-28 15:45:44 +08:00
Kay Liu 64d2a2aff7 [Feature] fix #2876, add two fake news datasets (#2939)
* [Feature] fix #2876, add two fake news datasets

* add name assertion

* add assertion message

Co-authored-by: zhjwy9343 <6593865@qq.com>
2021-05-28 14:29:26 +08:00
Da Zheng 18dbaebebc [Distributed] Specify the graph format for distributed training (#2948)
* explicitly set the graph format.

* fix.

* fix.

* fix launch script.

* fix readme.

Co-authored-by: Zheng <dzzhen@3c22fba32af5.ant.amazon.com>
Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-71-112.ec2.internal>
2021-05-26 18:09:30 +08:00
nv-dlasalle ae8dbe6d3c [Feature][Performance] Implement NCCL wrapper for communicating NodeEmbeddings and sparse gradients. (#2825)
* Split NCCL wrapper from sparse optimizer and sparse embedding

* Add more unit tests for single node nccl

* Fix unit test for tf

* Switch to device histogram

* Fix histgram issues

* Finish migration to histogram

* Handle cases with zero send/recieve data

* Start on partition object

* Get compiling

* Updates

* Add unit tests

* Switch to partition object

* Fix linting issues

* Rename partition file

* Add python doc

* Fix python assert and finish doxygen comments

* Remove stubs for range based partition to satisfy pylint

* Wrap unit test in GPU only

* Wrap explicit cuda call in ifdef

* Merge with partition.py

* update docstrings

* Cleanup partition_op

* Add Workspace object

* Switch to using workspace object

* Move last remainder based function out of nccl_api

* Add error messages

* Update docs with examples

* Fix linting erros

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-05-20 10:58:17 -07:00
Tianqi Zhang (张天启) 5d7e80f413 [Feature] Add bruteforce implementation for KNN with O(Nk) space complexity (#2892)
* add bruteforce impl

* add support for bruteforce-sharemem

* modify python API

* add tests

* change file path

* change python API

* fix lint

* fix test

* also check worst_dist in the last few dim

* use heap and early-stop on CPU

* fix lint

* fix lint

* add device check

* use cuda function to determine max shared mem

* use cuda to determine block info

* add memory free for tmp var

* update doc-string and add dist option

* fix lint

* add more tests

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-05-19 18:27:43 +08:00
Da Zheng 6e7f19f27b [Distributed] add distributed in-degree and out-degree. (#2918)
* add distributed in-degree and out-degree.

* update comments.

* fix a bug.

* add tests.

* add tests.

* fix a bug.

* fix docstring.

* update doc.

* fix

* fix.

Co-authored-by: Zheng <dzzhen@3c22fba32af5.ant.amazon.com>
Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-05-18 19:46:09 +08:00
V.E 50492d56a8 Fixing issue #2921 (#2922)
* fixing #2921

* fixing #2921
2021-05-18 09:54:38 +08:00
Quan (Andy) Gan 657c220de7 [Feature] Python interface for adjacency matrix summation and multiplication (#2893)
* test commit

* fixes

* oops

* add docs

* lint

* why does it say I have a trailing whitespace

* oh ok

* fixes

* why there's an invalid argument error

* address comments

* fix

* address comments
2021-05-17 19:47:02 +08:00
Quan (Andy) Gan 7c7113f660 add use_ddp to dataloaders (#2911) 2021-05-17 15:46:02 +08:00
kyawlinoo b03077b60d [NN] GCNII model added <https://arxiv.org/pdf/2007.02133.pdf> (#2874)
* Auto stash before rebase of "origin/pytorch-nn-working"

GCNII model added

* linting

* linting

* lint

* Frequency Adaptive gcn init comit

* Revert "Frequency Adaptive gcn init comit"

This reverts commit 86a80586ac0040497c1edfa0e80df719992dcc4a.

* Update python/dgl/nn/pytorch/conv/gcn2conv.py

modified docstring

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>

* added beta formula and changed param name

* fix docstring

* lint

* white space lint

* update docstring

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>

* docstring formula update

* added gcn2

* added GCN2Conv

* Update nn.pytorch.rst

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-05-17 10:25:59 +08:00
Secbone ac1536cf92 [Feature] add udf support for cross_reducer (#2891)
* add: udf support for `cross_reducer`

* update: code lint

* update: reducer without stack

* docs: add docs for udf cross_reducer

* chore: fix code lint

* docs: update multi_update_all docstring

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>

* docs: update reduce_dict_data docstring

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-05-15 14:00:37 +08:00
Quan (Andy) Gan 9983107384 [Feature] Support multidimensional features for GAT (#2912)
* support multidimensional features for GAT

* docstring

* lint

* fix
2021-05-15 02:47:23 +08:00
Quan (Andy) Gan caa6d6072c [Feature] Replacing thread_wrapped_func with minimal mp.Process wrapper (#2905)
* standardizing thread_wrapped_func

* lints

* Update __init__.py
2021-05-14 11:34:49 +08:00
chwan-rice e156331b0e return a list of ntypes/etypes (#2742)
Co-authored-by: Da Zheng <zhengda1936@gmail.com>
2021-05-13 10:42:50 +08:00
Quan (Andy) Gan 103444c58f Remove __len__ method from DGLGraph (#2902)
* Update heterograph.py

* remove unit tests

* replace tutorial
2021-05-11 14:06:18 +08:00
Quan (Andy) Gan 70695ff8f8 [Model] Training GraphSAGE with PyTorch Lightning (#2878)
* pytorch lightning initial examples

* revert most changes in dataloader to favor #2886.

* address comments
2021-05-11 11:28:13 +08:00
YYY c18f957d0e [Model] add implementation of twirls (#2770)
* add implementation of twirls

* format the code

* fix some format error, and ignore others

* fix format errors

* fix format errors

* expose unfolding & attention

* Update nn.pytorch.rst

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-05-11 09:58:48 +08:00
Quan (Andy) Gan 2a3a9a0011 [Bugfix] to() method ignores PyTorch default CUDA device (#2897) 2021-05-08 13:23:30 +08:00
Justus Schock bfef789ea1 [Dataloading] Make loader iters iterator (#2886)
* Make loader items iterator

* Update test_dataloader.py

* Update __init__.py

* Update test_dataloader.py

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-05-07 10:15:49 +08:00
Armin Stepanjan fbfcf1a8cc Doc: adapt send_and_recv example (#2822)
* adapt send_and_recv example

* lint fix

* Change title and example order

* Update heterograph.py

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-05-07 09:44:11 +08:00
milesial 241b60d489 [Feature][Performance] Accelerate kNN on GPU (#2868)
* topk kNN accelerated on GPU

* Fix src offset

* Fix trailing whitespace

* Update segmented kNN

* Fix src / dst mixup

* Update kNN docstrings

* Fixed lint

Co-authored-by: Tong He <hetong007@gmail.com>
2021-05-06 14:14:09 +08:00
xiang song(charlie.song) 975eb8fc5d [Distributed] Distributed node embedding and sparse optimizer (#2733)
* Draft for sparse emb

* add some notes

* Fix

* Add sparse optim for dist pytorch

* Update test

* Fix

* upd

* upd

* Fix

* Fix

* Fix bug

* add transductive exmpale

* Fix example

* Some fix

* Upd

* Fix lint

* lint

* lint

* lint

* upd

* Fix lint

* lint

* upd

* remove dead import

* update

* lint

* update unitest

* update example

* Add adam optimizer

* Add unitest and update data

* upd

* upd

* upd

* Fix docstring and fix some bug in example code

* Update rgcn readme

Co-authored-by: Ubuntu <ubuntu@ip-172-31-57-25.ec2.internal>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-24-210.ec2.internal>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-2-66.ec2.internal>
2021-05-03 08:37:40 +08:00
Israt Nisa ab2bd1f13d [Feature] Add cuda support for Sparse Matrix multiplication, summation and masking (#2782)
* init cuda support

* cuSPARSE err

* passed unittest for csr_mm/SpGEMM. int64 not supported

* Debugging cuSPARSE error 3

* csrgeam only supports int32?

* disabling int64 for cuda

* refactor and add CSRMask

* lint

* oops

* remove todo

* rewrite CSRMask with CSRGetData

* lint

* fix test

* address comments

* lint

* fix

* addresses comments and rename BUG_ON

Co-authored-by: Israt Nisa <nisisrat@amazon.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-30-71.ec2.internal>
Co-authored-by: Quan Gan <coin2028@hotmail.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-04-27 16:06:35 +08:00
Mufei Li e18c2ab408 [NN] Fix GATConv for Broadcasting with Residual Connections (#2867)
* Update

* update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-59-108.us-west-2.compute.internal>
2021-04-27 14:36:06 +08:00
Da Zheng e7046f1e0e [Distributed] Fix a bug in graph partition. (#2869)
* update distributed training doc.

* explain data split.

* fix message passing.

* id mapping.

* fix.

* test data reshuffling.

* fix a bug.

* fix test.

* Revert "fix."

This reverts commit 2d025e9e1a5c05c3da9b803a035a788ced59bd77.

* Revert "id mapping."

This reverts commit 2a6a93ceb81fbdff86e6e9e5a58e1ace1e9d9882.

* Revert "fix message passing."

This reverts commit ed8a86bf2b015e5e4f64ba160e81b207ad2a1d65.

* Revert "explain data split."

This reverts commit 4338ddf8a336014cf92d4cb9a1db02b9badc0e55.

* Revert "update distributed training doc."

This reverts commit dda1c35c44536934c19715534f01f832afda6ad2.

* add more tests.

* fix.

* fix.

* fix.

Co-authored-by: Zheng <dzzhen@3c22fba32af5.ant.amazon.com>
Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-04-26 18:17:16 +08:00
Quan (Andy) Gan 1fe0860750 [Bugfix] Fixes #2844 (#2847)
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-04-25 18:12:17 +08:00
xiang song(charlie.song) c37e036432 [Bug Fix] Fix sparse opt bug (#2859)
* Fix #2856

* upd

* Fix unitest

* upd

* upd

* upd

* Fix

Co-authored-by: Ubuntu <ubuntu@ip-172-31-57-25.ec2.internal>
2021-04-25 13:40:21 +08:00
Da Zheng d76af4d4c1 [Distributed] Return the ID mapping in graph partitioning. (#2857)
* return mapping.

* support heterogeneous graph.

* more test.

* fix lint.

* fix for diff backends.

* fix.

* fix.

Co-authored-by: Zheng <dzzhen@3c22fba32af5.ant.amazon.com>
Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-04-22 17:51:42 +08:00
nv-dlasalle bbebde4660 [Performance] Track sorted status of COO from creation (#2645)
* Add row/col sorted flags

* improve sorting paths

* Remove print statement

* Keep track of sorted matrices

* Remove sort check in to_block

* Improve CPU sorted COO->CSR

* Handle the zero edge case

* Remove omp default clause to work with MSVC

* Update comments on sorted COO->CSR cpu implementatoin

* Expose sorted to python interface

* Make check_sorted default to false for dgl.graph()

* remove check sorted; add utests

* remove check_sorted flag

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-04-16 10:30:07 +08:00
nv-dlasalle e70138bbe4 [Performance][GPU] Enable GPU uniform edge sampling (#2716)
* Start on uniform GPU sampling

* Save more work

* Get cu file compiling

* Update sampling

* More changes

* Get GPU sampling for uniform probabilities solved

* Fix batch tensor migration

* Fix

* update kernels

* expand blocking

* Undo testing change

* Cut down on sampling overhead

* Fix replacement

* Update unit tests

* Add option to gpu sample in graphsage

* Copy only csc to gpu

* Add ogbn support

* Fix linting

* Remove nvtx from sample

* Improve documentation and error checking

* Expand documentation

* Update assert checking

* delete extra space

* Use standard dataloader when dataset is a dictionary

* ogb -> ogbn

* Fix edge selection determinism

* Fix typos

* Remove nvtx

* Add comment for self.fanout_arrays and assert

* Fix linting

* Migrate to scalarbatcher

* Fix indentation

* Fix batcher

* Fix indexing

* Only use databatcher for GPU

* Convert to DGL NDArray to PyTorch Tensor

* Add optimization for PyTorch's F.tensor() for list of GPU tensors

Co-authored-by: Da Zheng <zhengda1936@gmail.com>
2021-04-14 18:55:09 -07:00
Da Zheng de5e8e2392 [Distributed] Fix a bug for graphs without node/edge data. (#2838)
* fix.

* test distributed graph without node/edge data.

* remove some tests.

* fix lint
2021-04-12 22:35:01 -07:00
Tianqi Zhang (张天启) e83d0a8007 [Feature] Add kd-tree implementation (CPU) for kNN (#2767)
* add submodule nanoflann

* finish python API for knn

* finish ndarray adaptor

* finish cpu-kdtree version of knn

* use openmp

* add endline

* upt

* upt

* fix format and code style

* upt

* add warning for gpu-cpu copy

* avoid contiguous copy

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: Tong He <hetong007@gmail.com>
2021-04-09 17:39:34 +08:00
Tonny-Gu 0fce09074d [Distributed] Bind to the correct NIC (#2798)
Co-authored-by: Da Zheng <zhengda1936@gmail.com>
2021-04-08 17:56:30 -07:00
Da Zheng bfbbefa793 [Distributed] Fix a bug in multiprocessing sampling. (#2826)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-73-81.ec2.internal>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-04-08 01:29:33 -07:00
Quan (Andy) Gan 48b9ecd201 Fix discrepancy in dgl.dataloading.EdgeDataLoader (#2819)
* fix discrepancy

* address comments
2021-04-07 16:08:14 +08:00
Quan (Andy) Gan 3301bd0bcc bump nightly to 0.7 (#2814) 2021-04-06 13:51:26 +08:00
Quan (Andy) Gan cfe6e70b7a RGAT baseline for OGB-LSC node classification challenge (#2810)
* RGAT baseline

* update links (data.dgl.ai hasn't refreshed yet)

* nvm still use dgl.ai domain

* descriptions

* actually it took less

* address comments

* stop worrying about cache

* update links

* oops
2021-04-05 18:21:18 +08:00
Xiangkun Hu b49cd0952f [Bugfix] Fix feature type of 'ENZYMES' in TUDataset (#2800)
* PPIDataset

* Revert "PPIDataset"

This reverts commit 264bd0c960cfa698a7bb946dad132bf52c2d0c8a.

* Hide implementations that may cause confusions to the user

* fix number of classes in Amazon Cobuy datasets

* add four papers

* fix feature type of TU dataset

* fix readme

* remove commented codes

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-04-01 14:36:55 +08:00