STT-tensorflow/tensorflow/compiler/xla/python
Peter Hawkins 572442eb16 [PJRT] Fix potential misuse of PjRtBuffer::FromHostBuffer.
Add a new `PjRtBuffer::HostBufferSemantics` enum that describes the possible contracts between caller and runtime.

* Change `FromHostBuffer(..., force_copy, ...)` to `FromHostBuffer(..., host_buffer_semantics, ...)`.

We were seeing some data races between modifications to a NumPy array and JAX on CPU, due to unintended buffer aliasing. This change allows clients to control whether they want zero-copy behavior or not.

PiperOrigin-RevId: 316672280
Change-Id: Ibee296305005e0aa306a2c0aacf4b35a3d6c3ac1
2020-06-16 06:59:42 -07:00
..
tpu_driver [XLA:Python] Add support for collecting Python tracebacks. 2020-06-04 13:39:07 -07:00
__init__.py
bfloat16_test.py [XLA] Softplus should be monontic 2020-06-08 15:16:26 -07:00
bfloat16.cc [XLA] Softplus should be monontic 2020-06-08 15:16:26 -07:00
bfloat16.h systemlibs: unbundle pybind11 2020-04-08 03:38:38 +08:00
BUILD [XLA:Python] Implement on-device heap profiling support for JAX. 2020-06-12 11:18:13 -07:00
custom_call_for_test.pyx [XLA:Python] Add NextAfter to Python client. 2019-10-21 11:20:02 -07:00
dlpack.cc [XLA:Python] Optimize traceback implementation. 2020-06-05 18:42:03 -07:00
dlpack.h [XLA:Python] Add a PyClient wrapper object around PjRtClient. 2020-06-05 14:18:04 -07:00
ops.cc [XLA:Python] Split bindings for XLA ops into a separate file. No functional changes. 2020-05-26 18:38:07 -07:00
ops.h [XLA:Python] Split bindings for XLA ops into a separate file. No functional changes. 2020-05-26 18:38:07 -07:00
outfeed_receiver_py.cc [XLA:Python] Add a PyClient wrapper object around PjRtClient. 2020-06-05 14:18:04 -07:00
outfeed_receiver_py.h An implementation of a multithreaded runtime for receiving outfeed data 2020-05-27 05:52:21 -07:00
outfeed_receiver_test.cc [XLA:Python] Small refactoring to OutfeedReceiver. 2020-06-05 10:13:41 -07:00
outfeed_receiver.cc [XLA:Python] Small refactoring to OutfeedReceiver. 2020-06-05 10:13:41 -07:00
outfeed_receiver.h [XLA:Python] Small refactoring to OutfeedReceiver. 2020-06-05 10:13:41 -07:00
py_buffer.cc [XLA:Python] Implement on-device heap profiling support for JAX. 2020-06-12 11:18:13 -07:00
py_buffer.h [XLA:Python] Implement on-device heap profiling support for JAX. 2020-06-12 11:18:13 -07:00
py_client.cc [PJRT] Fix potential misuse of PjRtBuffer::FromHostBuffer. 2020-06-16 06:59:42 -07:00
py_client.h [PJRT] Fix potential misuse of PjRtBuffer::FromHostBuffer. 2020-06-16 06:59:42 -07:00
py_executable.cc [XLA:Python] Implement on-device heap profiling support for JAX. 2020-06-12 11:18:13 -07:00
py_executable.h [XLA:Python] Implement on-device heap profiling support for JAX. 2020-06-12 11:18:13 -07:00
python_ref_manager.cc [XLA:Python] Optimize traceback implementation. 2020-06-05 18:42:03 -07:00
python_ref_manager.h [XLA:Python] Optimize traceback implementation. 2020-06-05 18:42:03 -07:00
traceback.cc [XLA:Python] Implement on-device heap profiling support for JAX. 2020-06-12 11:18:13 -07:00
traceback.h [XLA:Python] Implement on-device heap profiling support for JAX. 2020-06-12 11:18:13 -07:00
types.cc [XLA:Python] Implement __cuda_array_interface__ on DeviceBuffer. 2020-01-30 17:45:31 -08:00
types.h [XLA:Python] Add a PyClient wrapper object around PjRtClient. 2020-06-05 14:18:04 -07:00
xla_client_test.py [PJRT] Fix potential misuse of PjRtBuffer::FromHostBuffer. 2020-06-16 06:59:42 -07:00
xla_client.py [PJRT] Fix potential misuse of PjRtBuffer::FromHostBuffer. 2020-06-16 06:59:42 -07:00
xla.cc [PJRT] Fix potential misuse of PjRtBuffer::FromHostBuffer. 2020-06-16 06:59:42 -07:00