flashinfer.comm._ulysses_lowp.capability

flashinfer.comm._ulysses_lowp.capability(device: device | str | int | None = None) → Dict[str, Any]

Describe availability of the ulysses_lowp kernels on the current device.

Reports the grid the device runs rather than one fixed grid: (8, 9) (SM89) and (12, 0) (SM120) run UlyssesLowpSageLayout (Q_GROUP=32, K_GROUP=64); (9, 0) (SM90 Hopper) runs UlyssesLowpSageLayoutSM90 (Q_GROUP=16, K_GROUP=128). Supported means that architecture’s module loaded and its compiled layout constants (Q_GROUP, K_GROUP, HEAD_DIM) match that layout’s Python-side values.

layout_class names the class to instantiate – resolve it with getattr(flashinfer.comm._ulysses_lowp, cap["layout_class"]) – and is None exactly when supported is False. Only the device’s own module is probed, so this never builds a translation unit the device cannot launch.

supported_head_dims lists the compiled dimensions (64 and 128). compiled_head_dim retains the default dimension, 128, for compatibility.

Because the answer follows the device, supported alone does not mean “the module-level functions will run”: those stay pinned to the SM89/SM120 grid. A caller pinned to one grid must check layout_class.

Parameters:

device – CUDA device to probe; None uses the current device.

Returns:

Dictionary of device capability, compiled grid, supported head dimensions, availability and layout class name.