Skip to content

Conversation

@eellison
Copy link
Contributor

@eellison eellison commented Aug 9, 2019

No description provided.

@pytorchbot pytorchbot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Aug 9, 2019
@eellison eellison requested review from Krovatkin, ZolotukhinM, driazati, suo and zdevito and removed request for suo August 9, 2019 20:38
Copy link

@ZolotukhinM ZolotukhinM left a comment

Choose a reason for hiding this comment

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

Thanks for writing it up! It's really important to have such documents, it greatly helps to understand how stuff works.

Please find some comments inline and please fix failing tests before landing!

Choose a reason for hiding this comment

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

What is graph loops? :)

Choose a reason for hiding this comment

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

Nit: considered

Choose a reason for hiding this comment

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

Could you please add a high level overview of why we're doing this (in contrast to "what")? It might be not obvious why this all is necessary and how it relates to classic SSA. For instance, in the conventional definition of SSA the central part is phi-nodes. We don't have them because we work only with structured control flow, but we never mentioned that here. But that's what explains all of what's happening here: we're trying to represent constructs with breaks/continues/returns in a form of well-structured CFG that only have loops with no early exits and ifs.
Another thing that might be confusing is the load/store part - we're not loading or storing anything there, it's just a trick we use to figure out input/output values of a block, and I think it's also worth mentioning somewhere.

Choose a reason for hiding this comment

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

Nit: "Once we hit an Exit Node" sounds a bit strange to me as we don't execute anything here. Maybe rephrase it a bit (like "if a block has an exit node, further instructions will never be executed").

Copy link
Contributor

@Krovatkin Krovatkin left a comment

Choose a reason for hiding this comment

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

Thanks for writing this up! It looks great! I added a few comments

Copy link
Contributor

@Krovatkin Krovatkin Aug 12, 2019

Choose a reason for hiding this comment

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

this seems to be a little bit too dry. How are we tracking in-scope values? Are we doing something similar to what we used to do in compiler.cpp before? Ideally, we could use a simple example that shows a graph with loads and stores and then the one w/o them right before we remove prim::LoopContinuations.

Copy link
Contributor

Choose a reason for hiding this comment

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

continue_loop is inserted at the end of every inner block?

@zdevito zdevito removed their request for review August 13, 2019 21:59
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@eellison has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@eellison merged this pull request in ca33aeb.

ttumiel pushed a commit to ttumiel/pytorch that referenced this pull request Mar 4, 2020
Summary: Pull Request resolved: pytorch#24114

Differential Revision: D19780828

Pulled By: eellison

fbshipit-source-id: d481ad886b2ad6349a1646672e507336d45759fb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants