NVIDIA / NVIDIA/cutlass

[QST] [CuTeDSL] Alignment dropped by partition_S.

Open
#3,033 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

? - Needs Triage inactive-30d inactive-90d question
Dominant language
C++
Stars
10.5k
Forks
2.1k
Avg merge
3d 11h
Merged PRs (30d)
7

Description

What is your question?

Here is the code of my vectorized transposed kernel, it fails to compile with the error:

cutlass.base_dsl.common.DSLRuntimeError: DSLRuntimeError: 🧊🧊🧊 ICE IR Verification Failed 🧊🧊🧊
  Caused exception: Verification failed:
error: "cute.copy("("/home/brain_l/flashtree/base/cutedsl_kernel/src/transpose.py":41:4): 'cute.copy' op '!cute_nvgpu.atom.universal_copy<f32, 128 b>' ptr alignment does not meet requirement
 note: "cute.copy("("/home/brain_l/flashtree/base/cutedsl_kernel/src/transpose.py":41:4): see current operation: "cute.copy"(%arg3, %149, %161) : (!cute.tiled_copy<!cute_nvgpu.atom.universal_copy<f32, 128 b>, layout_copy_tv = <"((8,32),4):((128,1),32)">, tiler_mn = <"[32:1;32:1]">>, !cute.memref<f32, gmem, "((4,1),(1,1)):((1,0),(0,0))">, !cute.memref<f32, smem, align<16>, "((4,1),(1,1)):((1,0),(0,0))">) -> ()

I tried to print the iterator with cute.printf(g2s_thr_src.iterator), it shows align to 4 bytes. But the raw ptr value is aligned to 16 bytes. My guess is the alignment is not propogated correctly and is dropped by partition_S, how should I do this correctly?

raw_ptr(0x00007fbeac604c00: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604c10: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604c20: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604c30: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604c40: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604c50: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604c60: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604c70: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604d00: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604d10: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604d20: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604d30: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604d40: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604d50: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604d60: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604d70: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604e00: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604e10: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604e20: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604e30: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604e40: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604e50: f32, gmem, align<4>)
raw_ptr(0x00007fbeac604e60: f32, gmem, align<4>)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked gist and the transpose.py:41:4 cute.copy call, then trace how g2s_thr_src.iterator is produced through partition_S. Compare the iterator's reported align<4> metadata with the raw pointer addresses and the 128-bit copy requirement. Done means determining whether partition_S drops valid alignment information and documenting or correcting the propagation path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.