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

Function zerocopy_from_numpy

python/dgl/backend/tensorflow/tensor.py:494–499  ·  view source on GitHub ↗
(np_array)

Source from the content-addressed store, hash-verified

492
493
494def zerocopy_from_numpy(np_array):
495 # NOTE: not zerocopy
496 # This assumes tensor should be on cpu
497 with tf.device("/cpu:0"):
498 t = tf.convert_to_tensor(np_array)
499 return t
500
501
502def zerocopy_to_dgl_ndarray(data):

Callers 1

segment_reduce_backwardFunction · 0.70

Calls 1

deviceMethod · 0.45

Tested by

no test coverage detected