stringjax_tools.auto_vectorise#
Rank-checked automatic vectorisation helpers.
The central helper is auto_vmap(), a conservative decorator for functions
whose single-sample input ranks are known. At call time, selected arguments are
checked before JAX tracing. Rank r is treated as one sample, rank r + 1
as a paired leading-axis batch, and checked batched arguments must share the
same leading size.
Core decorator#
|
Optional exact trailing sample-shape specification. |
|
Decorate a single-sample function with conservative automatic batching. |
Defaults and cache management#
|
Update global default sample ranks used by |
Return a copy of the active global sample-rank defaults. |
|
Clear all global sample-rank defaults. |
|
|
Temporarily update global sample-rank defaults inside a |
|
Update global default exact sample-shape specifications. |
Return a copy of the active global sample-shape defaults. |
|
Clear all global sample-shape defaults. |
|
|
Temporarily update global sample-shape defaults inside a |
|
Clear cached wrappers created by |