Skip to content

[CuTe DSL] Reject incomplete dynamic f-string formats - #3630

Open
XFDG wants to merge 1 commit into
NVIDIA:mainfrom
XFDG:fix/width-only-fstring-format-3500
Open

XFDG wants to merge 1 commit into
NVIDIA:mainfrom
XFDG:fix/width-only-fstring-format-3500

Conversation

@XFDG

@XFDG XFDG commented Sep 13, 2026

Copy link
Copy Markdown

Summary

  • reject dynamic f-string format specs that do not end in a supported printf conversion character
  • prevent width-only specs such as {value:8} from producing malformed %8 device format strings that leave the argument unconsumed
  • preserve valid explicit specs such as .2f and add focused regression coverage

Testing

  • B200 node, Python 3.12: an AST-extracted execution of the current-main FormattedValue produced valid=%.2f width_only=%8 and exited 2
  • B200 node, Python 3.12: the fixed source produced valid=%.2f width_only=rejected and exited 0
  • python3 -m py_compile python/CuTeDSL/cutlass/base_dsl/ast_helpers.py test/python/CuTeDSL/test_formatted_value.py
  • the source checkout was not imported as a complete DSL package because its generated cutlass._mlir extension is not built on the validation node

Contribution disclosure

AI assistance was used for repository research, implementation, and running the checks above.

Fixes #3500

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: width-only f-string format spec emits a malformed device printf format (%8) and silently drops the value

2 participants