Skip to content

Support fullgraph for torch_xla.compile #7776

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

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

JackCaoG
Copy link
Collaborator

@JackCaoG JackCaoG commented Jul 30, 2024

with torch_xla.compile(fn, full_graph=True) we will output an error message when we see graph breaks(early access of the value of tensor or cpu fallback) inside the passed in fn

@JackCaoG JackCaoG marked this pull request as ready for review July 30, 2024 22:31
Copy link
Collaborator

@will-cromar will-cromar left a comment

Choose a reason for hiding this comment

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

Neat!

@@ -262,29 +262,36 @@ void DebugUtil::analyze_graph_execution_python_frame(

static const std::string executation_output_prefix = "Execution Analysis: ";
static const std::string compilation_output_prefix = "Compilation Analysis: ";
static const std::string unexpected_execution_prefix =
Copy link
Collaborator

Choose a reason for hiding this comment

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

micro-nit: should this be a constexpr std::string_view or constexpr char[] instead of a static const std::string?

t2_compiled = torch_xla.compile(
self.dummy_graph_break, full_graph=True)(
t1)
self.assertIn(
Copy link
Collaborator

Choose a reason for hiding this comment

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

@JackCaoG
Copy link
Collaborator Author

Let me merge it to unblock my other pr, I will fix review comment in a separate follow up pr too.

@JackCaoG JackCaoG merged commit 731eb08 into master Jul 31, 2024
23 checks passed
@JackCaoG JackCaoG deleted the JackCaoG/xla_compile_full_graph_2 branch July 31, 2024 20:00
JackCaoG added a commit that referenced this pull request Jul 31, 2024
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