Skip to content

Instantly share code, notes, and snippets.

@Chillee
Chillee / tv_layout_viz.py
Last active September 19, 2025 09:51
Cutlass Thread-Value Layout Visualizer
import math
import cutlass.cute as cute
import cutlass
def visualize_tv_layout(
tiler_mn: tuple[int, int],
tv_layout, # (((thr_shape),(val_shape)),
# ((thr_stride),(val_stride)))
*,
font_size: int = 10,
@mcarilli
mcarilli / nsight.sh
Last active October 1, 2025 14:07
Favorite nsight systems profiling commands for Pytorch scripts
# This isn't supposed to run as a bash script, i named it with ".sh" for syntax highlighting.
# https://developer.nvidia.com/nsight-systems
# https://docs.nvidia.com/nsight-systems/profiling/index.html
# My preferred nsys (command line executable used to create profiles) commands
#
# In your script, write
# torch.cuda.nvtx.range_push("region name")
# ...