* * 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>
* Add failing unit test
* Fix negative sampler edge types
* fix test
* oops
* revert
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Quan Gan <coin2028@hotmail.com>
* enable uva for pinsage sampler
* unit test
* modify some checks on the python side
* remove legacy random walk code
* update unit test
* update unit test
* fix unit test
* adjust checks
* move some checks to c++
* move max_nodes check to cuda kernel
* fix ci for tf
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: nv-dlasalle <63612878+nv-dlasalle@users.noreply.github.com>
* 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>
* [Fix] be able to parse ids if numeric and non-numeric values are used together
* add required package info and cache note into docstring
* duplicate node id is not allowed
* WIP: TypedLinear and new RelGraphConv
* wip
* further simplify RGCN
* a bunch of tweak for performance; add basic cpu support
* update on segmm
* wip: segment.cu
* new backward kernel works
* fix a bunch of bugs in kernel; leave idx_a for future
* add nn test for typed_linear
* rgcn nn test
* bugfix in corner case; update RGCN README
* doc
* fix cpp lint
* fix lint
* fix ut
* wip: hgtconv; presorted flag for rgcn
* hgt code and ut; WIP: some fix on reorder graph
* better typed linear init
* fix ut
* fix lint; add docstring
* [Feature] support non-numeric node_id/src_id/dst_id/graph_id and rename CSVDataset
* change return value when iterate dataset
* refine data_parser
* force reload
* init
* init
* working cublasGemm
* benchmark high-mem/low-mem, err gather_mm output
* cuda kernel for bmm like kernel
* removed cpu copy for E_per_Rel
* benchmark code from Minjie
* fixed cublas results in gathermm sorted
* use GPU shared mem in unsorted gather mm
* minor
* Added an optimal version of gather_mm_unsorted
* lint
* init gather_mm_scatter
* cublas transpose added
* fixed h_offset for multiple rel
* backward unittest
* cublas support to transpose W
* adding missed file
* forgot to add header file
* lint
* lint
* cleanup
* lint
* docstring
* lint
* added unittest
* lint
* lint
* unittest
* changed err type
* skip cpu test
* skip CPU code
* move in-len loop inside
* lint
* added check different dim length for B
* w_per_len is optional now
* moved gather_mm to pytorch/backend with backward support
* removed a_/b_trans support
* transpose op inside GEMM call
* removed out alloc from API, changed W 2D to 3D
* Added se_gather_mm, Separate API for sortedE
* Fixed gather_mm (unsorted) user interface
* unsorted gmm backward + separate CAPI for un/sorted A
* typecast to float to support atomicAdd
* lint typecast
* lint
* added gather_mm_scatter
* minor
* const
* design changes
* Added idx_a, idx_b support gmm_scatter
* dgl doc
* lint
* adding gather_mm in ops
* lint
* lint
* minor
* removed benchmark files
* minor
* empty commit
Co-authored-by: Israt Nisa <nisisrat@amazon.com>
* add ut
* add doc link
* install dep
* fix ci
* fix ut; more comments
* remove deprecated attributes in rdf datasets; fix label feature name
* address comments
* fix ut for other frameworks
* 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>
* Added graph updating method and tests. resolves#3488
* removed spaces around named args
* customizing indices for graph's idtype and ctx
* changing torch ops to generic backend ops
* changing tensors to np arrays
* created dgl merge function and tests
* Changed per-graph edge updates to single ag update
* removed update method and tests
* reformat newlines & spaces
* concatenating in one-shot instead of iteratively
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
* [Feature] add CSVDataset to load data from csv files
* add CSVDataset class file
* install pyyaml when running unit tests
* install pandas for unit tests
* utilize pydantic for YAML config check
* generate yaml and csv files during test
* make more keys as optional
* remove/rename several keys in yaml config and more tets though looks a bit clumsy
* fix test failure on mxnet
* pass /path/to/dataset instead of yaml path
* code refinement
* code refine
* change several yaml field such as feat and graph_id
* merge graph generation logic
* refine code
* Refactored_first_version
* DGLCSVDataset works for single heterograph
* add more tests
* fix test failure in mxnet
* add docstring
* use list comprehension for dict
* fix version in YAML
* refine data length assert
* use dict.pop directly
* remove ambiguous variable names
* refine graph id missing logic
* refine graph create call
* separate node/edge/graph data parser
* remove separator in DefaultDataParser
* refine validation error log for yaml field
* minor check
* refine code via dict.get()
* move load_from_csv into Node/Edge/GraphData
* move _parse_node/edge/graph_data into Node/Edge/GraphData
* refine id-related fields check
* check duplicate ntypes/etypes when load yaml
* refine docstring
* edge_softmax_hetero forwar+cpu+norm=dst
* convert eids to list
* addedunittest
* added unittest
* added backward. Not tested correctness
* minor
* changed reducer to max from sum
* bugfix
* docstring
* add GPU unittest
* output converted to dict from tuple
* lint check
Co-authored-by: Israt Nisa <nisisrat@amazon.com>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
* CUDA support max/min reducer on forward pass
* docstring
* concised UpdateGradMinMax_hetero
* reorganized UpdateGradMinMax_hetero
* CUDA kernels for max/min reducer
* variable name
* lint check
* changed CUDA 2D thread mapping to 1D
* removed legacy cusparse for min/max reducer
* git CI issue
* restarting git CI
* adding namespace std
Co-authored-by: Israt Nisa <nisisrat@amazon.com>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
* Feat: support API "randomwalk_topk" in library
* Feat: use the new API "randomwalk_topk" for PinSAGESampler
* Minor
* Minor
* Refactor: modified codes as checker required
* Minor
* Minor
* Minor
* Minor
* Fix: checking errors in RandomWalkTopk
* Refactor: modified the docstring for randomwalk_topk
* change randomwalk_topk to internal
* fix
* rename
* Minor for pinsage.py
* Feat: support randomwalk and SelectPinSageNeighbors on GPU
Port RandomWalk algorithm on GPU,
and port SelectPinSageNeighbors on GPU.
* Feat: support GPU on python APIs
* Feat: remove perf print information in FrequenchHashmap
* Fix: modified the code format
Modified the code format as task_lint.sh suggested
* Feat: let test script support PinSAGESampler on GPU
Let test script support PinSAGESampler on GPU,
minor of "restart_prob".
* Minor
* Minor
* Minor
* Refactor: use the atomic operations from the array module
* Minor: change the long lines
* Refactor: modified the get_node_types for gpu
* Feat: update the contributor date
* Perf: remove unnecessary stream sync
* Feat: support other random walk
But the non-uniform choice is still not supported.
* Fix: add CUDA switch for random walk
Co-authored-by: Quan Gan <coin2028@hotmail.com>