You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CuTeDSL: staged bool() with no arguments crashes the preprocessor with a raw IndexError #3506
visit_Call in cutlass/base_dsl/ast_preprocessor.py (~line 1971-1987) rewrites a staged bool(...) call into the DSL's bool_cast redirector using args=[node.args[0]] without checking that an argument is present. A jit body containing z = bool() therefore dies with a raw IndexError: list index out of range from inside the preprocessor instead of a proper diagnostic, while the one-argument case goes through bool_cast and produces a clean DSLUserCodeError when the argument is not convertible.
Verified against nvidia-cutlass-dsl==4.7.0; the repo source has the same unguarded node.args[0].
Actual: IndexError: list index out of range (no location info, no suggestion).
Expected: a DSL diagnostic, e.g. DSLUserCodeError explaining that bool() requires exactly one argument.
Suggested fix
Guard the rewrite: if len(node.args) != 1 or node.keywords, leave the call alone (or raise a proper DSLUserCodeError naming the file/function), so the failure carries a normal Python error message instead of an internal IndexError.
Activity
brandon-yujie-sun commentedon Sep 1, 2026
Thanks for reporting the issue. We got a fix, and will include it in next release.
brandon-yujie-sun commentedon Sep 22, 2026
@VaggelisGian this is fixed in 4.8. Let us know if you still see issues.