Skip to content

[FEAT] Support the profiler client for cuTile kernels - #524

Draft
pd-hung wants to merge 1 commit into
cutile-supportfrom
cutile-profiler
Draft

pd-hung wants to merge 1 commit into
cutile-supportfrom
cutile-profiler

Conversation

@pd-hung

@pd-hung pd-hung commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds cuTile support to the profiler client. Stacked on #499.

  • tilelens.trace("profiler", frontend="cutile") and the tile-profiler CLI work for cuTile kernels. Under the CLI, ct.launch runs through the CPU interpreter, and each kernel is traced once so statistics accumulate across launches, like the Triton CLI.
  • Reports the same statistics as for Triton: load/store bytes, masked elements, and for-loop lengths. For cuTile, "masked" counts the padded out-of-bounds elements of partial tiles, since tiled loads have no user mask.
  • For-loops are found by rewriting kernel and helper source, like Triton and NKI (tilelens/core/frontend/cutile_transform.py).
  • Load/store skipping returns cuTile-shaped zeros for loads and matmuls and drops stores. Atomics are never skipped, matching Triton.
  • Block sampling works as in Triton. The AMD buffer-load check is turned off for cuTile.
  • CUDA tensors run on host copies that are written back after the launch, like Triton's interpreter.

Test Plan

New tests/cutile/test_cutile_profiler.py: byte and mask counts, loops, skipping, atomics, block sampling, and the CLI.
uv run pytest tests/

Related Issues

Breaking Changes

Checklist

  • I added tests to all new functionality I added/bugs I fixed.
  • I verified that a human has reviewed all code in this PR.
  • I ran npm run build:frontend if the PR modified any TypeScript code.
  • I made sure that my code is well documented (comments explaining strange code, docstrings for functions, website modified if new functionality added).

@pd-hung
pd-hung added this pull request to stack #526 November 2, 2026 20:45
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

Performance Benchmark

Benchmark main (min) PR (min) Change Samples
gemm N/A N/A N/A 0 / 0
gemm_oob N/A N/A N/A 0 / 0
indirect_load N/A N/A N/A 0 / 0
nested_loop N/A N/A N/A 0 / 0
block_pointer_loop_advance N/A N/A N/A 0 / 0
liger_jsd N/A N/A N/A 0 / 0
flaggems_layernorm N/A N/A N/A 0 / 0
swiglu 0.163s 0.163s -0.0% 20 / 20
cross_entropy N/A N/A N/A 0 / 0
fused_linear_jsd N/A N/A N/A 0 / 0
Total N/A N/A N/A N/A

Iterations: 1 warmup + 20 measured
Samples are shown as main / PR; long pytest benchmarks may use fewer samples.

This branch has not been deployed

No deployments
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