Skip to content

[cuTile] Add v3 cuTile backends for 8 Liger ops - #1321

Open
xjmxyt wants to merge 2 commits into
linkedin:mainfrom
xjmxyt:add_kernel_v3
Open

[cuTile] Add v3 cuTile backends for 8 Liger ops#1321
xjmxyt wants to merge 2 commits into
linkedin:mainfrom
xjmxyt:add_kernel_v3

Conversation

@xjmxyt

@xjmxyt xjmxyt commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Add cuTile (nvidia-cuda-tile) backends, dispatched via LIGER_KERNEL_IMPL=cutile, for eight ops — each drops into the existing LigerXxxFunction autograd interface so the backend swap is transparent:

rms_norm, swiglu (SiLUMul), dyt, softmax, poly_norm,
fused_add_rms_norm, fused_linear_cross_entropy,
grpo_loss (token- and sequence-level importance sampling, GRPO/CISPO/SAPO/VESPO)

Correctness is exercised by the existing transformer suites run under LIGER_KERNEL_IMPL=cutile (which routes each op to its cuTile implementation), and test_cutile_backend.py verifies that routing.

Benchmarks: Triton-vs-cuTile speed+memory data on NVIDIA B200 for all eight ops
image
image
image
image
image
image
image
image

Summary

Testing Done

  • Hardware Type:
  • run make test to ensure correctness
  • run make checkstyle to ensure code style
  • run make test-convergence to ensure convergence

Add cuTile (nvidia-cuda-tile) backends, dispatched via LIGER_KERNEL_IMPL=cutile,
for eight ops — each drops into the existing LigerXxxFunction autograd interface
so the backend swap is transparent:

  rms_norm, swiglu (SiLUMul), dyt, softmax, poly_norm,
  fused_add_rms_norm, fused_linear_cross_entropy,
  grpo_loss (token- and sequence-level importance sampling, GRPO/CISPO/SAPO/VESPO)

Correctness is exercised by the existing transformer suites run under
LIGER_KERNEL_IMPL=cutile (which routes each op to its cuTile implementation), and
test_cutile_backend.py verifies that routing.

Notable correctness fixes made while validating on B200 (sm_100):
- grpo_loss: round BLOCK_N up to a power of 2 (ct.arange requires it) and flatten
  the rank-2 vllm_is_ratio to 1-D for the flat gather — both only bit non-power-of-2
  vocab sizes.
- fused_add_rms_norm: cast the LLAMA/NONE Y and dX stores back to the output dtype,
  so an fp32 norm weight with bf16 activations no longer fails to compile.

Benchmarks: Triton-vs-cuTile speed+memory data on NVIDIA B200 for all eight ops,
plus a benchmark-harness fix so multiple Liger providers in one script are tagged
distinctly (LIGER_BENCH_PROVIDER_TAG rewrites the leading "liger" of each provider).

Note: tvd and fused_neighborhood_attention cuTile ports were prototyped but are
NOT included — the open-source tileiras 13.3.36 miscompiles their kernels; they
fall back to the Triton implementations until the compiler fix ships.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@xjmxyt xjmxyt changed the title [cuTile] Add v3 cuTile backends for 8 Liger ops + benchmarks [Draft|cuTile] Add v3 cuTile backends for 8 Liger ops Jul 24, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@xjmxyt xjmxyt changed the title [Draft|cuTile] Add v3 cuTile backends for 8 Liger ops [cuTile] Add v3 cuTile backends for 8 Liger ops Jul 28, 2026
@xjmxyt

xjmxyt commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@vaibhavjindal @Tcc0403 Could you help to review this PR? Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant