Skip to content
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

Debug option for individual Taichi kernel #6514

Open
houkensjtu opened this issue Nov 4, 2022 · 2 comments
Open

Debug option for individual Taichi kernel #6514

houkensjtu opened this issue Nov 4, 2022 · 2 comments
Assignees
Labels
feature request Suggest an idea on this project

Comments

@houkensjtu
Copy link
Contributor

Concisely describe the proposed feature
A debug option for individual kernels comes in handy when a user wants to focus on a certain section of his/her code. I expect this feature to be especially useful when people collaborate on a relatively large program.
Currently, the debug=True option will turn all kernels into the debug mode:

ti.init(arch=ti.gpu, debug=True)

However, a user might want to turn on the debug flag for only one of the kernels to avoid dealing with unrelated error messages:

@ti.kernel(debug=True)
def test_debug():  # debug turned on for this kernel
    ...

@ti.kernel
def test_no_debug():  # debug=False will still be the default option
    ....

Please let me know if you have any comments on this request. Thank you!

@houkensjtu houkensjtu added the feature request Suggest an idea on this project label Nov 4, 2022
@taichi-gardener taichi-gardener moved this to Untriaged in Taichi Lang Nov 4, 2022
@lin-hitonami lin-hitonami moved this from Untriaged to Backlog in Taichi Lang Nov 4, 2022
@ailzhang
Copy link
Contributor

ailzhang commented Nov 4, 2022

@houkensjtu It's indeed possible (and desired) in the future that we can configure compile options per taichi kernel (which requires a non-trivial amount of refactor).

Also some of the debug features are global instead of per kernel (e.g. vulkan printing) that it's not possible to configure per kernel. So those need to be separated before properly allowing a per-kernel compile config.

A (maybe) short-term thing we can do is adding kernel_name to the log so that you can filter and grep.

@yuanming-hu
Copy link
Member

+1. This would be very helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Suggest an idea on this project
Projects
Status: Backlog
Development

No branches or pull requests

3 participants