* Added to_cugraph and from_cugraph functionality
* fix from_cugraph example
* Addressed Reviews
* Fix linting
* Apply suggestions to docstrings from code review
Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>
* Add API docs and remove `from_cugraph` alias
* move cugraph tests to tests/cugraph/test_basics.py
* remove ununsed imports from test_basics.py
* remove pytest.importorskip as no longer needed
Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
* [Feature] extend sort_csr/csc_by_tag to edge
* fix test ffailure in tensorflow
* refine sorting by edges
* fix docstring
* remove unnecessary mem
Co-authored-by: Xin Yao <xiny@nvidia.com>
* Regolden graphsage example to guide others
* update golden
* update
* Update example and propagate to original folder
* Update to remove ^M (windows DOS) character
* update
* Merge file changes and update README
* Minor comment update
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
* * Workaround for graph data saving/loading compatibility problem in Column class. There may be more places in DGL with the same issue, due to using Python serialization, instead of a more cohesive, comprehensive strategy. This is just a local fix.
* Add checking for non-empty states
* Add unit test
* Handle the case of columns without storage
Co-authored-by: ndickson <ndickson@nvidia.com>
Co-authored-by: Xin Yao <xiny@nvidia.com>
* Update nccl communicator for when NCCL is missing
* Use static_cast
* Add doc string
* Fix whitespace
* Resrtict unit test to GPU runs
Co-authored-by: Xin Yao <xiny@nvidia.com>
* Add uva by default to embedding
* More updates
* Update optimizer
* Add new uva functions
* Expose new pinned memory function
* Add unit tests
* Update formatting
* Fix unit test
* Handle auto UVA case when training is on CPU
* Allow per-embedding decisions for whether to use UVA
* Address spares_optim.py comments
* Remove unused templates
* Update unit test
* Use dgl allocate memory for pinning
* allow automatically unpin
* workaround for d2h copy with a different dtype
* fix linting
* update error message
* update copyright
Co-authored-by: Xin Yao <xiny@nvidia.com>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
* 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>
* fix unstable sort
* add torch version check
* reformat
* split too long comments
* Update dataloader.py
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
* Fix fail to create_shared_mem_array in ddp spawn train #4110
Fix fail to create_shared_mem_array in ddp spawn train #4110
* [Bugfix] Fix fail to create_shared_mem_array in ddp spawn train #4110
[Bugfix] Fix fail to create_shared_mem_array in ddp spawn train #4110
Replace random.seed() to random_ = random.Random()
* Update pytorch.py
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
* add argument reorder=False for citation_graph
* add description of the argument reorder
* add reordered/un_reordered save_path
* add version number postfix
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
* * Added half_(), float_(), and double_() functions to DGLHeteroGraph, HeteroNodeDataView, and HeteroEdgeDataView, for converting floating-point tensor data to float16, float32, or float64 precision
* * Extracted out private functions for floating-point type conversion, to reduce code duplication
* * Added test for floating-point data conversion functions, half_(), float_(), and double_()
* * Moved half_(), float_(), and double_() functions from HeteroNodeDataView and HeteroEdgeDataView to Frame class
* * Updated test_float_cast() to use dgl.heterograph instead of dgl.graph
* Added to CONTRIBUTORS.md
* * Changed data type conversion to be deferred until the data is accessed, to avoid redundant conversions of data that isn't used.
* * Addressed issues flagged by linter
* * Worked around a bug in the old version of mxnet that's currently used for DGL testing
* * Only defer Column data type conversion if there is a pending device transfer or index sampling to be done. This is expected to be the desired behaviour based on discussions of a few use cases, as described in the comments.
* * Moved floating-point feature data conversion functions to dgl.transforms.functional
* Changed them from in-place behaviour to shallow copy (out-of-place) behaviour
* * Fixed linter issues
* * Removed lines that unintentionally added to_half, to_float, and to_double to DGLHeteroGraph
* Moved _init_api line to the end of the file again
* * Removed one of the two leading underscores from Frame.__astype_float, making it not fully private
Co-authored-by: nv-dlasalle <63612878+nv-dlasalle@users.noreply.github.com>
* Disable pinning non-contiguous memory
* Prevent views from being converted for write
* Fix linting
* Add unit tests
* Improve error message for users
* Switch to pytest function
* exclude mxnet and tensorflow from inplace pinning
* Add skip
* Restrict to pytorch backend
* Use backend to retrieve device
* Fix capitalization in decorator
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>