In combo kernels without per_subkernel_blocks (the default), all
sub-kernels share a single XBLOCK value. When one sub-kernel has
xnumel=1, the shared XBLOCK is forced to 1 via the constants dict.
If a sibling sub-kernel generates a TMA tensor descriptor with XBLOCK
as the innermost block dimension, the resulting 1-element block
(e.g. 1 * 4 = 4 bytes for float32) violates the TMA 16-byte minimum.
The fix rejects TMA in are_block_parameters_compatible() when the
kernel is a combo sub-kernel with shared blocks and the innermost
block is XBLOCK with min_block_size > 1, since the actual XBLOCK
value cannot be guaranteed to satisfy TMA constraints.
Test Plan:
Added test_tma_descriptor_combo_kernel_shared_xblock which enables TMA
and combo_kernels, then runs a multi-output mean reduction that creates
a combo kernel with a full-reduce sub-kernel (xnumel=1) alongside
per-row sub-kernels.
python -m pytest test/inductor/test_torchinductor.py -xvs -k test_tma_descriptor_combo_kernel_shared_xblock
Co-Authored-By: Claude Opus 4.8
SOCIAL SHARE CARD GENERATOR