Skip to content

Leave zero argument bool alone in the CuTeDSL preprocessor - #3590

Closed
Hashim1999164 wants to merge 1 commit into
NVIDIA:mainfrom
Hashim1999164:bugfix/bool-zero-args
Closed

Hashim1999164 wants to merge 1 commit into
NVIDIA:mainfrom
Hashim1999164:bugfix/bool-zero-args

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Sep 6, 2026 •

Copy link
Copy Markdown

Staged bool() has no args so the preprocessor indexed args[0] and raised IndexError.

Only redirect bool when there is exactly one positional argument. Zero argument and keyword forms stay as bool so Python can raise TypeError.

Closes #3506

Test plan

Run test/python/CuTeDSL/test_bool_zero_args.py with the CuTeDSL package available.

@Hashim1999164

Copy link
Copy Markdown
Author

yo looks like this already landed on main (and #3506 is closed for 4.8). the preprocessor now only rewrites the one arg bool form and leaves bool() alone. gonna close this one out since theres nothing left to ship here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CuTeDSL: staged bool() with no arguments crashes the preprocessor with a raw IndexError

1 participant