Skip to content

feat: add debug dialect #342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2025
Merged

feat: add debug dialect #342

merged 1 commit into from
Mar 31, 2025

Conversation

Roger-luo
Copy link
Member

@Roger-luo Roger-luo commented Mar 31, 2025

closes #336 printing this PR adds a new dialect named debug to model possible debug related operations, right now this dialect only has an info statement that prints a message and optionally some variables feed after the message. Similar to icecream we will detect the name of the variable and print the name and value pair of the variable. See below for the printing

image

cc: @cduck

@Roger-luo Roger-luo added enhancement New feature or request dialect general dialect framework related issues labels Mar 31, 2025
Copy link
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
9008 7914 88% 0% 🟢

New Files

File Coverage Status
src/kirin/dialects/debug.py 71% 🟢
TOTAL 71% 🟢

Modified Files

No covered modified files...

updated for commit: c032c54 by action🐍

Copy link
Contributor

github-actions bot commented Mar 31, 2025

PR Preview Action v1.6.0
Preview removed because the pull request was closed.
2025-03-31 18:59 UTC

@Roger-luo Roger-luo merged commit abf62df into main Mar 31, 2025
11 checks passed
@Roger-luo Roger-luo deleted the roger/debug-dialect branch March 31, 2025 18:58
@Roger-luo Roger-luo added the backport backport to latest release label Mar 31, 2025
Copy link

codecov bot commented Mar 31, 2025

Codecov Report

Attention: Patch coverage is 70.96774% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/kirin/dialects/debug.py 70.96% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Roger-luo
Copy link
Member Author

this feature can be backported since it is non-breaking (since we are at 0.x.y this is not violating semver)

Roger-luo added a commit that referenced this pull request Mar 31, 2025
closes #336 printing this PR adds a new dialect named `debug` to model
possible debug related operations, right now this dialect only has an
`info` statement that prints a message and optionally some variables
feed after the message. Similar to `icecream` we will detect the name of
the variable and print the name and value pair of the variable. See
below for the printing


![image](https://github.com/user-attachments/assets/f28eb254-9276-401c-a23f-27a2910948bf)

cc: @cduck
Copy link

@cduck cduck left a comment

Choose a reason for hiding this comment

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

Nice!

Roger-luo added a commit that referenced this pull request Apr 5, 2025
closes #336 printing this PR adds a new dialect named `debug` to model
possible debug related operations, right now this dialect only has an
`info` statement that prints a message and optionally some variables
feed after the message. Similar to `icecream` we will detect the name of
the variable and print the name and value pair of the variable. See
below for the printing


![image](https://github.com/user-attachments/assets/f28eb254-9276-401c-a23f-27a2910948bf)

cc: @cduck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport backport to latest release dialect general dialect framework related issues enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow print statements in kernels for debugging
2 participants