jax.experimental.pallas.fuser.fuse#
- jax.experimental.pallas.fuser.fuse(f=None, *, resolve_fusion_dtypes=True, debug=False, strict_mode=True, static_argnums=None, static_argnames=None)[source]#
Fuses a function into a single fusible.
There should be a single call to a
fusibleinside the body off.fusereturns a transformed function that will fuse the surrounding computation into the fusible and invoke it. The fused function cannot takejax.ref.Refobjects as arguments (it must close overRefsinstead).- Parameters:
f β The function to fuse.
resolve_fusion_dtypes (bool) β (experimental) whether or not to resolve fusion dtypes (which donβt correspond to physical dtypes)
debug (bool) β Whether to print debug information.
strict_mode (bool) β Whether to verify block index map equality in collisions during block spec propagations in output fusions.
static_argnums (int | Sequence[int] | None) β An optional int or collection of ints that specify which positional arguments to treat as static (compile-time constant).
static_argnames (str | Iterable[str] | None) β An optional string or collection of strings specifying which named arguments to treat as static (compile-time constant).
- Returns:
A fused version of
f, or a decorator iffisNone.