-
Notifications
You must be signed in to change notification settings - Fork 8
Simple debugging infra #276
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
base: main
Are you sure you want to change the base?
Conversation
c341a54 to
8a8b356
Compare
|
I removed the optimization passes, so there's a lot of messy plans now. I'm adding them back in a separate PR, which should clear up the extra loop(loop(, etc. After I add back in optimizations, we'll add a few reference outputs so that we can keep tabs on any optimizer regressions. |
|
Regarding the debugging, I'm not sure I want to complexify any of the existing passes. Is there a lower-overhead way to instrument the compiler stages? |
|
Reference outputs SGTM. I added a separate pass by calling class from Are these double MapJoins intended? I think previously we had InitWrite here. One thing: init About debugging: I will think about it - Each time I get stuck I spend some time searching where to print the plan (after which pass), so it could be instrumented (storing a plan after each pass that you can quickly fetch and print) and documented probably. What is your way of developing a pass? We could have proper log statements that are enabled with a flag or env var for printing plans. |
|
For more readable error logs in github CI we can have "smoke tests" with a few exhaustive tests after which whole test suite is executed. If something is broken in a PR in e.g. Logic you don't get +2000 errors from |
|
I think the right call is probably to add proper python logging of plans, with verbosity levels and logging.py. e.g. in c_codegen we have and I think there's a way to access the log. |
|
I want to fix optimize.py, but I'm working towards #277 first because it changes the Logic IR significantly. |
Hi @willow-ahrens,
I'm in the middle of reviewing #251, and I'm working on dense levels kernel for matmul operation.
First thing I would like to clear out is the mismatch of matmul and sddmm kernels generated with optimizer now and before the refactor.
Unfortunately we didn't test it thoroughly enough (e.g. only testing the output result of running a kernel instead of the actual kernel generated where it made sense).
So first - for A @ B where the raw logic is:
after logic optimization we get:
which results in multiple
loop(loop(...))for each input table only foroverwrite.Can we get rid of aggregate with overwrite?
Here is an expandable section with notation prgm from
NotationCompiler:Details
Apart from this issue, in terms of debugging, how about passing an optional
debug_ctxdown the compilation stack where passes/stages can "log" arbitrary information, such asprgmbefore and after applying transformations?This should make us more productive - no need to search for
printstatement debugging the kernel.