文件历史

101 次代码提交

作者 SHA1 备注 提交日期
elohmeier 51907e0485 fix(dgl/runtime): add static_cast to fix clang compilation when using OpenMP (#7844) 2025-01-25 18:21:01 -08:00
Muhammed Fatih BALIN 6cd7fe99c9 [release] bump version to 2.5 for nightly (#7762) 2024-09-02 13:21:09 +08:00
Rhett Ying 00f8feeee5 [release] bump version to 2.4 for nightly (#7489) 2024-06-27 11:55:38 +08:00
Rhett Ying e3082a32c4 [dev] bump version to 2.3 (#7374) 2024-05-06 11:11:52 +08:00
Rhett Ying 4bd2eadf0c [dev] bump master version to 2.2 (#7185) 2024-03-01 15:45:09 +08:00
Rhett Ying 47a1d6a85d [release] upgrade version to 2.1 on master (#6940) 2024-01-12 08:58:00 +08:00
Rhett Ying 1e34f6648a [release] upgrade latest vesion to 2.0 (#6879) 2024-01-02 10:24:32 +08:00
Quan (Andy) Gan c92d012bb1 [Build] Bump nightly version (#5704) 2023-05-18 13:30:35 +08:00
Chang Liu 62b5f50a5c [Feature] Import PyTorch's pin_memory() method for DGL graph structure (#5366) 2023-04-10 19:21:32 -07:00
peizhou001 c51cc82e4b [Enhancement]Set default graph dataloader thread number (#5479)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-16-19.ap-northeast-1.compute.internal>
2023-04-10 17:52:24 +08:00
Ilia Taraban acb4eb7ecd [Feature] Add bfloat16 support for CPU (#5497)
Co-authored-by: Hongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
2023-04-06 11:16:41 +02:00
Daniil Sizov 87fb7ed05b [Config] Enable libxsmm by default for AVX cpu (#5165)
* Enable AVX by default

* Fix linting errors

* Fix win64 build (libxsmm not linked)

Libxsmm on Win64 is not linked, should be disabled by default

* Fix clang format issues

* Change lower supported cpu version to LIBXSMM_X86_AVX2

Change lower supported cpu version to LIBXSMM_X86_AVX2 to address https://github.com/dmlc/dgl/issues/3459 issue

* Fix unit test

Remove assumption that libxsmm is enabled in the config by default (only true for intel CPUs with AVX2 instructions)

---------

Co-authored-by: Ubuntu <ubuntu@ip-172-31-15-137.us-west-2.compute.internal>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2023-03-16 02:05:22 +08:00
Quan (Andy) Gan d8ca6317a3 [Release] Bump nightly version (#5357)
* bump version

* Update update_version.py
2023-02-22 09:13:38 +08:00
Quan (Andy) Gan f1fb859f99 bump version to 1.0 (#5123) 2023-01-09 11:28:26 +08:00
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
czkkkkkk 949f87cc1d [FFI] Change enumeration name in DGLObjectTypeCode to avoid conflict with Pytorch (#4905) 2022-11-16 15:25:48 +08:00
Hongzhi (Steve), Chen df089424c7 [Misc] Minor code style fix. (#4825)
* blabla

* more

* blabla

* blabla

* ablabla

* blabla

Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2022-11-07 14:20:47 +08:00
Hongzhi (Steve), Chen 8ac27dad1a [Misc] clang-format auto fix. (#4824)
* [Misc] clang-format auto fix.

* blabla

* ablabla

* blabla

Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2022-11-07 10:39:34 +08:00
Hongzhi (Steve), Chen bcd3768426 [Misc] Replace /*! with /**. (#4823)
* replace

* blabla

* balbla

* blabla

Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2022-11-07 08:16:41 +08:00
Hongzhi (Steve), Chen 619d735df5 [Misc] Replace \xxx with @xxx in structured comment. (#4822)
* param

* brief

* note

* return

* tparam

* brief2

* file

* return2

* return

* blabla

* all

Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2022-11-07 00:22:45 +08:00
Xin Yao 96297fb8fd [Feature] Add bfloat16 (bf16) support (#4648)
* add bf16 specializations

* remove SWITCH_BITS

* enable amp for bf16

* remove SWITCH_BITS for cpu kernels

* enbale bf16 based on CUDART

* fix compiling for sm<80

* fix cpu build

* enable unit tests

* update doc

* disable test for CUDA < 11.0

* address comments

* address comments
2022-11-06 19:48:36 +08:00
Hongzhi (Steve), Chen 6c53f351c6 Replace \xxx with @xxx in structured comment. (#4815)
* replace

* more

* file

* change

Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2022-11-04 22:59:13 +08:00
Hongzhi (Steve), Chen b2d38ca82c [Misc] clang-format auto fix. (#4803)
* [Misc] clang-format auto fix.

* manual

Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2022-11-02 23:15:34 +08:00
Hongzhi (Steve), Chen 07dc8fb666 [Misc] clang-format auto fix. (#4800)
* clang-format

* manul

* manul

* manual

Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2022-11-02 16:53:19 +08:00
Quan (Andy) Gan 72781efbcf [Sampling] Enable sampling with edge masks on homogeneous graph (#4748)
* sample neighbors with masks

* oops

* refactor again

* remove

* remove debug code

* rename macro

* address comments

* address comment

* address comments

* rename a lot of stuff

* oops
2022-10-28 09:04:33 +08:00
Quan (Andy) Gan 14cafe73e2 bump version (#4667)
* bump version

* Update setup.py

* Update setup.py
2022-10-01 00:47:38 +08:00
Xin Yao 880b3b1f97 [Fix] Enable lint check for cuh files and fix compiler warnings (#4585)
* disable warning for tensorpipe

* fix warning

* enable lint check for cuh files

* resolve comments
2022-09-21 10:09:14 +08:00
Xin Yao cded5b80fe [Feature] Bump DLPack to v0.7 and decouple DLPack from the core library (#4454)
* rename `DLContext` to `DGLContext`

* rename `kDLGPU` to `kDLCUDA`

* replace DLTensor with DGLArray

* fix linting

* Unify DGLType and DLDataType to DGLDataType

* Fix FFI

* rename DLDeviceType to DGLDeviceType

* decouple dlpack from the core library

* fix bug

* fix lint

* fix merge

* fix build

* address comments

* rename dl_converter to dlpack_convert

* remove redundant comments
2022-09-19 16:02:43 +08: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
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
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
Xin Yao 1feec870c1 [Bugfix] Add CUDA context availability check before setting curand seed (#4223) 2022-07-09 10:19:10 +08:00
Xin Yao 9ee7ced5e3 [Performance] Redirect AllocWorkspace to PyTorch's allocator if available (#4199) 2022-07-07 13:35:44 +08:00
ndickson-nvidia a5d8460c03 [Bug][Feature] Added more missing FP16 specializations (#4140)
* * Added missing specializations for `__half` of `DLDataTypeTraits`, `IndexSelect`, `Full`, `Scatter_`, `CSRGetData`, `CSRMM`, `CSRSum`, `IndexSelectCPUFromGPU`
* Fixed casting issue in `_LinearSearchKernel` that was preventing it from supporting `__half`
* Added `#if`'d out specializations of `CSRGEMM`, `CSRGEAM`, and `Xgeam`, which would require functions that aren't currently provided by cublas

* * Added more specific error messages for unimplemented FP16 specializations of Xgeam, CSRGEMM, and CSRGEAM

* * Added missing instantiation of DLDataTypeTraits<__half>::dtype

* * Fixed linter error
* Added clearer comment explaining why the cast to long long is necessary

* * Worked around a compile error in some particular setup, where __half can't be constructed on the host side

* * Fixed linter formatting errors

* * Changes to comments as recommended

* * Made recommended changes to logging errors in FP16 specializations
* Also changed the existing Xgeam function for unsupported data types from LOG(INFO) to LOG(FATAL)
2022-06-27 14:26:18 -07: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 00c09b9f91 Revert "[bugfix] Explicitly unpin tensoradapter allocated arrays (#3997)" (#4061)
This reverts commit fdd1fe1908.
2022-05-28 20:44:20 +08:00
nv-dlasalle fdd1fe1908 [bugfix] Explicitly unpin tensoradapter allocated arrays (#3997)
* Explicitly unpin tensoradapter allocated arrays

* Undo unrelated change

* Add unit test

* update unit test
2022-05-16 13:02:02 -07:00
Quan (Andy) Gan 7f1a5e080b bump version (#3795) 2022-03-02 13:02:55 +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 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
MaoYuan Xian b002f8f99f Pass the std:min argument's type, to avoid the compilation error. (#3637)
* Pass the std:min argument's type, to avoid the compilation error.

* Update parallel_for.h

* Update negative_sampling.cc

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-01-11 14:46:24 +08:00
Quan (Andy) Gan 90f10b31cb [Feature] Negative sampling (#3599)
* first commit

* a bunch of fixes

* add unique

* lint

* lint

* lint

* address comments

* Update negative_sampler.py

* fix

* description

* address comments and fix

* fix

* replace unique with replace

* test pylint

* Update negative_sampler.py
2022-01-07 18:26:14 +08:00
Quan (Andy) Gan b226fe014e [Windows] Support NDArray in shared memory on Windows (#3615)
* support shared memory on windows

* Update shared_mem.cc
2022-01-04 18:51:14 +08:00
Rhett Ying e234fcfa8f [Feature] enable create/set/free cuda stream for internal use (#3334)
* [Feature] enable create/set/free cuda stream for internal use

* add unit test

* fix unit test failure on mxnet and tf

* refactor stream wrapper

* fix lint error

* fix lint error
2021-09-29 15:35:02 +08:00
Quan (Andy) Gan a04a8d066e [Feature] Graceful handling of exceptions thrown within OpenMP blocks (#3353)
* graceful c++ exception in OpenMP

* credits

* add test

Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-09-22 13:44:46 +08:00
Tomasz Patejko f5183820d1 [Performance, CPU] Rewriting OpenMP pragmas into parallel_for (#3171)
* [CPU, Parallel] Rewriting omp pragmas with parallel_for

* [CPU, Parallel] Decrease number of calls to task function

* c[CPU, Parallel] Modify calls to new interface of parallel_for
2021-09-02 16:39:48 +08:00
Rhett Ying 5a2451047f [Feature] enable to specify stream in UnitGraph::CopyTo() which could lead to async copy (#3297)
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-09-01 17:57:20 +08:00
Quan (Andy) Gan 213e27f05c Bump nightly version (#3146) 2021-08-02 17:24:18 +08:00
David Min 905c0aa578 [Feature][Performance][GPU] Introducing UnifiedTensor for efficient zero-copy host memory access from GPU (#3086)
* Add pytorch-direct version

* Initial commit of unified tensor

* Merge branch 'master' of https://github.com/davidmin7/dgl

* Remove unnecessary things

* Fix error message

* Fix/Add descriptions

* whitespace fix

* add unpin

* disable IndexSelectCPUFromGPU with no CUDA

* add a newline for unified_tensor.py

* Apply changes based on feedback

* add 'os' module

* skip unified tensor unit test for cpu only

* Update tests/pytorch/test_unified_tensor.py

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>

* reflect feedback

Co-authored-by: shhssdm <shhssdm@gmail.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-07-17 00:06:20 +08:00