文件历史

提交图

1563 次代码提交

作者 SHA1 备注 提交日期
Rhett-Ying 04dce1e630 [Doc] refine doc and optimize metis part for dgl.reorder() (#3090)
Co-authored-by: Tong He <hetong007@gmail.com>
2021-07-02 20:14:47 +08:00
nv-dlasalle a0390dde93 [Feature] Add dgl.utils.is_sorted_srcdst() (#2685)
* Add dgl.utils.is_sorted_srcdst

* Fix linting issues

* delete blank line

* Specify datatype to index tensor in test

* Force integer conversion

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-07-02 11:29:24 +08:00
Rhett-Ying 95f8ec83b5 [Doc] fix docstring in to_block() (#3081) 2021-07-02 09:45:45 +08:00
Quan (Andy) Gan a97aaa4903 fix (#3076) 2021-06-30 18:27:05 +08:00
Quan (Andy) Gan 7823ae2dbb add TUDataset notice (#3075)
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-06-30 14:22:45 +08:00
Rhett-Ying 4307fe8895 [Feature] Add dgl.reorder() to re-order graph according to specified … (#3063)
* [Feature] Add dgl.reorder() to re-order graph according to specified strategy

* fix unit test failure for metis reorder

* fix unit test failure on mxnet_cpu

* refine unit test for dgl.reorder

* fix unit test failure on mxnet

* fix array_equal error for mxnet unit test

* fix unit test failure for mxnet

* convert metis output to numpy array explicitly

Co-authored-by: Tong He <hetong007@gmail.com>
2021-06-30 13:29:08 +08:00
Tong He 789b03f433 [Doc] Add KNN Benchmark Results (#3055)
* add knn benchmark result

* update
2021-06-28 16:13:56 +08:00
Quan (Andy) Gan 427a5a96e0 [Doc] Update NodeDataLoader and EdgeDataLoader for GPU-based neighbor sampling (#3046)
* update docstrings and tidy code

* add docs

* address comments

* Update __init__.py

* address comments
2021-06-25 10:46:21 +08:00
Quan (Andy) Gan acd21a6d60 [Feature] Support direct creation from CSR and CSC (#3045)
* csr and csc creation

* fix

* fix

* fixes to adj transpose

* fine

* raise error if indptr did not match number of nodes

* fix

* huh?

* oh

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-06-25 10:05:47 +08:00
xiang song(charlie.song) 2f7ca41459 [Bug fix] Use shared memory for grad sync when NCCL is not avaliable as PyTorch distributed backend. (#3034)
* Use shared memory for grad sync when NCCL is not avaliable as PyTorch distributed backend.

Fix small bugs and update unitests

* Fix bug

* update test

* update test

* Fix unitest

* Fix unitest

* Fix test

* Fix

* simple update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-24-212.ec2.internal>
2021-06-24 12:06:54 +08:00
Qidong Su e56bbafd25 [Feature] Biased Neighbor Sampling (#2987)
* 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

* update

* update

* update

* merge

* doc

* doc

* lint

* fix

* more tests

* doc

* fix

* fix

* update

* update

* update

* fix

* fix

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-06-23 17:44:51 +08:00
Tomohiro Endo 5961c14026 [Doc] EdgeWeightNorm Fix doc (#3051)
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-06-23 15:49:31 +08:00
Quan (Andy) Gan e667545da5 [Feature] Node2vec (#2992)
* add seal example

* 1. add paper infomation in examples/README
2. adjust codes
3. option test

* use latest `to_simple` to replace coalesce graph function

* remove outdated codes

* remove useless comment

* Node2vec
1.implement node2vec random walk c++ op
2.implement node2vec model
3.implement node2vec example

* add CMakeLists file modify

* refine c++ codes

* refine c++ codes

* add missing whitespace

* refine python codes

* add codes

* add node2vec_impl.h

* fix codes

* fix code style problem

* fixes

* remove

* lots of changes

* add benchmark

* fixes

Co-authored-by: smilexuhc <smile.xuhc@gmail.com>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-06-23 14:47:56 +08:00
nv-dlasalle 7359481497 [Feature][GPU] Add function for setting weights of a sparse embedding on multiple GPUs. (#3047)
* add unit test

* Extend NDArrayPartition object

* Add method for setting embedding, and improve documentation

* Sync before returning

* Use name unique to sparse embedding class to avoid delete

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-06-22 08:48:12 -07:00
Mufei Li ff519f98c3 [API] Standardize Subgraph APIs (#2929)
* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Fix

* Update

* Fix subgraph tests

* Capture stdout for distributed test

* Capture stdout for distributed test

* Update

* Update

* Update

* Update subgraph.cc

Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-17.us-west-2.compute.internal>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-06-21 19:53:37 +08:00
Kay Liu 9706eaa895 [Feature] add permission information and fix import problems (#3036)
* [Feature] add positive negative statistics

* [Feature] add permission information and fix import problem

* fix backend incompatible problem

* modify random split to remove sklearn usage

* modify file read to remove pandas usage

* add datasets into doc

* add random seed in data splitting

* add dataset unit test

* usage permission information update

Co-authored-by: zhjwy9343 <6593865@qq.com>
2021-06-21 11:55:15 +08:00
zhjwy9343 55e7796ac5 Revert "[Feature] add permission information and fix import problems (#2998)" (#3029)
This reverts commit cba5b188b5.

Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-06-17 13:58:38 +08:00
Kay Liu cba5b188b5 [Feature] add permission information and fix import problems (#2998)
* [Feature] add positive negative statistics

* [Feature] add permission information and fix import problem

* fix backend incompatible problem

* modify random split to remove sklearn usage

* modify file read to remove pandas usage

* add datasets into doc

Co-authored-by: zhjwy9343 <6593865@qq.com>
2021-06-16 18:24:17 +08:00
Da Zheng aaec3d8a0b [Distributed] Support hierarchical partitioning (#3000)
* add.

* fix.

* fix.

* fix.

* fix.

* add tests.

* support node split and edge split.

* support 1 partition.

* add tests.

* fix.

* fix test.

* use hierarchical partition.

* add check.

Co-authored-by: Zheng <dzzhen@3c22fba32af5.ant.amazon.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-22-57.us-west-2.compute.internal>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-71-112.ec2.internal>
2021-06-16 16:58:23 +08:00
nv-dlasalle 8932285652 [bugfix] Fix sparse_optim when the state is stored on the CPU (fixes #2760) (#3013)
* Fix sparse optimizer to wait on copies to the CPU

* Fix linting

* Fix typo

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-06-15 11:37:32 -07:00
Leonardo Castorina 63aed58204 [Doc] Fix typo in DGL base dataset class (#2977) #3017
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-06-15 16:15:52 +08:00
Tianqi Zhang (张天启) 64d0f3f355 [Feature] Add NN-descent support for the KNN graph function in dgl (#2941)
* add bruteforce impl

* add nn descent implementation

* change doc-string

* remove redundant func

* use local rng for cuda

* fix lint

* fix lint

* fix bug

* fix bug

* wrap nndescent_knn_graph into knn

* fix lint

* change function names

* add comment for dist funcs

* let the compiler do the unrolling

* use better blocksize setting

* remove redundant line

* check the return of the cub calls

Co-authored-by: Tong He <hetong007@gmail.com>
2021-06-15 14:25:02 +08:00
Jinjing Zhou a303f07819 fix #2952 (#3010) 2021-06-14 15:09:14 +08:00
Jinjing Zhou 17141dd372 [Fix] Fix to_homo for graph with zero nodes ntype (#3011)
* fix #2870

* lint

* fix
2021-06-14 14:34:13 +08:00
nv-dlasalle 8b64ae59b8 [Performance] Perform to_block on the GPU when the dataloader is created with a GPU device. (#3016)
* add output device for dataloading

* Update dataloader

* Get sampler device from dataloader

* Fix line length

* Update examples

* Fix to_block GPU for empty relation types

* Handle the case where the DistGraph has None for the underlying graph

Co-authored-by: Da Zheng <zhengda1936@gmail.com>
2021-06-13 18:51:00 +08:00
Jinjing Zhou 2570d412f9 [NN] Add fast path for GateGCNConv when it has only one edge type (#2994)
* fix gatedgcn

* fix lint
2021-06-12 01:13:18 +08:00
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