jax.experimental.pallas.mosaic_gpu.RefUnion

jax.experimental.pallas.mosaic_gpu.RefUnion#

class jax.experimental.pallas.mosaic_gpu.RefUnion(*refs)[source]#

A sequence of trees of refs that are allowed to reuse the same memory.

One should not make assumptions as to how each ref will map to the underlying memory region, since arbitrary padding may be applied in between different refs.

As such, ref unions are only safe to use when the groups of refs that we intend to alias have disjoint lifetimes (i.e. one should never attempt to read data using a different ref than the one that was used to write the data).

Parameters:

refs (Sequence[_GPUMemoryRefTree])

__init__(*refs)[source]#
Parameters:

refs (_GPUMemoryRefTree)

Methods

__init__(*refs)

get_array_aval()

get_ref_aval()

get_ref_transforms()

Attributes

collective

dtype

layout

refs

shape

transforms

inner_aval

memory_space