Skip to content

[BUG] CuTe DSL RMSNorm example faults or leaves rows unwritten past 2**31 elements #3925

Open

Description

@bhargavchintam

Which component has the problem?

CuTe DSL

Bug Report

Describe the bug

examples/python/CuTeDSL/cute/blackwell/kernel/rmsnorm/rmsnorm.py takes each block's tile with cute.local_tile(mX, tiler_mn, (bidx, cluster_y)). mX and mO have the static row stride N and bidx is the Int32 block index, so the tile offset is computed in 32 bits. With one row per CTA it is sign-extended and the kernel faults once a tile starts at 231 elements. The other configs zero-extend it, so the tile at 232 elements wraps to row 0 and its own row is never written.

Steps/Code to reproduce bug

Main f8acf1a, B200, nvidia-cutlass-dsl 4.9.0.dev1, torch 2.14.1+cu130, BFloat16 unless named, from that folder:

python rmsnorm.py --M 262144 --N 8192                      # PASS (2**31 elements)
python rmsnorm.py --M 262145 --N 8192                      # torch.AcceleratorError: CUDA error: an illegal memory access was encountered
python rmsnorm.py --M 262145 --N 8192 --dtype Float32      # same
python rmsnorm.py --M 131073 --N 16384                     # same
python rmsnorm.py --M 524289 --N 4096                      # PASS
python rmsnorm.py --M 1048577 --N 4096                     # AssertionError: Tensor-likes are not close! Greatest absolute difference: 7.0625 at index (1048576, 2220)
python rmsnorm.py --M 131073 --N 32768                     # same error, at index (131072, 24604)

Expected behavior

Each command passes its reference check, as it does for smaller M.

Environment details (please complete the following information):

  • Environment location: Cloud (Nebius), B200, driver 580.196.07, CUDA 13.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions