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

Change aot_compile callsites #2207

Closed
wants to merge 1 commit into from
Closed

Conversation

angelayi
Copy link
Contributor

Summary:
X-link: pytorch/pytorch#122225

Replacing torch._export.aot_compile callsites with

ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do export + serialize + deserialize + inductor to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Reviewed By: SherlockNoMad

Differential Revision: D54808612

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D54808612

angelayi added a commit to angelayi/benchmark that referenced this pull request Mar 25, 2024
Summary:

X-link: pytorch/pytorch#122225

Replacing `torch._export.aot_compile` callsites with 
```
ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so
```

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do `export + serialize + deserialize + inductor` to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Reviewed By: SherlockNoMad

Differential Revision: D54808612
angelayi added a commit to angelayi/pytorch that referenced this pull request Mar 25, 2024
Summary:
X-link: pytorch/benchmark#2207


Replacing `torch._export.aot_compile` callsites with 
```
ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so
```

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do `export + serialize + deserialize + inductor` to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Test Plan: CI

Reviewed By: SherlockNoMad

Differential Revision: D54808612
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D54808612

angelayi added a commit to angelayi/pytorch that referenced this pull request Mar 25, 2024
Summary:
X-link: pytorch/benchmark#2207


Replacing `torch._export.aot_compile` callsites with 
```
ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so
```

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do `export + serialize + deserialize + inductor` to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Test Plan: CI

Reviewed By: SherlockNoMad

Differential Revision: D54808612
angelayi added a commit to angelayi/benchmark that referenced this pull request Mar 26, 2024
Summary:

X-link: pytorch/pytorch#122225

Replacing `torch._export.aot_compile` callsites with 
```
ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so
```

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do `export + serialize + deserialize + inductor` to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Reviewed By: SherlockNoMad

Differential Revision: D54808612
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D54808612

angelayi added a commit to angelayi/benchmark that referenced this pull request Mar 26, 2024
Summary:

X-link: pytorch/pytorch#122225

Replacing `torch._export.aot_compile` callsites with 
```
ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so
```

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do `export + serialize + deserialize + inductor` to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Reviewed By: SherlockNoMad

Differential Revision: D54808612
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D54808612

angelayi added a commit to angelayi/benchmark that referenced this pull request Mar 26, 2024
Summary:

X-link: pytorch/pytorch#122225

Replacing `torch._export.aot_compile` callsites with 
```
ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so
```

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do `export + serialize + deserialize + inductor` to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Reviewed By: SherlockNoMad

Differential Revision: D54808612
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D54808612

angelayi added a commit to angelayi/benchmark that referenced this pull request Mar 26, 2024
Summary:

X-link: pytorch/pytorch#122225

Replacing `torch._export.aot_compile` callsites with 
```
ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so
```

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do `export + serialize + deserialize + inductor` to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Reviewed By: SherlockNoMad

Differential Revision: D54808612
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D54808612

@angelayi angelayi temporarily deployed to docker-s3-upload March 26, 2024 18:58 — with GitHub Actions Inactive
@angelayi angelayi temporarily deployed to docker-s3-upload March 26, 2024 18:59 — with GitHub Actions Inactive
angelayi added a commit to angelayi/benchmark that referenced this pull request Mar 26, 2024
Summary:

X-link: pytorch/pytorch#122225

Replacing `torch._export.aot_compile` callsites with 
```
ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so
```

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do `export + serialize + deserialize + inductor` to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Reviewed By: SherlockNoMad

Differential Revision: D54808612
angelayi added a commit to angelayi/pytorch that referenced this pull request Mar 26, 2024
Summary:
X-link: pytorch/benchmark#2207


Replacing `torch._export.aot_compile` callsites with 
```
ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so
```

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do `export + serialize + deserialize + inductor` to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Test Plan: CI

Reviewed By: SherlockNoMad

Differential Revision: D54808612
@angelayi angelayi temporarily deployed to docker-s3-upload March 26, 2024 22:20 — with GitHub Actions Inactive
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D54808612

@angelayi angelayi temporarily deployed to docker-s3-upload March 26, 2024 22:20 — with GitHub Actions Inactive
angelayi added a commit to angelayi/benchmark that referenced this pull request Mar 28, 2024
Summary:

X-link: pytorch/pytorch#122225

Replacing `torch._export.aot_compile` callsites with 
```
ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so
```

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do `export + serialize + deserialize + inductor` to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Reviewed By: SherlockNoMad

Differential Revision: D54808612
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D54808612

@angelayi angelayi temporarily deployed to docker-s3-upload March 28, 2024 18:36 — with GitHub Actions Inactive
@angelayi angelayi temporarily deployed to docker-s3-upload March 28, 2024 18:36 — with GitHub Actions Inactive
Summary:

X-link: pytorch/pytorch#122225

Replacing `torch._export.aot_compile` callsites with 
```
ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so
```

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do `export + serialize + deserialize + inductor` to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Reviewed By: SherlockNoMad

Differential Revision: D54808612
angelayi added a commit to angelayi/pytorch that referenced this pull request Mar 29, 2024
Summary:
X-link: pytorch/benchmark#2207


Replacing `torch._export.aot_compile` callsites with 
```
ep = torch.export._export(.., predispatch=True)   # Traces the given program into predispatch IR
so_path = torch._inductor.aot_compile_ep(ep, ...)  # Takes an exported program and compiles it into a .so
```

This allows us to explicitly split up the export step from AOTInductor. We can later modify tests to do `export + serialize + deserialize + inductor` to mimic internal production use cases better.

This PR also enables export's predispatch IR most of the the existing use cases. Previously this is using export to torch IR, which is a different graph. This may result in some performance regressions as some of inductor's passes will no longer run -- if so, please let me know.

This PR changes the seemingly low-impact files to the new calling convention, and a followup PR will change the high-impact site.

Test Plan: CI

Reviewed By: SherlockNoMad

Differential Revision: D54808612
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D54808612

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 756ea35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants