文件历史

提交图

99 次代码提交

作者 SHA1 备注 提交日期
Hongzhi (Steve), Chen d18274885d autofix2 (#5333)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
2023-02-20 23:27:27 +08:00
peizhou001 611393021a [API Deprecation] Remove candidates in DGLGraph (#4946) 2022-12-01 16:41:53 +08:00
peizhou001 3132da2826 Deprecate (#4864)
rename DGLHeteroGraph to DGLGraph
2022-11-15 10:01:01 +08:00
nv-dlasalle 2630d2eb02 [Performance][bugfix] Implement is_unibipartite in C++ with caching. (#4556)
* updates

* Enable caching C++ result

* Add missing docstring

* Remove unused function

* Add unit test

* Address comments
2022-09-19 16:46:27 -07:00
Xin Yao 9a00cf194f [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
2022-09-15 16:54:52 +08:00
Xin Yao 077e002fe5 [Bugfix][Rework] Automatically unpin tensors pinned by DGL (rework #3997) (#4135)
* Explicitly unpin tensoradapter allocated arrays

* Undo unrelated change

* Add unit test

* update unit test

* add pinned_by_dgl flag to NDArray::Container

* use dgl.ndarray for holding the pinning status

* update multi-gpu uva inference

* reinterpret cast NDArray::Container* to DLTensor* in MoveAsDLTensor

* update unpin column and examples

* add unit test for unpin column

Co-authored-by: Dominique LaSalle <dlasalle@nvidia.com>
Co-authored-by: nv-dlasalle <63612878+nv-dlasalle@users.noreply.github.com>
2022-06-23 13:56:54 +08:00
Quan (Andy) Gan a0e8cf0d3e [Bugfix] Fix UVA sampling with lazy feature slicing (#3862)
* fix uva sampling with features

* fix

* add is_listlike function to distinguish strings from sequence

* fix

Co-authored-by: nv-dlasalle <63612878+nv-dlasalle@users.noreply.github.com>
2022-03-24 20:13:01 +08:00
Quan (Andy) Gan 3f138ebaaf [Bugfix] Bug fixes in new dataloader (#3727)
* fixes

* fix

* more fixes

* update

* oops

* lint?

* temporarily revert - will fix in another PR

* more fixes

* skipping mxnet test

* address comments

* fix DDP

* fix edge dataloader exclusion problems

* stupid bug

* fix

* use_uvm option

* fix

* fixes

* fixes

* fixes

* fixes

* add evaluation for cluster gcn and ddp

* stupid bug again

* fixes

* move sanity checks to only support DGLGraphs

* pytorch lightning compatibility fixes

* remove

* poke

* more fixes

* fix

* fix

* disable test

* docstrings

* why is it getting a memory leak?

* fix

* update

* updates and temporarily disable forkingpickler

* update

* fix?

* fix?

* oops

* oops

* fix

* lint

* huh

* uh

* update

* fix

* made it memory efficient

* refine exclude interface

* fix tutorial

* fix tutorial

* fix graph duplication in CPU dataloader workers

* lint

* lint

* Revert "lint"

This reverts commit 805484dd553695111b5fb37f2125214a6b7276e9.

* Revert "lint"

This reverts commit 0bce411b2b415c2ab770343949404498436dc8b2.

* Revert "fix graph duplication in CPU dataloader workers"

This reverts commit 9e3a8cf34c175d3093c773f6bb023b155f2bd27f.

Co-authored-by: xiny <xiny@nvidia.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2022-02-22 01:30:31 +08:00
Xin Yao 738e8318fd [Feature] CUDA UVA sampling for MultiLayerNeighborSampler (#3674)
* implement pin_memory/unpin_memory/is_pinned for dgl.graph

* update python docstring

* update c++ docstring

* add test

* fix the broken UnifiedTensor

* XPU_SWITCH for kDLCPUPinned

* a rough version ready for testing

* eliminate extra context parameter for pin/unpin

* update train_sampling

* fix linting

* fix typo

* multi-gpu uva sampling case

* disable new format materialization for pinned graphs

* update python doc for pin_memory_

* fix unit test

* UVA sampling for link prediction

* dispatch most csr ops

* update graphsage example to combine uva sampling and UnifiedTensor

* update graphsage example to combine uva sampling and UnifiedTensor

* update graphsage example to combine uva sampling and UnifiedTensor

* update doc

* update examples

* change unitgraph and heterograph's PinMemory to in-place

* update examples for multi-gpu uva sampling

* update doc

* fix linting

* fix cpu build

* fix is_pinned for DistGraph

* fix is_pinned for DistGraph

* update graphsage unsupervised example

* update doc for gpu sampling

* update some check for sampling device switching

* fix linting

* adapt for new dataloader

* fix linting

* fix

* fix some name issue

* adjust device check

* add unit test for uva sampling & fix some zero_copy bug

* fix linting

* update num_threads in graphsage examples

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2022-02-09 14:06:17 +08:00
Quan (Andy) Gan 701b4fccc2 [Sampling] New sampling pipeline plus asynchronous prefetching (#3665)
* initial update

* more

* more

* multi-gpu example

* cluster gcn, finalize homogeneous

* more explanation

* fix

* bunch of fixes

* fix

* RGAT example and more fixes

* shadow-gnn sampler and some changes in unit test

* fix

* wth

* more fixes

* remove shadow+node/edge dataloader tests for possible ux changes

* lints

* add legacy dataloading import just in case

* fix

* update pylint for f-strings

* fix

* lint

* lint

* lint again

* cherry-picking commit fa9f494

* oops

* fix

* add sample_neighbors in dist_graph

* fix

* lint

* fix

* fix

* fix

* fix tutorial

* fix

* fix

* fix

* fix warning

* remove debug

* add get_foo_storage apis

* lint
2022-01-30 16:13:00 +08:00
Xin Yao 40b44a43a9 [Feature] Pin dgl.graph to the page-locked memory (#3616)
* implement pin_memory/unpin_memory/is_pinned for dgl.graph

* update python docstring

* update c++ docstring

* add test

* fix the broken UnifiedTensor

* eliminate extra context parameter for pin/unpin

* fix linting

* fix typo

* disable new format materialization for pinned graphs

* update python doc for pin_memory_

* fix unit test

* update doc

* change unitgraph and heterograph's PinMemory to in-place

* update comments for NDArray's PinMemory_ and PinData

* update doc

Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2022-01-21 16:13:12 +08:00
Israt Nisa 6c81634b29 [Bugfix] Fixes wrong output in multi_update_all for reduce op max/min (Issue#3564)) (#3581)
* fixed bug

* added  in test cases

* unittest resolved

* bugfix

Co-authored-by: Israt Nisa <nisisrat@amazon.com>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-12-17 08:54:15 +08:00
Jinjing Zhou 02880e9f86 Fix unnecessary trigger of lazy copy (#3585)
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2021-12-13 17:11:03 +08:00
Israt Nisa cb0e1103ed [Feature] Add Min/max reducer in heterogeneous API for unary message functions (#3514)
* min/max support for forward CPU heterograph

* Added etype with each argU values

* scatter_add needs fix

* added scatter_add_hetero. Grads dont match for max reducer

* storing ntype in argX

* fixing scatter_add_hetero

* hetero matches with torch's scatter add

* works copy_e forward+cpu

* added backward for copy_rhs

* Computes gradient for all node types in one kernel

* bug fix

* unnitest for max/min on CPU

* renamed scatter_add_hetero to update_grad_minmax_hetero

* lint check and comment out cuda call for max. Code is for CPU only

* lint check

* replace inf with zero

* minor

* lint check

* removed LIBXSMM code from hetro code

* fixing backward operator of UpdateGradMinMaxHetero

* removed backward from update_grad_minmax_hetero

* docstring

* improved docstring and coding style

* Added pass by pointer for output

* typos and pass by references

* Support for copy_rhs

* Added header <string>

* fix bug in copy_u_max

* Added comments and dimension check of all etypes

* skip mxnet check

* pass by pointer output arrays

* updated docstring

Co-authored-by: Israt Nisa <nisisrat@amazon.com>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-12-04 00:39:30 +08:00
Israt Nisa d17b299a13 [Feature] Update edge features (apply_edge) for heterogeneous graph (#3250)
* rgcn with new heterograph API

* apply_edge() forward for multi relation

* undoing changes from rgcn-hetero

* backward apply_edge(copy_u) added

* unittest for apply_edge(copy_e)

* Compatible with new PRs

* resolving conflict with master

* Bringing back change after resolving conflict

* minor

* minor

Co-authored-by: Israt Nisa <nisisrat@amazon.com>
2021-09-09 22:39:08 +08:00
Israt Nisa 298e4fa627 [Feature] Support builtin binary message function for heterogenenous graph (#3273)
* Added binary builtinMsgFunc forward() for heterograph

* Added backward for u_op_v

* Supports all binary builtin forward

* Supports binary message funcs with reduce func sum

* lint check

* removed import torch from unittest

* enabled GPU test

* lint check

* Fixed docstrings

* rename func get_hs_id

* edited comment

Co-authored-by: Israt Nisa <nisisrat@amazon.com>
2021-09-07 10:01:33 -07:00
Rhett Ying c4791fd46e [bugfix] fix default ntypes/etypes consistency between dgl.DGLGraph and dgl.graph (#3198) 2021-07-29 14:05:28 +08:00
Mufei Li 3f6f694159 [Bug fix] Various fix from bug bash (#3133)
* Update

* Update

* Update dependencies

* Update

* Update

* Fix ogbn-products gat

* Update

* Update

* Reformat

* Fix typo in node2vec_random_walk

* Specify file encoding

* Working for 6.7

* Update

* Fix subgraph

* Fix doc for sample_neighbors_biased

* Fix hyperlink

* Add example for udf cross reducer

* Fix

* Add example for slice_batch

* Replace dgl.bipartite

* Fix GATConv

* Fix math rendering

* Fix doc

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>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-22-156.us-west-2.compute.internal>
2021-07-15 09:17:15 +08:00
Mufei Li f0fafa2062 [Bug fix] Fix batch information with remove_nodes/edges applied (#3119)
* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Fix lint

* Fix

* Update

* Fix test cases

* Fix

* add docstrings

* Update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-17.us-west-2.compute.internal>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-07-13 16:27:31 +08:00
Rhett-Ying 32d1f3ac97 [BugFix] skip frames whose num_rows is zero in dgl.heterograph.combine_frames() (#3110)
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-07-07 14:15:06 +08:00
Quan (Andy) Gan 751685a979 [Doc] Add documentation for DGLGraph.adj_sparse (#3096)
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-07-07 11:24:47 +08:00
Israt Nisa 188152b853 [Feature] Add Heterograph support on Python for builtin unary msg functions (copy_u, copy_e) (#2989)
* heterograph for binary func

* Added SDDMM support

* Added unittest

* added binary test cases

* unary mfuncs works

* Fixed lint err

* lint check and others

* link check

* fixed import *_hetero issue

* lint check

* replace torch with dgl backend

* lint cehck

* removed torch from test

* skip mxnet unittest

* skip gpu test

* Remove unused/duplicated code

* minor

* changed data structure of ndata and edata

* link check

* reorganized

* minor lint

* minor lint

* raise error for udf func

* lint check

* fix for CUDA 10.1

* add a note for future cross-type max/min reducing

* Add support CUDA < 11

* lint check

* tidied C code

* remove dummy GSDDMM_hetero backward implementation

Co-authored-by: Israt Nisa <nisisrat@amazon.com>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Quan Gan <coin2028@hotmail.com>
2021-07-06 20:41:58 +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
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
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
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
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 103444c58f Remove __len__ method from DGLGraph (#2902)
* Update heterograph.py

* remove unit tests

* replace tutorial
2021-05-11 14:06:18 +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
Minjie Wang 8a07ab7737 [Doc] Tutorials re-organization (#2683)
* reorg

* change titles

* rm some stale API doc; minor fix

* fix docs

* add warning

* rm new-tutorial run in ci

* lint
2021-02-20 17:42:45 +08:00
Tong He 8ccb8206bf [Doc] Update docs to motivate the use of set_batch_num_nodes and set_batch_num_edges (#2630)
* fix doc

* update docstring for transformation on batch graph

* update cn guide

* fix format

* update rst
2021-02-08 14:43:24 +08:00
Minjie Wang 878acdb0fc Revert "Refactor code for retaining formats in message-passing. (#2570)" (#2583)
This reverts commit a613ad8806.
2021-01-28 14:04:07 +08:00
Zihao Ye a613ad8806 Refactor code for retaining formats in message-passing. (#2570) 2021-01-25 16:55:16 +08:00
Zihao Ye aa884d43b6 [doc][fix] Improve the docstring and fix its behavior in DGL's kernel (#2563)
* upd

* fix

* lint

* fix

* upd
2021-01-25 00:18:57 +08:00
Zihao Ye fa5f4d6aa7 [Doc] Hotfix on docstring of set_batch_num_edges (#2498) 2021-01-06 21:45:04 +08:00
Quan (Andy) Gan 2caac086c2 [Bug] send_and_recv and pull may write to wrong places (#2497)
* fix

* fix test
2021-01-06 17:18:37 +08:00
Mufei Li 0c2a2ea1e2 [Bugfix] Handle a Corner Case of Batching after Removing Nodes/Edges (#2465)
* Update

* Update

* Update

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-01-05 22:22:03 +08:00
Zihao Ye f960468f50 [feature] APIs for manually set batch_num_nodes and batch_num_edges (#2430)
* wip

* udp

* upd

* fix typo

* lint

* lint

* upd

* upd

* lint

* lint

* upd

* upd

* tftest

* fix

* fallback numpy

* fix tf

* docstring

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2021-01-04 23:43:58 +08:00
Mufei Li 40caf1ab50 [HeteroGraph] Fix the failure of apply_nodes when the input function changes feature size for all nodes (#2223)
* Fix

* Fix
2020-09-24 08:54:28 +08:00
Mufei Li f3f646bbfd [Doc and User Guide] Minor Fix (#2205)
* Fix doc and user guide

* Update heterograph.py

Co-authored-by: Ubuntu <ubuntu@ip-172-31-13-9.us-west-2.compute.internal>
2020-09-17 03:01:12 +08:00
Quan (Andy) Gan 7d8522a29f [Bug] fix cumsum on an empty array with prepend_zero returning an empty array (#2179)
* fix cumsum

* udp

Co-authored-by: Zihao <expye@outlook.com>
2020-09-11 18:23:44 +08:00
Quan (Andy) Gan ac570c1dae [Bugfix] Fix flatten not wrapping unit graph (#2170)
* fix flatten not wrapping unit graph

* fix doc
2020-09-10 17:41:52 +08:00
Quan (Andy) Gan 9eaace9216 rename create_format_ to create_formats_ (#2126) 2020-08-29 22:49:27 +08:00
xiang song(charlie.song) b2ac89f2e4 [Bugfix] Fix #2076 (#2111)
* Fix

* Revert "Fix"

This reverts commit 2627630daee33a709a70ef87e1ad9930772430a8.

* Fix

* upd

Co-authored-by: Ubuntu <ubuntu@ip-172-31-68-185.ec2.internal>
2020-08-27 00:23:31 +08:00
Minjie Wang bcff14ccde [Dco] Remove preface in guide (#2096)
* fix

* fix
2020-08-23 10:27:15 +08:00
Minjie Wang f13b9b6212 [Doc] Scan the API docs and make many changes (#2080)
* WIP: api

* dgl.sampling, dgl.data

* dgl.sampling; dgl.dataloading

* sampling packages

* convert

* subgraph

* deprecate

* subgraph APIs

* All docstrings for convert/subgraph/transform

* almost all funcs under dgl namespace

* WIP: DGLGraph

* done graph query

* message passing functions

* lint

* fix merge error

* fix test

* lint

* fix

Co-authored-by: Quan Gan <coin2028@hotmail.com>
2020-08-20 23:26:49 +08:00
Mufei Li 9088c63592 [Feature] Change the Default Value of transpose in DGLGraph.adj (#2046)
* Update adj

* Fix
2020-08-18 22:45:46 +08:00
Mufei Li be444e52d9 [Doc/Feature] Refactor, doc update and behavior fix for graphs (#1983)
* Update graph

* Fix for dgl.graph

* from_scipy

* Replace canonical_etypes with relations

* from_networkx

* Update for hetero_from_relations

* Roll back the change of canonical_etypes to relations

* heterograph

* bipartite

* Update doc

* Fix lint

* Fix lint

* Fix test cases

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Update

* Fix test

* Fix

* Update

* Use DGLError

* Update

* Update

* Update

* Update

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Update

* Fix

* Update

* Fix

* Fix

* Fix

* Update

* Fix

* Update

* Fix

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Fix

* Fix

* Update

* Update

* Update

* Update

* Update

* Update

* rewrite sanity checks

* delete unnecessary checks

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Fix

* Update

* Update

* Update

* Fix

* Fix

* Fix

* Update

* Fix

* Update

* Fix

* Fix

* Update

* Fix

* Update

* Fix

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Quan Gan <coin2028@hotmail.com>
2020-08-18 04:26:29 +08:00
xiang song(charlie.song) 5e34ca8bb5 [Feature] Lazy copy ndata, edata to device (#1986)
* Lazy to device

* remove print

* lint

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* lint

* Fix

* Revert "Fix"

This reverts commit 615c9b8f80f5f6ee2ab43c849a22f0083deedf3b.

* Add test for frame lazy update

* disable tensorflow

* upd

Co-authored-by: Ubuntu <ubuntu@ip-172-31-51-214.ec2.internal>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2020-08-12 13:04:47 +08:00
Minjie Wang 22167f7203 [Refactor] Enable new kernel in all message passing APIs (#1953)
* WIP: frame refactor

* new frame

* simple update_all builtin

* move all subgraph routines into the same file

* sddmm & spmm schedule; node & edge udf

* degree bucketing

* some tricky 0deg corner cases

* bug in frame append

* merge test_hetero_basics and test_basics

* some code rearange

* fix test_heterograph

* add mean spmm

* enable all builtin combinations

* pass gpu test

* pass pytorch tests

* wip

* fix some pt debugging codes

* fix bug in mxnet backward

* pass all mxnet utests

* passed tf tests

* docstring

* lint

* lint

* fix broadcasting bugs

* add warning and clamp for mean reducer

* add test for zero-degree mean

* address comments

* lint

* small fix
2020-08-07 15:40:25 +08:00