xnn.common.models.ops.small_gather_elements#

xnn.common.models.ops.small_gather_elements()[source]#

Element count below which gather_rows() and scatter_sum() use index_select and index_add_ on CUDA as well.

The kernels cost the same there, and the expanded index of gather / scatter_add_ adds host-side view operations, which bound small systems. A function, not a module constant: TorchScript cannot read module globals.

Return type:

int