MCPcopy
hub / github.com/dmlc/dgl / to_dgl_nd

Function to_dgl_nd

python/dgl/_sparse_ops.py:63–65  ·  view source on GitHub ↗

Convert framework-specific tensor/None to dgl ndarray.

(x)

Source from the content-addressed store, hash-verified

61
62
63def to_dgl_nd(x):
64 """Convert framework-specific tensor/None to dgl ndarray."""
65 return nd.NULL["int64"] if x is None else F.zerocopy_to_dgl_ndarray(x)
66
67
68def to_dgl_nd_for_write(x):

Callers 15

_edge_softmax_backwardFunction · 0.70
_edge_softmax_forwardFunction · 0.70
_gspmmFunction · 0.70
_gspmm_heteroFunction · 0.70
_segment_mmFunction · 0.70
_segment_mm_backward_BFunction · 0.70
_gather_mmFunction · 0.70
_gather_mm_scatterFunction · 0.70
_gsddmmFunction · 0.70
_gsddmm_heteroFunction · 0.70
_segment_reduceFunction · 0.70
_scatter_addFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected