Skip to content

[AscendNPU-IR][AI] Support skill to visualize precision error debugging#821

Open
mmyy1217 wants to merge 3 commits intotile-ai:npuirfrom
mmyy1217:acc_debug_tool
Open

[AscendNPU-IR][AI] Support skill to visualize precision error debugging#821
mmyy1217 wants to merge 3 commits intotile-ai:npuirfrom
mmyy1217:acc_debug_tool

Conversation

@mmyy1217
Copy link
Copy Markdown
Collaborator

  1. Add precision ASCII-visualization tool
  2. Add agent skill related to this precision ASCII-visualization tool

@github-actions
Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the TileLang project.

Please remember to run bash format.sh in the root directory of the project to ensure your changes are properly linted and formatted. This will help ensure your contribution passes the format check.

We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work!

🚀

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tilelang/utils/__init__.py Outdated
Comment on lines +16 to +17
from .npu_utils import *
from .precision_debug import assert_close as assert_close
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

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.

Suggested change
from .npu_utils import *
from .precision_debug import assert_close as assert_close
from .precision_debug import assert_close
from .npu_utils import (

Comment thread AGENTS.md Outdated
- 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line appears to be a truncated duplicate of the previous line and should be removed.

Comment on lines +44 to +45
for _ in range(4):
frame = frame.f_back
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
for _ in range(4):
frame = frame.f_back
for _ in range(2):

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.

1 participant