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 enable-debug-info flag in catalyst #1331

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

mehrdad2m
Copy link
Contributor

@mehrdad2m mehrdad2m commented Nov 26, 2024

Context:
Currently debug info is not propagated from JAX to LLVM making it.

Description of the Change:
This PR adds a qjit option "enable_debug_info" that adds the debug info to the intermediate IRs.

Benefits:
Intermediate IR files can now be created with debug info.

Possible Drawbacks:
the large number of MLIR passed that modify the IR may distort the debug info, so it may lose accuracy.

Related GitHub Issues:
[sc-73579]

@mehrdad2m mehrdad2m marked this pull request as ready for review November 26, 2024 17:07
@@ -52,7 +52,7 @@


@debug_logger
def jaxpr_to_mlir(func_name, jaxpr):
def jaxpr_to_mlir(func_name, jaxpr, func_loc=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add func_loc to the list of Args in the docstring below?

@@ -553,7 +553,7 @@ def trace_to_jaxpr(func, static_argnums, abstracted_axes, args, kwargs):


@debug_logger
def lower_jaxpr_to_mlir(jaxpr, func_name):
def lower_jaxpr_to_mlir(jaxpr, func_name, func_loc=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

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

Successfully merging this pull request may close these issues.

2 participants