Skip to content

Best practices for debugging #198

Answered by sharadmv
hr0nix asked this question in Q&A
Discussion options

You must be logged in to vote

What are the interpret and debug parameters to pallas_call and how do I use them?

  • interpret: when this is True, the kernel is compiled using HLO/XLA, not Triton. Specifically we run a loop over program ids and don't parallelize their execution. This emulates how the kernel will be run using Triton.

  • debug: when this is True, we print out the IRs used during compilation

My suggestion for debugging practices are:

  • if you run into a weird exception or crash, run with debug=True and upload the resulting IRs and exception/crash in a GH issue and we can investigate
  • if you're debugging numerics/correctness, run with interpret=True and use jax.debug.print to inspect values
  • if you're debugg…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hr0nix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants