提交

提交图

3215 次代码提交

作者 SHA1 备注 提交日期
Rhett Ying 8d3c58202a [CI] upgrade python version to 3.7.0 (#4406)
* [CI] upgrade python version to 3.7.0

* do not upgrade for mxnet cpu due to seg fault

* fix test failure for mxnet
2022-08-17 08:02:44 +00:00
Rhett Ying cf4727a9d9 [CI] upgrade python version to 3.7.0 (#4406)
* [CI] upgrade python version to 3.7.0

* do not upgrade for mxnet cpu due to seg fault

* fix test failure for mxnet
2022-08-17 15:28:34 +08:00
Minjie Wang 3bcb268a36 [Doc] Update distributed chapter according to new pipeline (#4275)
* dist index chapter

* preproc chapter

* rst

* tools page

* partition chapter

* rst

* hetero chapter

* 7.1 step1

* add parmetis back

* changed based on feedback

* address comments
2022-08-17 13:30:04 +08:00
Rhett Ying 39987bc599 [Feature] enable graph partition book support canonical etypes (#4343)
* [Feature] enable graph partition book support canonical etypes

* fix lint

* fix lint

* add todo

* refine according to review comments

* fix lint

* refine naming

* revert PartitionPolicy __init__

* refine docstring

* fix doc string
2022-08-16 11:52:02 +08:00
Xin Yao 3685000aa4 [Bugfix] Fix pinning empty tensors and graphs (#4393) 2022-08-15 16:18:04 +08:00
Ereboas 49c8179548 [Example] NGNN for ogbl (#4328)
* NGNN for ogbl

* modify doc organization.

* merge similar parts

* 1st approving review.

* minor changes

* Remove the "Usage" section.

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-08-13 19:11:45 +08:00
Xin Yao 2523bc7a0b [Performance] Improve the performance of SpMMCsr by reconfiguration (#4363)
* Change CUDA_MAX_NUM_THREADS to 256

* change the configuration of grid
2022-08-12 17:27:18 +08:00
Minjie Wang 18d89b5df6 Revert "[Dist] New distributed data preparation pipeline (#4386)" (#4391)
This reverts commit 71ce174951.
2022-08-12 13:51:06 +08:00
Minjie Wang 71ce174951 [Dist] New distributed data preparation pipeline (#4386)
* code changes for bug fixes identified during mag_lsc dataset (#4187)

* code changes for bug fixes identified during mag_lsc dataset

1. Changed from call torch.Tensor() to torch.from_numpy() to address memory corruption issues when creating large tensors. Tricky thing is this works correctly for small tensors.
2. Changed dgl.graph() function call to include 'num_nodes" argument to specifically mention all the nodes in  a graph partition.

* Update convert_partition.py

Moving the changes to the function "create_metadata_json" function to the "multiple-file-format" support, where this change is more appropriate. Since multiple machine testing was done with these code changes.

* Addressing review comments.

Removed space as suggested at the end of the line

* Revert "Revert "[Distributed Training Pipeline] Initial implementation of Distributed data processing step in the Dis… (#3926)" (#4037)"

This reverts commit 7c598aac6c.

* Added code to support multiple-file-support feature and removed singl… (#4188)

* Added code to support multiple-file-support feature and removed single-file-support code

1. Added code to read dataset in multiple-file-format
2. Removed code for single-file format

* added files missing in the previous commit

This commit includes dataset_utils.py, which reads the dataset in multiple-file-format, gloo_wrapper function calls to support exchanging dictionaries as objects and helper functions in utils.py

* Update convert_partition.py

Updated function call "create_metadata_json" file to include partition_id so that each rank only creates its own metadata object and later on these are accumulated on rank-0 to create graph-level metadata json file.

* addressing code review comments during the CI process

code changes resulting from the code review comments received during the CI process.

* Code reorganization

Addressing CI comments and code reorganization for easier understanding.

* Removed commented out line

removed commented out line.

* Support new format for multi-file support in distributed partitioning. (#4217)

* Code changes for the following

1. Generating node data at each process
2. Reading csv files using pyarrow
3. feature complete code.

* Removed some typo's because of which unit tests were failing

1. Change the file name to correct file name when loading edges from file
2. When storing node-features after shuffling, use the correct key to store the global-nids of node features which are received after transmitted.

* Code changes to address CI comments by reviewers

1. Removed some redundant code and added text in the doc-strings to describe the functionality of some functions.
2 function signatures and invocations now match w.r.t argument list
3. Added detailed description of the metadata json structure so that the users understand the the type of information present in this file and how it is used through out the code.

* Addressing code review comments

1. Addressed all the CI comments and some of the changes include simplifying the code related to the concatenation of lists and enhancing the docstrings of functions which are changed in this process.

* Update docstring's of two functions appropriately in response to code review comments

Removed "todo" from the docstring of the gen_nodedata function.
Added "todo" to the gen_dist_partitions function when node-id to partition-id's are read for the first time.

Removed 'num-node-weights' from the docstring for the get_dataset function and added schema_map docstring to the argument list.

* [Distributed] Change for the new input format for distributed partitioning (#4273)

* Code changes to address the updated file format support for massively large graphs.

1. Updated the docstring for the starting function 'gen_dist_partitions" to describe the newly proposed file format for input dataset.
2. Code which was dependent on the structure of the old-metadata json object has been updated to read from the newly proposed metadata file.
3. Fixed some errors when appropriate functions were invoked and the calling function expects return values from the invoked furnction.
4. This modified code has been tested on "mag" dataset using 4-way partitions and verified the results

* Code changes to address the CI review comments

1. Improved docstrings for some functions.
2. Added a new function in the utils.py to compute the id ranges and this is used in multiple places.

* Added TODO to indicate the redundant data structure.

Because of the new file format changes, one of the dictionaries (node_feature_tids, node_tids) will be redundant. Added TODO text so that this will be removed in the next iteration of code changes.

* [Distributed] use alltoall fix to bypass gloo - alltoallv bug in distributed partitioning (#4311)

* Alltoall Fix to bypass gloo - alltoallv bug which is preventing further testing

1. Replaced alltoallv gloo wrapper call with alltoall message.
2. All the messages are padded to be of same length
3. Receiving side unpads the messages and continues processing.

* Code changes to address CI comments

1. Removed unused functions from gloo_wrapper.py
2. Changed the function signature of alltoallv_cpu_data as suggested.
3. Added docstring to include more description of the functionality inside alltoallv_cpu_data. Included more asserts to validate the assumptions.

* Changed the function name appropriately

Changed the function name from "alltoallv_cpu_data" to alltoallv_cpu which I believe is appropriate because underlying functionality is providing alltoallv which is basically alltoall_cpu + padding

* Added code and text to address the review comments.

1. Changed the function name to indicate the local use of this function.
2. Changed docstring to indicate the assumptions made by alltoallv_cpu function.

* Removed unused function from import statement

Removed unused/removed function from import statement.

* [Distributed] reduce memory consumption in distributed graph partitioning. (#4338)

* Fix for node_subgraph function, which seems to generate segmentation fault for very large partitions

1. Removed three graph dgl objects and we create the final dgl object directly by maintaining the following constraints
a) nodes are reordered so that local nodes are placed in the beginning of the nodes list compared to non-local nodes.
b)Edges order are maintained as passed into this function.
c) src/dst end points are mapped to target values based on the reshuffle'd nodes order.

* Code changes addressing CI comments for this PR

1. Used Da's suggested map to map nodes from old to new order.
This is much simpler and mem. efficient.

* Addressing CI Comments.

1. Reduced the amount of documentation to reflect the actual implementation.
2. named the mapping object appropriately.

* [Distributed] Graph chunking UX (#4365)

* first commit

* update

* huh

* fix

* update

* revert core

* fix

* update

* rewrite

* oops

* address comments

* add graph name

* address comments

* remove sample metadata file

* address comments

* fix

* remove

* add docs

* Adding launch script and wrapper script to trigger distributed graph … (#4276)

* Adding launch script and wrapper script to trigger distributed graph partitioning pipeline as defined in the UX document

1. dispatch_data.py is a wrapper script which builds the command and triggers the distributed partitioning pipeline
2. distgraphlaunch.py is the main python script which triggers the pipeline and to simplify its usage dispatch_data.py is included as a wrapper script around it.

* Added code to auto-detect python version and retrieve some parameters from the input metadata json file

1. Auto detect python version
2. Read the metadata json file and extract some parameters to pass to the user defined command which is used to trigger the pipeline.

* Updated the json file name to metadata.json file per UX documentation

1. Renamed json file name per UX documentation.

* address comments

* fix

* fix doc

* use unbuffered logging to cure anxiety

* cure more anxiety

* Update tools/dispatch_data.py

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

* oops

Co-authored-by: Quan Gan <coin2028@hotmail.com>
Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>

Co-authored-by: kylasa <kylasa@gmail.com>
Co-authored-by: Da Zheng <zhengda1936@gmail.com>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-08-11 18:06:12 +08:00
Minjie Wang e9b624fe22 Merge branch 'master' into dist_part 2022-08-11 16:07:41 +08:00
kylasa 8086d1edde Adding launch script and wrapper script to trigger distributed graph … (#4276)
* Adding launch script and wrapper script to trigger distributed graph partitioning pipeline as defined in the UX document

1. dispatch_data.py is a wrapper script which builds the command and triggers the distributed partitioning pipeline
2. distgraphlaunch.py is the main python script which triggers the pipeline and to simplify its usage dispatch_data.py is included as a wrapper script around it.

* Added code to auto-detect python version and retrieve some parameters from the input metadata json file

1. Auto detect python version
2. Read the metadata json file and extract some parameters to pass to the user defined command which is used to trigger the pipeline.

* Updated the json file name to metadata.json file per UX documentation

1. Renamed json file name per UX documentation.

* address comments

* fix

* fix doc

* use unbuffered logging to cure anxiety

* cure more anxiety

* Update tools/dispatch_data.py

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

* oops

Co-authored-by: Quan Gan <coin2028@hotmail.com>
Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>
2022-08-11 15:46:38 +08:00
Quan (Andy) Gan 067cd74420 [Distributed] Graph chunking UX (#4365)
* first commit

* update

* huh

* fix

* update

* revert core

* fix

* update

* rewrite

* oops

* address comments

* add graph name

* address comments

* remove sample metadata file

* address comments

* fix

* remove

* add docs
2022-08-11 13:49:32 +08:00
YJ-Zhao a88e7f7e28 [Example]rgcn-ogbn-mag (#4331)
* rgcn-ogbn-mag

* Add link in README.md

* correct code-format,add the reset_parameters function to the HeteroEmbedding module

* add the annotation in hetero.py

* add a unit test

* modify format

* Update

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-50-143.us-west-2.compute.internal>
2022-08-10 20:12:31 +08:00
Chang Liu 919b783875 [Example][Bugfix] Fix infograph example (#4298)
* Fix infograph example

* Update

* Revert the changes and update Doc

* Update

* Split lines to pass CI-lint

* Update

* Update

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-08-10 17:10:25 +08:00
Minjie Wang 14a77c8646 Update issue templates 2022-08-10 11:59:44 +08:00
Minjie Wang 91f4eee06e Update issue templates 2022-08-10 11:58:59 +08:00
Xin Yao 182e1ad553 [Bug] Fix broken static_assert (#4342) 2022-08-09 16:57:08 +08:00
Quan (Andy) Gan 62c827c81c [Bug] A bunch of fixes in edge_softmax_hetero (#4336)
* bunch of fixes

* Update test_edge_softmax_hetero.py

* Update test_edge_softmax_hetero.py

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-08-09 15:16:48 +08:00
kylasa 60bc0b7692 [Distributed] reduce memory consumption in distributed graph partitioning. (#4338)
* Fix for node_subgraph function, which seems to generate segmentation fault for very large partitions

1. Removed three graph dgl objects and we create the final dgl object directly by maintaining the following constraints
a) nodes are reordered so that local nodes are placed in the beginning of the nodes list compared to non-local nodes.
b)Edges order are maintained as passed into this function.
c) src/dst end points are mapped to target values based on the reshuffle'd nodes order.

* Code changes addressing CI comments for this PR

1. Used Da's suggested map to map nodes from old to new order.
This is much simpler and mem. efficient.

* Addressing CI Comments.

1. Reduced the amount of documentation to reflect the actual implementation.
2. named the mapping object appropriately.
2022-08-07 15:04:53 -07:00
Chang Liu 5ba5106aca [Bugfix] Fix the default value of num_bases in RelGraphConv module (#4321)
* Fix doc and default settings for RelGraphConv

* Add unit test

* Split msg in two lines to pass CI-lint
2022-08-07 16:33:16 +08:00
kylasa c1e01b1d80 [Distributed] use alltoall fix to bypass gloo - alltoallv bug in distributed partitioning (#4311)
* Alltoall Fix to bypass gloo - alltoallv bug which is preventing further testing

1. Replaced alltoallv gloo wrapper call with alltoall message.
2. All the messages are padded to be of same length
3. Receiving side unpads the messages and continues processing.

* Code changes to address CI comments

1. Removed unused functions from gloo_wrapper.py
2. Changed the function signature of alltoallv_cpu_data as suggested.
3. Added docstring to include more description of the functionality inside alltoallv_cpu_data. Included more asserts to validate the assumptions.

* Changed the function name appropriately

Changed the function name from "alltoallv_cpu_data" to alltoallv_cpu which I believe is appropriate because underlying functionality is providing alltoallv which is basically alltoall_cpu + padding

* Added code and text to address the review comments.

1. Changed the function name to indicate the local use of this function.
2. Changed docstring to indicate the assumptions made by alltoallv_cpu function.

* Removed unused function from import statement

Removed unused/removed function from import statement.
2022-08-05 17:04:30 -07:00
Rhett Ying 43ba94ee49 [BugFix] fix etype check in DistGraph.edge_subgraph (#4322) 2022-08-03 11:56:00 +08:00
Xin Yao 463650a772 [Unittest] Improve test_dataloader (#4301)
* test ddp dataloader

* add pure_gpu for edgedataloader

* resolve ddp issue
2022-08-02 10:31:09 +08:00
Rhett Ying 4dd16f5dd8 [BugFix] enable DistGraph.find_edge() works with str or tuple of str (#4319) 2022-08-01 20:47:15 +08:00
Xin Yao 44b6864114 [Feature] Enable UVA for Weighted Samplers (#4314)
* enable use for weighted neighbor sampler and biased random walk

* add unit tests

* fix for mxnet/tf

* fix typo
2022-08-01 17:56:51 +08:00
Chang Liu 9a16a5e03d [Example][Refactor] Refactor GIN example (#4280)
* Refactor GIN example

* Update

* Update README

* Minor update

* README update

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-08-01 13:40:28 +08:00
Rhett Ying d6957c28ff [BugFix] fix incorrect _bias and bias usage (#4310) 2022-07-30 17:40:54 +08:00
Rhett Ying b3242e90b8 [CI] separate distributed tests from torch cpu tests (#4313)
* [CI] separate distributed tests from torch cpu tests

* remove TF related env
2022-07-30 16:32:35 +08:00
Xin Yao 86c81b4e92 [Feature] Add CUDA Weighted Neighborhood Sampling (#4064)
* add weighted sampling without replacement (A-Chao)

* improve Algorithm A-Chao with block-wise prefix sum

* correctly fill out_idxs

* implement weighted sampling with replacement

* small fix

* merge host-side code of weighted/uniform sampling

* enable unit tests for cuda weighted sampling

* move thrust/cub wrapper to the cmake file

* update docs accordingly

* fix linting

* fix linting

* fix unit test

* Bump external CUB/Thrust versions

* Fix code style and update description of algorithm design

* [Feature] GPU support weighted graph neighbor sampling
commit by pengqirong(OPPO)

* merge pengqirong's implementation

* revert the change to cub and thrust

* fix linting

* use DeviceSegmentedSort for better performance

* add more comments

* add necessary notes

* add necessary notes

* resolve some comments

* define THRUST_CUB_WRAPPED_NAMESPACE

* fix doc

Co-authored-by: 彭齐荣 <657017034@qq.com>
2022-07-29 11:08:48 +08:00
Rhett Ying 17f1432ab2 [DistTest] fix incorrect shell if statement (#4304)
* [DistTest] fix incorrect shell if statement

* fix incorrect use of dist.initialize()
2022-07-28 20:14:47 +08:00
Wey Gu ee91863eb0 [Example] Fixed device type in GraphSAGE inference (#4306)
* Fixed device type in inference

* change buffer_device instead
2022-07-28 13:25:09 +08:00
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
Zhuobin Huang 92f87f48c7 [Bugfix] Fixed fatal log output in COO class (#4286)
Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-07-27 13:22:34 +08:00
Rhett Ying 069068aa7d [Log] fix confusing error log in TCPSocket::Bind() (#4299)
* [Log] fix confusing error log in TCPSocket::Bind()

* fix lint
2022-07-27 08:25:42 +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
kylasa 7f8e1cf2ee [Distributed] Change for the new input format for distributed partitioning (#4273)
* Code changes to address the updated file format support for massively large graphs.

1. Updated the docstring for the starting function 'gen_dist_partitions" to describe the newly proposed file format for input dataset.
2. Code which was dependent on the structure of the old-metadata json object has been updated to read from the newly proposed metadata file.
3. Fixed some errors when appropriate functions were invoked and the calling function expects return values from the invoked furnction.
4. This modified code has been tested on "mag" dataset using 4-way partitions and verified the results

* Code changes to address the CI review comments

1. Improved docstrings for some functions.
2. Added a new function in the utils.py to compute the id ranges and this is used in multiple places.

* Added TODO to indicate the redundant data structure.

Because of the new file format changes, one of the dictionaries (node_feature_tids, node_tids) will be redundant. Added TODO text so that this will be removed in the next iteration of code changes.
2022-07-23 09:30:55 -07:00
Chang Liu 6e1be69a84 [Example][Refactor] Refactor GAT example (#4240)
* Refactor gat example

* Add ppi support

* Minor update

* Update

* Update

* Change valid_xxx to val_xxx

* Readme Update

* Update

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-07-22 16:48:46 +08:00
Mufei Li 05d9d4969b Update (#4277)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-53-142.us-west-2.compute.internal>
2022-07-21 13:27:42 +08:00
Tianyue Cao 05aca98d6a [Example] Progressive Sample Selection (PSS). (#4263)
* upload PSS

* upload PSS

* upload PSS

* pss code reformat

* fix bug

* update README

* update train bash

* remove vit

* update README

* delete InfoPlotter

* delete Smooth_AP_loss.py

* update README

* update README

Co-authored-by: Tianjun Xiao <xiaotj1990327@gmail.com>
2022-07-21 08:08:33 +08:00
Serge Panev 5fc1d0c83a [Dist][Test] Add tests for multi-node DistEmbedding (#4256)
Signed-off-by: Serge Panev <spanev@nvidia.com>

Co-authored-by: Rhett Ying <85214957+Rhett-Ying@users.noreply.github.com>
2022-07-20 20:04:26 +08:00
Chang Liu 701b746b82 [Example][Bugfix] graphsage node classification example (#4260)
* Fix node_classification.py

* Minor update

Co-authored-by: nv-dlasalle <63612878+nv-dlasalle@users.noreply.github.com>
2022-07-19 11:28:35 -07:00
Serge Panev 4dc5728af3 [Dist][Test] Improves DistTensor test for num_part id > 2 (#4265)
Signed-off-by: Serge Panev <spanev@nvidia.com>

Co-authored-by: Rhett Ying <85214957+Rhett-Ying@users.noreply.github.com>
2022-07-19 17:53:41 +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
Quan (Andy) Gan 9a7ad16eaf decompose (#4259) 2022-07-15 20:24:12 +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
Xin Yao 79b0a50afc [Unittest][Fix] Several unit tests fixes for Ampere+ and PyTorch 1.12+ (#4213)
* Fix test_csrmm for tensor core

* unset allow tf32 flag

* update test unified tensor

* skip fp16 for CPU
2022-07-14 19:59:57 +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