legate.core.Runtime.create_store_from_buffer#
- Runtime.create_store_from_buffer(self, Type dtype, shape: Shape | Collection[int], data, bool read_only) LogicalStore #
Creates a Legate store from a Python object implementing the Python buffer protocol.
- Parameters:
- Returns:
Logical store attached to the buffer of the passed object
- Return type:
LogicalStore
- Raises:
BufferError – If the passed object does not implement the Python buffer protocol
Notes
It’s the callers’ responsibility to make sure that buffers passed to this function are never partially aliased; i.e., Python objects
A
andB
passed to this function must be backed by either the exact same buffer or two non-overlapping buffers. The code will exhibit undefined behavior in the presence of partial aliasing.