-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[better_errors] Add debug info to more Jaxprs and WrappedFun
Here we pass debug info in more places, so that it ends up in more Jaxprs and Tracers. As a result some of the tests are showing more complete debug info. There are three kinds of information in the debug info: * the func_src_info: this is the easiest to keep track of because all we need is to pass it down. In this chain of refactorings, I will prioritize having this everywhere. * the arg_names: this is collected from the function signature, and it is passed down, but it needs to be adjusted as we add and remove arguments. This is used when we generate location information in the lowering and when we explain some leaked tracers. * the result_paths: this is the hardest to keep track of, because you can only read it after tracing. This is also the least useful. It is used only for locations in the lowering. To enable progress I will de-prioritize keeping accurate the arg names and result paths, for now. I relax a safety check in the Jaxpr constructor that was verifying that arg_names and result_paths have the proper length. Therefore, I needed to add some checks where the arg_names and result_paths are used (`safe_arg_names`, and `safe_result_paths`).
- Loading branch information
Showing
11 changed files
with
165 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.