提交

提交图

3215 次代码提交

作者 SHA1 备注 提交日期
Xin Yao aad3bd0484 [Bugfix] Fix empty tensors may being treated as pinned (#5005)
* fix empty tensor is treated as pinned

* avoid calling cudaHostGetDevicePointer on nullptr

* update empty array

* add a comment
2022-12-09 16:42:59 +08:00
paoxiaode e28f07812b [Sparse] GCN Example (#4996)
* add GCN sparse matrix example

* refine GCN example

* refine GCN example

* change train function

* [Bugfix] Turn off `use_alternate_stream` when TensorAdaptor is not enabled (#4987)

* turn off use_alternate_stream when tensoradaptor is not enabled

* add docstring

* Update (#4997)

Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>

* refine GCN example

* add GCN sparse matrix example

* refine GCN example

* refine GCN example

* change train function

* refine GCN example

* add highlight comment

* refine code

* refine code

* refine by black and flake8

* refine the comment to 80 char length

* refine the comment

* refine comment

Co-authored-by: Xin Yao <xiny@nvidia.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
2022-12-09 09:19:38 +08:00
Xin Yao 20fb4d4c31 [Lint] Add a formatter GitHub Action for ufmt and clang-format (#4977)
* add lint workflow

* add line number

* address comments

* update package versions

* remove autopep8 config
2022-12-08 13:32:08 +08:00
czkkkkkk 774d57539c [CMAKE] Disable --exclude-libs option in MAX OS (#4992) 2022-12-08 10:40:26 +08:00
xiang song(charlie.song) 394794b19d Fix bug when feature_tid is empty (#4985)
Co-authored-by: Xiang Song <xiangsx@amazon.com>
2022-12-07 16:35:37 +08:00
Zhiteng Li 279e2e8fba Add Graph Transformer Layer (Dense Computation) (#4959)
* Add GraphTransformerLayer (dense)

* beautify the python code with black

* refine according to mufei's comments

* fix AttributeError in unit test

* rename module as GraphormerLayer

* fix name issue

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-12-07 16:23:14 +08:00
Mufei Li a80bd9e039 Update (#4997)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
2022-12-07 15:07:50 +08:00
Xin Yao f85da5f533 [Bugfix] Turn off use_alternate_stream when TensorAdaptor is not enabled (#4987)
* turn off use_alternate_stream when tensoradaptor is not enabled

* add docstring
2022-12-07 14:41:28 +08:00
Quan (Andy) Gan a2defae2bf [Bug] Fix typo in _gsddmm_hetero (#4944) 2022-12-07 11:16:51 +08:00
Muhammed Fatih BALIN 84a12cf6a1 [Doc] Add Labor Sampler documentation (#4986)
Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-12-07 08:42:26 +08:00
Tingyu Wang ba21295cd5 [Model] Update CuGraphRelGraphConv to use new bindings from pylibcugraphops (#4965)
* update agg function with new bindings

* handle optional import in __init__

* raise error in RelGraphConvAgg when pylibcugraphops not imported

* Update tests/cugraph/cugraph-ops/test_cugraph_relgraphconv.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update tests/cugraph/cugraph-ops/test_cugraph_relgraphconv.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* use keyword args for readability

* add missing docstring to pass CI

* catch ImportError rather than ModuleNotFoundError

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-12-06 14:00:57 +08:00
Chang Liu fb223d4735 Add support for next cusparse release (#4974)
* Add support for next cusparse release

* Fix lint

* Add switch and tune the performance

* Fix lint issue

* Fine tune the heuristics

* Fix lint issue

* Address comments

* Minor fix

* Address comments
2022-12-06 11:55:56 +08:00
Mufei Li 97fbd94dfc [Sparse] neg and inv (#4980)
* Update

* update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
2022-12-05 21:19:27 +08:00
Rhett Ying edb14f9358 [Dist] remove dependency on deprecated _dataloading (#4979)
* [Dist] remove dependency on deprecated _dataloading

* fix lint

* refine comment
2022-12-05 18:23:09 +08:00
Minjie Wang c604366d4c [Sparse][Example] Add TWIRLS example in sparse API (#4922)
* add twirls

* update attention part

* update; add val_like to mock_sparse

* black
2022-12-05 16:56:21 +08:00
ZhenyuLU_Heliodore 93ecfa313a [NN] Add PathEncoder (#4956)
* Add PathEncoder to transformer.py

* add blank line at the and

* rename variabl sp to shortest_path

* Fixed corresponding problems

* Fixed certain bugs when running on CUDA

* changed clamp min from 0 to 1

Co-authored-by: Ubuntu <ubuntu@ip-172-31-14-146.ap-northeast-1.compute.internal>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-12-05 13:47:51 +08:00
Dylan b84de903a2 GCN example correction (#4969) (#4976)
Correction like mentioned in #4969 

I noticed that there is a normalisation step on line 97 while the normalised values are not used downstream. Even if this was meant to show the normalisation step, it would not be calculating the normalisation step described in the CGN paper. The paper considers both in and out degrees while the normalisation in the code only describes normalisation using the in degrees.
In the end, the normalised values are assigned to g.ndata["norm"] but these values are not used afterwards.

Having a normalisation step here is also unnecessary since the GraphConv layer that is used already takes care of the normalisation. https://docs.dgl.ai/en/0.9.x/_modules/dgl/nn/pytorch/conv/graphconv.html#GraphConv

It confused me for a second thinking that I had to do the normalisation myself but this is already handled by the GraphConf.
2022-12-05 10:00:57 +08:00
Xin Yao 26612d0cb0 [Fix] Fix record_stream for PyTorch 1.14 (#4975) 2022-12-02 13:31:47 +08:00
Tingyu Wang 943abba3fb [Example] add entity_sample example of using CuGraphRelGraphConv (#4827)
* add entity_sample example

* update message

* address review, update api call

* Update examples/pytorch/rgcn/entity_sample_cugraph_relgraphconv.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update examples/pytorch/rgcn/entity_sample_cugraph_relgraphconv.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update examples/pytorch/rgcn/entity_sample_cugraph_relgraphconv.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* address review

* move example and add description

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-12-01 21:09:14 +08:00
Mufei Li a5a0d9ed9d [Sparse] C&S Example (#4963)
* Update

* Update

* Update

* Update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
2022-12-01 18:35:53 +08:00
peizhou001 611393021a [API Deprecation] Remove candidates in DGLGraph (#4946) 2022-12-01 16:41:53 +08:00
Mufei Li e088acac00 [Sparse] Add val_like and Disable Setting Nonzero Values (#4972)
* Update

* Update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
2022-12-01 14:09:36 +08:00
Muhammed Fatih BALIN b1e2695f3e [Feature] replace dgl PRNG with pcg32 (#4807)
* replace dgl PRNG with pcg32

* remove pcg submodule, add a simple implementation

* replace pcg32 with std::mt19937_64

* fix include order

* change RandomEngine to pcg32

* Remove custom pcg32 implementation, use the submodule provided by the original author.

* minor bug

* move include for linting

* include pcg for tests too

Co-authored-by: Hongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
2022-12-01 09:19:28 +08:00
xiang song(charlie.song) adb07d1835 [Bugfix] Make preprocess compatible with openmpi (#4971)
* Make preprocess compatible with openmpi

* update docstr

Co-authored-by: Xiang Song <xiangsx@amazon.com>
2022-11-30 16:55:10 +08:00
czkkkkkk 60b02f2fc8 [Sparse] Add SparseMatrix transposition (#4940) 2022-11-29 16:54:36 +08:00
Minjie Wang d29b312c13 Update README.md 2022-11-29 13:46:03 +08:00
Quan (Andy) Gan 1edc92336b [Example] Hypergraph attention (#4941)
* hypergraph attention

* address comments
2022-11-28 20:12:37 +08:00
Mufei Li 7469bc9284 [Sparse] GAT Example (#4955)
* Update

* Update

* Update

* CI

Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
2022-11-28 19:23:23 +08:00
peizhou001 08fd6cf826 [Feature] Add parquet support for node/edge features in chunked data (#4933) 2022-11-28 18:13:16 +08:00
Quan (Andy) Gan e0fc038db1 [Test] Fix duplicate seed generation in unit test (#4961)
* fix unit test

* oops
2022-11-28 16:20:31 +08:00
Rhett Ying 566d231a4c [Dist] fix argument consistent with help message (#4957) 2022-11-28 10:05:34 +08:00
czkkkkkk 0a65559276 [Sparse] Support sparse format conversion (#4929)
* [Sparse] Support sparse format conversion

* Update

* Update
2022-11-27 17:01:18 +08:00
Hongzhi (Steve), Chen 0b9f64d607 small (#4954)
Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2022-11-25 17:56:15 +08:00
Serge Panev 815b88a63f [Dist][Test] Add blacklisting mechanism + misc fixes (#4950)
Signed-off-by: Serge Panev <spanev@nvidia.com>

Signed-off-by: Serge Panev <spanev@nvidia.com>
2022-11-25 17:50:39 +08:00
Hongzhi (Steve), Chen 226d1159a9 [Misc] Auto fix by black. (#4952)
* black on explain_main

* isort

* add dot

Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2022-11-25 09:24:44 +08:00
Hongzhi (Steve), Chen f118ea9537 black (#4951)
Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2022-11-25 09:19:17 +08:00
Xin Yao c59000ac3a [Cleanup] Remove duplicated _IndexSelect (#4874) 2022-11-24 14:48:37 +08:00
czkkkkkk 0cb5f0fdc0 [Sparse] Be compatible with Pytorch 1.13 and later version (#4935) 2022-11-23 15:36:18 -08:00
Mufei Li c53deb26ab [Sparse] APPNP example (#4919)
* Update

* Update

* Update

* Update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
2022-11-23 14:30:30 +08:00
Mufei Li 61fa640193 [Sparse] SGC example (#4918)
* Update

* Update

* Update

* Update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
2022-11-22 17:38:27 +08:00
Ping Gong aa41989573 [Performance] Leverage hashmap to accelerate CSRSliceMatrix<kDGLCUDA, IdType> (#4924)
* Leverage hashmap to accelerate CSRSliceMatrix

* fix lint check

* use `min` in cuda_runtime.ch

* fix hash func

* add some comments and adjust the <grid,block> of the _SegmentMaskColKernel kernel

* set device and stream for thrust::for_each

* use thrust::cuda::par_nosync

Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-11-22 17:04:47 +08:00
Muhammed Fatih BALIN bf264d00fe [Feature] (La)yer-Neigh(bor) sampling implementation (#4668)
* adding LABOR sampling

* add ladies and pladies samplers

* fix compile error after rebase

* add reference for ladies sampler

* Improve ladies implementation.

* weighted labor sampling initial implementation draft
fix indentation and small bug in ladies script

* importance_sampling currently doesn't work with weights

* fix weighted importance sampling

* move labor example into its own folder

* lint fixes

* Improve documentation

* remove examples from the main PR

* fix linting by not using c++17 features

* fix documentation of labor_sampler.py

* update documentation for labor.py

* reformat the labor.py file with black

* fix linting errors

* replace exception use with if

* fix typo in error comment

* fixing win64 build for ci

* fixing weighted implementation, works now.

* fix bug in the weighted case and importance_sampling==0

* address part of the reviews

* remove unused code paths from cuda

* remove unused code path from cpu side

* remove extra features of labor making use of random seed.

* fix exclude_edges bug

* remove pcg and seed logic from cpu implementation, seed logic should still work for cuda.

* minor style change

* refactor CPU implementation, take out the importance_sampling probability computation into a function.

* improve CUDAWorkspaceAllocator

* refactor importance_sampling part out to a function

* minor optimization

* fix linting issue

* Revert "remove pcg and seed logic from cpu implementation, seed logic should still work for cuda."

This reverts commit c250e07ac6d7e13f57e79e8a2c2f098d777378c2.

* Revert "remove extra features of labor making use of random seed."

This reverts commit 7f99034353080308f4783f27d9a08bea343fb796.

* fix the documentation

* disable NIDs

* improve the documentation in the code

* use the stream argument in pcg32 instead of skipping ahead t times, can discard the use of hashmap now since it is faster this way.

* fix linting issue

* address another round of reviews

* further optimize CPU LABOR sampling implementation

* fix linting error

* update the comment

* reformat

* rename and rephrase comment

* fix formatting according to new linting specs

* fix compile error due to renaming, fix linting.

* lint

* rename DGLHeteroGraph to DGLGraph to match master

* replace other occurrences of DGLHeteroGraph to DGLGraph

Co-authored-by: Muhammed Fatih BALIN <m.f.balin@gmail.com>
Co-authored-by: Kaan Sancak <kaansnck@gmail.com>
Co-authored-by: Quan Gan <coin2028@hotmail.com>
2022-11-22 09:03:02 +08:00
Quan (Andy) Gan 59f3d6e0b2 [Sparse] Add HGNN example (#4917)
* hgnn example

* desc

* update example index

* address

* replace naming

* address comments
2022-11-22 01:07:05 +08:00
Hongzhi (Steve), Chen 0c70bc23f4 [Sparse] Refactor SIGN model. (#4921)
Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2022-11-21 23:22:58 +08:00
Rhett Ying 4d641aba51 [CI] Enlarge timeout limit for dist test (#4927)
Recently we find dist test often fails due to timeout. Root cause is not found yet.
2022-11-21 17:10:01 +08:00
Rhett Ying cd3fa03035 [Dist] init node/edge data store for Node/EdgeDataView in appropriate place (#4906)
* [Dist] instantiate NodeDataView in lazy mode

* fix test failure

* init node/edge data store at the very beginning

* fix test failures

* refine comment

* add more tests
2022-11-21 09:52:36 +08:00
Zhiteng Li 16eba6e88c [NN] Add biased multi-head attention module (dense) (#4916)
* Add biased multi-head attention module (dense)

* fix lint issues

* refine according to dongyu's comments

Co-authored-by: rudongyu <ru_dongyu@outlook.com>
2022-11-20 14:55:25 +08:00
Xin Yao 65b34702e6 [Makefile] Refactor CUDA makefile and add Hopper (SM90) to default build (#4830)
* Update CUDA.cmake to align with PyTorch's

* add Ada and Hopper

* add more comments

* resolve comments

Co-authored-by: Triston <triston.cao@gmail.com>
2022-11-19 12:17:07 -08:00
kylasa c8ea9fa4e4 [Dist] Flexible pipeline - Initial commit (#4733)
* Flexible pipeline - Initial commit

1. Implementation of flexible pipeline feature.
2. With this implementation, the pipeline now supports multiple partitions per process. And also assumes that num_partitions is always a multiple of num_processes.

* Update test_dist_part.py

* Code changes to address review comments

* Code refactoring of exchange_features function into two functions for better readability

* Upadting test_dist_part to fix merge issues with the master branch

* corrected variable names...

* Fixed code refactoring issues.

* Provide missing function arguments to exchange_feature function

* Providing the missing function argument to fix error.

* Provide missing function argument to 'get_shuffle_nids' function.

* Repositioned a variable within its scope.

* Removed tab space which is causing the indentation problem

* Fix issue with the CI test framework, which is the root cause for the failure of the CI tests.

1. Now we read files specific to the partition-id and store this data separately, identified by the local_part_id, in the local process.
2. Similarly as above, we also differentiate the node and edge features type_ids with the same keys as above.
3. These above two changes will help up to get the appropriate feature data during the feature exchange and send to the destination process correctly.

* Correct the parametrization for the CI unit test cases.

* Addressing Rui's code review comments.

* Addressing code review comments.
2022-11-18 08:21:55 -08:00
Mufei Li ee5f096729 Update (#4920)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
2022-11-18 20:39:48 +08:00