NVIDIA / NVIDIA/cutlass

[BUG] cute.slice_ SIGABRTs on a static swizzled ComposedLayout

Open
#3,454 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug

cute.slice_ native-aborts on a fully static swizzled ComposedLayout. No Python exception, no MLIR diagnostic. Compiler crash, not a kernel failure.

Not the same as #3255 (that one is tensor[…] with dynamic ? strides).

Steps/Code to reproduce bug

import cutlass.cute as cute

@cute.jit
def repro():
    layout = cute.make_composed_layout(
        cute.make_swizzle(3, 4, 3),
        0,
        cute.make_layout((10, 2), stride=(2, 1)),
    )
    print(layout, flush=True)
    cute.slice_(layout, (None, 0))

if __name__ == "__main__":
    cute.compile(repro)
S<3,4,3> o 0 o (10,2):(2,1)
Aborted (core dumped)

Same slice succeeds if the first mode is 8 instead of 10. cute.select(layout, [0]) on this layout also succeeds.

Expected behavior

Return a sliced layout, or raise a Python/MLIR error. Should not abort().

Environment details

  • Bare-metal, NVIDIA H20 (sm_90), driver 535.183.06, Linux x86_64
  • Python 3.13.14, CUDA 13.0
  • nvidia-cutlass-dsl == 4.6.1 and 4.7.0 (both abort on this repro)

Additional context

Python stack ends in SliceOp.__init__ (cute.slice MLIR op). _cutlass_ir*.so is stripped, so there is no usable C++ backtrace.

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 provided @cute.jit repro and the Python stack ending in SliceOp.init for the cute.slice MLIR operation. Compare the failing static swizzled layout with the working mode-8 case and the successful cute.select call. Done means the repro no longer aborts and instead returns a sliced layout or raises a Python/MLIR diagnostic.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.