Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Converts cuTile GPU kernels (@ct.kernel) to Triton (@triton.jit), including dual-layout kernels and debugging of failed translations.
Use this skill ↓68% 82%+14 ptsof test cases passed
Passed 18 of 22 test cases with the skill, and 15 of 22 without it.
3 of 3 safety checks passed
Not used yet
This guide covers runtime errors that commonly appear after converting a cuTile kernel to Triton.
cudaErrorIllegalAddress (Illegal Memory Access)Symptom:
torch.AcceleratorError: CUDA error: an illegal memory access was encountered
Search for 'cudaErrorIllegalAddress' ...
This is the most frequent runtime crash when converting cuTile kernels that use pointer indirection (grouped/batched ops: group GEMM, batched attention, MoE, etc.).
What happens: When loading tensor pointers from a pointer table inside the kernel, the
element type must exactly match the actual tensor dtype. Triton's pointer arithmetic advances
the address by offset * element_size_in_bytes, so a wrong type causes every load/store to
hit an unintended address.
| Tensor dtype | Element size | tl.float16 pointer arithmetic | Result |
|---|---|---|---|
torch.float16 | 2 bytes | 2 bytes/element | Correct |
torch.bfloat16 | 2 bytes | 2 bytes/element | Correct (same size) |
torch.float32 | 4 bytes | 2 bytes/element | Off by 2× → crash |
Where to look: Any tl.load(ptr_table + idx).to(tl.pointer_type(...)) line with a
hardcoded type:
# WRONG — crashes for bfloat16/float32 inputs
a_ptr = tl.load(a_ptrs + group_id).to(tl.pointer_type(tl.float16))
b_ptr = tl.load(b_ptrs + group_id).to(tl.pointer_type(tl.float16))
c_ptr = tl.load(c_ptrs + group_id).to(tl.pointer_type(tl.float16))
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.