Skip to content

[CuTe DSL] Cache each distinct one-time warning - #3629

Open
XFDG wants to merge 1 commit into
NVIDIA:mainfrom
XFDG:fix/warn-once-cache-3501
Open

XFDG wants to merge 1 commit into
NVIDIA:mainfrom
XFDG:fix/warn-once-cache-3501

Conversation

@XFDG

@XFDG XFDG commented Sep 13, 2026

Copy link
Copy Markdown

Summary

  • make print_warning_once retain every distinct message instead of only the most recent one
  • prevent an earlier warning from being emitted again after a different message evicts it
  • add a regression test for the first, second, first sequence and isolate the global cache between tests

Testing

  • B200 node, Python 3.12: an AST-extracted execution of the current-main method emitted 3 warnings for first, second, first and exited 2
  • B200 node, Python 3.12: the fixed source emitted exactly 2 distinct warnings and exited 0
  • python3 -m py_compile python/CuTeDSL/cutlass/base_dsl/dsl.py test/python/CuTeDSL/test_warning.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 #3501

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: print_warning_once re-warns when more than one distinct message is used (lru_cache maxsize=1)

1 participant