cutlass icon indicating copy to clipboard operation
cutlass copied to clipboard

[BUG][CuTe DSL] crd2idx call may cause a floating point exception crash

Open alexwl opened this issue 7 months ago • 2 comments

Describe the bug When calling cute.crd2idx with arguments in the wrong order (layout, coord) instead of the correct (coord, layout), the program crashes with Floating point exception (core dumped) rather than raising a proper Python exception.

Steps/Code to reproduce bug

import cutlass.cute as cute
@cute.jit
def crash():
    layout = cute.make_layout((2, 2))
    coord = (0, 1) 
    idx = cute.crd2idx(layout, coord)
crash()

Environment details : CuTe DSL version: nvidia-cutlass-dsl 4.0.0.dev1

alexwl avatar May 22 '25 10:05 alexwl

Thanks for reporting this. It's unfortunate it did not report more meaningful error message instead :-( Will try to address this soon.

brandon-yujie-sun avatar May 22 '25 14:05 brandon-yujie-sun

Thanks for reporting. Just checked API, cute.crd2idx(layout, coord) should be cute.crd2idx(coord, layout).

We will improve the error report mechanism to provide better error message.

fengxie avatar May 28 '25 06:05 fengxie

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

github-actions[bot] avatar Jun 27 '25 07:06 github-actions[bot]

This is fixed and shipped in 4.1. Feel free to let us know if you see other issues :-)

brandon-yujie-sun avatar Jul 04 '25 02:07 brandon-yujie-sun