[BUG][CuTe DSL] crd2idx call may cause a floating point exception crash
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
Thanks for reporting this. It's unfortunate it did not report more meaningful error message instead :-( Will try to address this soon.
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.
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.
This is fixed and shipped in 4.1. Feel free to let us know if you see other issues :-)