[AscendNPU-IR][AI] Support skill to visualize precision error debugging#821
[AscendNPU-IR][AI] Support skill to visualize precision error debugging#821mmyy1217 wants to merge 3 commits intotile-ai:npuirfrom
Conversation
mmyy1217
commented
Apr 15, 2026
- Add precision ASCII-visualization tool
- Add agent skill related to this precision ASCII-visualization tool
|
👋 Hi! Thank you for contributing to the TileLang project. Please remember to run We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀 |
There was a problem hiding this comment.
Code Review
This pull request introduces a precision debugging utility, tilelang.utils.precision_debug.assert_close, which provides detailed mismatch reports and ASCII diff maps. The implementation includes new agent skills and evaluation prompts to support automated debugging. Key feedback includes a critical indentation error and discouraged wildcard import in the utilities initialization, a truncated duplicate line in the documentation, and a suggestion to adjust the stack depth traversal for more accurate caller identification.
| from .npu_utils import * | ||
| from .precision_debug import assert_close as assert_close |
There was a problem hiding this comment.
This change introduces a syntax error (IndentationError) because the following lines (18-20) remain indented but are no longer part of an import grouping. Additionally, wildcard imports (from ... import *) are generally discouraged as they pollute the namespace. It is better to maintain the explicit import list and add the new assert_close utility separately.
| from .npu_utils import * | |
| from .precision_debug import assert_close as assert_close | |
| from .precision_debug import assert_close | |
| from .npu_utils import ( |
| - If multiple mappings match, select by priority and keep at most 3 primary doc references. | ||
| - Always include at least 1 concrete API doc under docs/Tilelang.language/ when the question is API-related. | ||
| - If API docs and examples differ, API docs are source of truth and examples are secondary. | ||
| f truth and examples are secondary. |
| for _ in range(4): | ||
| frame = frame.f_back |
There was a problem hiding this comment.
The stack depth traversal here (4 levels) seems too deep for capturing the immediate caller of assert_close. Typically, 2 levels are sufficient: one to skip _get_caller_info and one to skip assert_close itself. Using 4 levels might result in reporting internal framework or test runner frames (like pytest) instead of the user's test function.
| for _ in range(4): | |
| frame = frame.f_back | |
| for _ in range(2): |
d27504c to
b9a67b9
Compare
b9a67b9 to
e91b51a
Compare