[Issue]: zipped divide crashes on some cases
@tingqli is already working on this.
Since Jun 25, 2026.
Assessment
This issue has not been assessed yet.
Description
Problem Description
During learning CuTe's layout divide, I found that there are some differences (& even unexpected crash) between Fly & CuTe in some special cases:
- Tiler's rank is smaller than input layout
- When there is
Noneelement in Tiler
Run following script under cutlass/python folder to see the differences and reproduce the crash
import pycute
a = pycute.layout.Layout((64,50,80),(16000,160,1))
print(a)
all_tiles = [(32, ),(32, None, None),(32, None, 40)]
for tile in all_tiles:
print("pycute:", tile)
print("\t", pycute.logical_divide(a, tile))
print("\t", pycute.zipped_divide(a, tile))
print("==================================")
import flydsl.compiler as flyc
import flydsl.expr as fx
def fx_test_div():
a = fx.make_layout((64,50,80),(16000,160,1))
for tile in all_tiles:
print("flydsl:", tile)
print("\t", fx.logical_divide(a, tile)) #
print("\t", fx.zipped_divide(a, tile)) # <======= crash on 2nd case
@flyc.jit
def test():
fx_test_div()
test()
when tiler is (32,):
- Cute logical-div: ((32, 2), 50, 80):((16000, 512000), 160, 1)
- Cute zipped-div: ((32,), (2, 50, 80)):((16000,), (512000, 160, 1))
- Fly logical-div: Layout<(32,(2,50,80)):(16000,(512000,160,1))>
- Fly zipped-div: Layout<(32,(2,50,80)):(16000,(512000,160,1))>
when tiler is (32, None, None)
- Cute logical-div: ((32, 2), 50, 80):((16000, 512000), 160, 1)
- Cute zipped-div: ((32, 1, 1), (2, 50, 80)):((16000, 0, 0), (512000, 160, 1))
- Fly logical-div: Layout<((32,2),50,80):((16000,512000),160,1)>
- Fly zipped-div: crash
python3: /root/tingqli/FlyDSL/include/flydsl/Dialect/Fly/Utils/IntTupleUtils.h:852: std::pair<_FIter, _FIter> mlir::fly::detail::intTupleZip2ByImpl(const mlir::fly::IntTupleBuilder<IntTuple>&, IntTuple, mlir::fly::IntTupleAttr) [with IntTuple = mlir::fly::IntTupleAttr]: Assertion `t.rank() == 2 && "intTupleZip2By expects rank-2 tuple at terminal"' failed.
Aborted (core dumped)
Operating System
22.04.5 LTS (Jammy Jellyfish)
CPU
Intel(R) Xeon(R) Platinum 8480C
GPU
MI308X
ROCm Version
rocm-7.2.0
ROCm Component
No response
Steps to Reproduce
No response
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
rocminfo --support output
Paste output here
Additional Information
No response
- Dominant language
- Python
- Stars
- 282
- Forks
- 120
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 67
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ROCm/FlyDSL
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100