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

Add "print"/"debug" nodes to IR. #372

Open
kaushikcfd opened this issue Oct 27, 2022 · 3 comments
Open

Add "print"/"debug" nodes to IR. #372

kaushikcfd opened this issue Oct 27, 2022 · 3 comments

Comments

@kaushikcfd
Copy link
Collaborator

  • This should partition the DAG and print the array.
  • This could be implemented using "tags" as well.
@kaushikcfd
Copy link
Collaborator Author

FWIW, here's how JAX implements it -- https://jax.readthedocs.io/en/latest/debugging/print_breakpoint.html.

@inducer
Copy link
Owner

inducer commented Sep 19, 2023

To be useful, this would also need some sort of conditional to filter

  • when it should happen at all, and
  • which array entries to print.

@inducer
Copy link
Owner

inducer commented Sep 19, 2023

An alternative to partitioning the DAG would be a printf loop in OpenCL. Don't know which way is less effort.

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

No branches or pull requests

2 participants