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

Method shared_memory

python/dgl/ndarray.py:37–51  ·  view source on GitHub ↗

Return a copy of the ndarray in shared memory Parameters ---------- name : str The name of the shared memory Returns ------- NDArray

(self, name)

Source from the content-addressed store, hash-verified

35 return functools.reduce(operator.mul, self.shape, 1)
36
37 def shared_memory(self, name):
38 """Return a copy of the ndarray in shared memory
39
40 Parameters
41 ----------
42 name : str
43 The name of the shared memory
44
45 Returns
46 -------
47 NDArray
48 """
49 return empty_shared_mem(name, True, self.shape, self.dtype).copyfrom(
50 self
51 )
52
53
54def cpu(dev_id=0):

Callers 4

test_single_processFunction · 0.45
sub_procFunction · 0.45
test_multi_processFunction · 0.45
test_copy_from_gpuFunction · 0.45

Calls 2

empty_shared_memFunction · 0.85
copyfromMethod · 0.80

Tested by 4

test_single_processFunction · 0.36
sub_procFunction · 0.36
test_multi_processFunction · 0.36
test_copy_from_gpuFunction · 0.36