提交

2455 次代码提交

作者 SHA1 备注 提交日期
Quan Gan d1517f4797 update version 2022-11-03 04:44:24 +00:00
Rhett Ying 0bd6bc80cd [examples]educe memory consumption (#4558) (#4596)
* [examples]educe memory consumption

* reffine help message

* refine
2022-09-20 15:59:41 +08:00
Xin Yao 960092be02 [Feature] Import PyTorch's CUDA stream management (#4503)
* add set_stream

* add .record_stream for NDArray and HeteroGraph

* refactor dgl stream Python APIs

* test record_stream

* add unit test for record stream

* use pytorch's stream

* fix lint

* fix cpu build

* address comments

* address comments

* add record stream tests for dgl.graph

* record frames and update dataloder

* add docstring

* update frame

* add backend check for record_stream

* remove CUDAThreadEntry::stream

* record stream for newly created formats

* fix bug

* fix cpp test

* fix None c_void_p to c_handle
0.9.1
2022-09-16 02:50:27 +00:00
Quan Gan 75d23de415 update conda scripts 2022-09-14 01:56:00 +00:00
Quan Gan 0769122b65 update version 2022-09-14 01:53:10 +00:00
Quan (Andy) Gan 5e67f0adc2 temporarily removing for 0.9.x due to ux changes 2022-09-14 01:48:14 +00:00
Quan Gan 5f60898f30 update branch 2022-09-14 01:48:14 +00:00
Quan Gan 51a43e6b6f update version 2022-09-14 01:48:14 +00:00
Rhett Ying 11532198b6 [CI] only known devs are authorized to trigger CI (#4518)
* [CI] only known devs are authorized to trigger CI

* fix if author is null

* add comments
2022-09-08 15:37:01 +08:00
ndickson-nvidia 684f66b7aa [Feature] Added exclude_self and output_batch to knn graph construction (Issues #4323 #4316) (#4389)
* * Added "exclude_self" and "output_batch" options to knn_graph and segmented_knn_graph
* Updated out-of-date comments on remove_edges and remove_self_loop, since they now preserve batch information

* * Changed defaults on new knn_graph and segmented_knn_graph function parameters, for compatibility; pytorch/test_geometry.py was failing

* * Added test to ensure dgl.remove_self_loop function correctly updates batch information

* * Added new knn_graph and segmented_knn_graph parameters to dgl.nn.KNNGraph and dgl.nn.SegmentedKNNGraph

* * Formatting

* * Oops, I missed the one in segmented_knn_graph when I fixed the similar thing in knn_graph

* * Fixed edge case handling when invalid k specified, since it still needs to be handled consistently for tests to pass
* Fixed context of batch info, since it must match the context of the input position data for remove_self_loop to succeed

* * Fixed batch info resulting from knn_graph when output_batch is true, for case of 3D input tensor, representing multiple segments

* * Added testing of new exclude_self and output_batch parameters on knn_graph and segmented_knn_graph, and their wrappers, KNNGraph and SegmentedKNNGraph, into the test_knn_cuda test

* * Added doc comments for new parameters

* * Added correct handling for uncommon case of k or more coincident points when excluding self edges in knn_graph and segmented_knn_graph
* Added test cases for more than k coincident points

* * Updated doc comments for output_batch parameters for clarity

* * Linter formatting fixes

* * Extracted out common function for test_knn_cpu and test_knn_cuda, to add the new test cases to test_knn_cpu

* * Rewording in doc comments

* * Removed output_batch parameter from knn_graph and segmented_knn_graph, in favour of always setting the batch information, except in knn_graph if x is a 2D tensor

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-09-07 08:35:26 +08:00
Chang Liu 1c9d2a0302 [Feature] Unify the cuda stream used in core library (#4480)
* Use an internal cuda stream for CopyDataFromTo

* small fix white space

* Fix to compile

* Make stream optional in copydata for compile

* fix lint issue

* Update cub functions to use internal stream

* Lint check

* Update CopyTo/CopyFrom/CopyFromTo to use internal stream

* Address comments

* Fix backward CUDA stream

* Avoid overloading CopyFromTo()

* Minor comment update

* Overload copydatafromto in cuda device api

Co-authored-by: xiny <xiny@nvidia.com>
2022-09-06 10:14:55 +08:00
peizhou001 62af41c245 [Bug] Enable turn on/off libxsmm at runtime (#4455)
* enable turn on/off libxsmm at runtime by adding a global config and related API


Co-authored-by: Ubuntu <ubuntu@ip-172-31-19-194.ap-northeast-1.compute.internal>
2022-09-05 17:38:34 +08:00
Israt Nisa 06608f847c [Cleanup] Remove duplicate entries of CUB submodule (issue# 4395) (#4499)
* remove third_part/cub

* remove from third_party

Co-authored-by: Israt Nisa <nisisrat@amazon.com>
Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-09-05 13:23:08 +08:00
nv-dlasalle 806def67a1 [Cleanup] Remove async_transferer (#4505)
* Remove async_transferer

* remove test

* Remove AsyncTransferer

Co-authored-by: Xin Yao <xiny@nvidia.com>
Co-authored-by: Xin Yao <yaox12@outlook.com>
2022-09-05 11:46:06 +08:00
Chang Liu fce9614089 [Example][Refactor] Refactor graphsage multigpu and full-graph example (#4430)
* Add refactors for multi-gpu and full-graph example

* Fix format

* Update

* Update

* Update
2022-09-05 09:05:56 +08:00
Quan (Andy) Gan 2dd06b2152 [Build][Doc] Specify the sphinx version (#4465)
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-09-01 13:52:08 +08:00
Xin Yao 2b76674002 [Feature] Make TensorAdapter Stream Aware (#4472)
* Allocate tensors in DGL's current stream

* make tensoradaptor stream-aware

* replace TAemtpy with cpu allocator

* fix typo

* try fix cpu allocation

* clean header

* redirect AllocDataSpace as well

* resolve comments
2022-08-31 20:09:40 +08:00
Rhett Ying 468c0ca4b4 [BugFix] fix crash due to incorrect dtype in dgl.to_block() (#4487)
* [BugFix] fix crash due to incorrect dtype in dgl.to_block()

* fix test failure in TF
2022-08-31 16:09:46 +08:00
Rhett Ying 86656a6b34 [CI] use https instead of http (#4488) 2022-08-31 14:59:40 +08:00
rudongyu b9290e8b2d [Example] SEAL for OGBL (#4291)
* [Example] SEAL for OGBL

* update index

* update

* fix readme typo

* add seal sampler

* modify set ops

* prefetch

* efficiency test

* update

* optimize

* fix ScatterAdd dtype issue

* update sampler style

* update

Co-authored-by: Quan Gan <coin2028@hotmail.com>
2022-08-31 11:48:07 +08:00
Hongzhi (Steve), Chen ef93518da3 [Refactor] Auto fix view.py. (#4461)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-08-30 18:31:03 +08:00
Hongzhi (Steve), Chen ab0af8146f Clarify the message name, which is 'm'. (#4462)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
Co-authored-by: Rhett Ying <85214957+Rhett-Ying@users.noreply.github.com>
2022-08-30 13:34:54 +08:00
Zhiteng Li 97b2ab53e2 [Example] directional_GSN for ogbg-molpcba (#4405)
* version-1

* version-2

* version-3

* update examples/README

* Update .gitignore

* update performance in README, delete scripts

* 1st approving review

* 2nd approving review

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-08-26 15:37:54 +08:00
Rhett Ying bd311aa68d [doc] fix invalid link in user guide (#4468) 2022-08-25 23:16:44 +08:00
Chang Liu 40a2f3c760 [Example][Refactor] Refactor RGCN example (#4327)
* Refactor full graph entity classification

* Refactor rgcn with sampling

* README update

* Update

* Results update

* Respect default setting of self_loop=false in entity.py

* Update

* Update README

* Update for multi-gpu

* Update
2022-08-25 13:19:32 +08:00
Rhett Ying ea6195c253 [Doc] fix print issue in tutorial (#4459) 2022-08-24 13:34:57 +08:00
Xin Yao 1947d87dd7 fix unpinning when tensoradaptor is not available (#4450) 2022-08-23 12:08:32 +08:00
Mufei Li 7a41c126f6 [Doc] Change random.py to random_partition.py in guide on distributed partition pipeline (#4438)
* Update distributed-preprocessing.rst

* Update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-9-26.ap-northeast-1.compute.internal>
2022-08-22 18:12:55 +08:00
Minjie Wang ad7be8be44 [Distributed][Feature] New distributed partitioning pipeline (#4439) 2022-08-22 11:18:45 +08:00
Minjie Wang 7e2ed9f8a8 Merge branch 'master' into dist_part 2022-08-22 09:59:44 +08:00
xiang song(charlie.song) ee672c0b4a Let distributed training launch script report error when any trainer or kvserver fails. (#4437)
* Collect error reports

* update

* fix

Co-authored-by: root <root@ip-10-0-80-128.ec2.internal>
2022-08-21 00:44:16 -07:00
Minjie Wang 2cf4bd0acf Merge branch 'master' into dist_part 2022-08-20 13:42:07 +08:00
Mufei Li 2e8ae9f980 [Dist][CI] Unit test for the new distributed partitioning pipeline (#4394)
* chunked graph data format

* Update

* Update

* Update task_distributed_test.sh

* Update

* Update

* Revert "Update"

This reverts commit 03c461870f19375fb03125b061fc853ab555577f.

* Update

* Update

* ssh-keygen

* CI

* install openssh

* openssh

* Update

* CI

* Update

* Update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-53-142.us-west-2.compute.internal>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-16-87.us-west-2.compute.internal>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-20-21.us-west-2.compute.internal>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-9-26.ap-northeast-1.compute.internal>
2022-08-19 14:20:56 +08:00
peizhou001 d077d3719c [EXAMPLE]Add multi gpu graph predication GIN+virtualnode example (#4385)
* add multigpu folder for related examples
2022-08-19 09:38:19 +08:00
Daniil Sizov 47993776df [Feature] Rework Dataloader cpu affinitization as helper method (#4126)
* Add helper method for temporary affinitization of compute threads

* Rework DL affinitization as single helper

* Add example usage in benchmarks

* Fix python linter warnings

* Fix affinity helper params

* Use NUMA node 0 cores only by default

* Fix benchmarks

* Fix lint errors

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-08-18 22:34:12 +08:00
Mufei Li bc2fef9c32 [Doc] Misc Fix for User Guide 7.1 Data Preprocessing (#4433)
* Update

* rollback for partition_algo/random.py

Co-authored-by: Ubuntu <ubuntu@ip-172-31-20-21.us-west-2.compute.internal>
2022-08-18 20:27:40 +08:00
Rhett Ying b039ea9944 [CI] enable ssh in docker image for dist test (#4432) 2022-08-18 07:27:22 +00:00
Rhett Ying d248e7686f [CI] enable ssh in docker image for dist test (#4432) 2022-08-18 15:23:51 +08:00
Rhett Ying e14860d9cc [Example][Bug] fix device index for dist train on GPUs (#4403) 2022-08-18 13:00:21 +08:00
kylasa f51b31b245 Distributed Lookup service implementation to retrieve node-level mappings (#4387)
* Distributed Lookup service which is for retrieving global_nids to shuffle-global-nids/partition-id mappings

1. Implemented a class to provide distributed lookup service
2. This class can be used to retrieve global-nids mappings

* Code changes to address CI comments.

1. Removed some unneeded type_casts to numpy.int64
2. Added additional comments when iterating over the partition-ids list.
3.Added docstring to the class and adjusted comments where it is relevant.

* Updated code comments and variable names...

1. Changed the variable names to appropriately represent the values stored in these variables.
2. Updated the docstring correctly.

* Corrected docstring as per the suggestion... and removed all the capital letters for Global nids and Shuffle Global nids...

* Addressing CI review comments.
2022-08-17 16:07:42 -07:00
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