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

[JitBackend] Miscellaneous improvements to Jit infra #1124

Closed
wants to merge 11 commits into from

Conversation

StrongerXi
Copy link
Collaborator

Summary

A few changes to the Jit infra, mainly addressing 2 things:

  1. Improving ergonomics for working with Node.
  2. Implementing a way to debug Jit graph and find perf bottleneck.

Test Plan (required)

Some unit tests are updated.
Some changes rely on existing test.
The GraphVizPrinter is tested manually because I can't think of a good way to automate its testing.

StrongerXi and others added 6 commits June 5, 2023 00:00
…lifetime

This significantly simplifies node lifetime management, with one
documented caveat -- `Use::user()` returns a `Node&` instead of
`NodePtr`, and it also stores the data as `Node&` under the hood.
…ng results

When evaluator decides whether to keep the result of a node, use the
number of users instead of the raw shared_ptr refcount (which is overly
conservative and breaks the soft abstraction of `NodePtr`).
This is often useful in graph transformation/analysis. The downcast
mechanism also tries to keep the soft abstraction of `NodePtr`,
`BinaryNodePtr`, etc (without leaking `std::shared_ptr` to users).
@facebook-github-bot facebook-github-bot added CLA Signed Do not delete this pull request or issue due to inactivity. oncall: jit labels Jun 5, 2023
@facebook-github-bot
Copy link

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

@facebook-github-bot
Copy link

@StrongerXi has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

@StrongerXi has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

@StrongerXi has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

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

@facebook-github-bot
Copy link

@jacobkahn merged this pull request in d49bef5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. Merged oncall: jit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants