MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / from_pyval

Method from_pyval

tensorflow/compiler/xla/python/xla_client.py:392–395  ·  view source on GitHub ↗

Copies the `pyval` to a freshly allocated on-device buffer.

(pyval, device=None, backend=None, force_copy=False)

Source from the content-addressed store, hash-verified

390
391 @staticmethod
392 def from_pyval(pyval, device=None, backend=None, force_copy=False):
393 """Copies the `pyval` to a freshly allocated on-device buffer."""
394 backend = backend or get_local_backend()
395 return backend.buffer_from_pyval(pyval, device, force_copy=force_copy)
396
397 @staticmethod
398 def make_tuple(buffers, device, backend=None):

Callers 15

_ExecuteMethod · 0.45
testMakeTupleMethod · 0.45
testShapeMethod · 0.45
testTupleShapeMethod · 0.45
testCopyToHostMethod · 0.45
testDeviceMethod · 0.45
testRoundTripMethod · 0.45

Calls 2

get_local_backendFunction · 0.85
buffer_from_pyvalMethod · 0.45

Tested by 15

_ExecuteMethod · 0.36
testMakeTupleMethod · 0.36
testShapeMethod · 0.36
testTupleShapeMethod · 0.36
testCopyToHostMethod · 0.36
testDeviceMethod · 0.36
testRoundTripMethod · 0.36