Skip to content

Conversation

@ljk53
Copy link
Contributor

@ljk53 ljk53 commented Sep 7, 2019

Stack from ghstack:

Summary:
Don't need call these global registerers when USE_STATIC_DISPATCH is
set as they will keep all aten functions at link time.

Should solely rely on jit/generated/register_aten_ops* to keep "interface"
aten functions (which are directly called from JIT), and rely on
STATIC_DISPATCH + linker to keep all other aten functions that are
transitively needed by the "interface" functions.

Test Plan:

  • build and run in the demo app;
  • with stacked diff to shrink registered "interface" functions, linker
    can strip out unused aten implementations;

Pull Request resolved: #25815

Differential Revision: D17247236

Summary:
Don't need call these global registerers when USE_STATIC_DISPATCH is
set as they will keep all aten functions at link time.

Should solely rely on jit/generated/register_aten_ops* to keep "interface"
aten functions (which are directly called from JIT), and rely on
STATIC_DISPATCH + linker to keep all other aten functions that are
transitively needed by the "interface" functions.

Test Plan:
- build and run in the demo app;
- with stacked diff to shrink registered "interface" functions, linker
  can strip out unused aten implementations;
…TIC_DISPATCH"

Summary:
Don't need call these global registerers when USE_STATIC_DISPATCH is
set as they will keep all aten functions at link time.

Should solely rely on jit/generated/register_aten_ops* to keep "interface"
aten functions (which are directly called from JIT), and rely on
STATIC_DISPATCH + linker to keep all other aten functions that are
transitively needed by the "interface" functions.

Test Plan:
- build and run in the demo app;
- with stacked diff to shrink registered "interface" functions, linker
  can strip out unused aten implementations;

Pull Request resolved: #25815

Differential Revision: [D17247236](https://our.internmc.facebook.com/intern/diff/D17247236)
Copy link
Contributor

@smessmer smessmer left a comment

Choose a reason for hiding this comment

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

I don't think relying on jit/generated/register_aten_ops* will work. Let's talk about this offline.

Copy link
Contributor

@smessmer smessmer left a comment

Choose a reason for hiding this comment

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

re-accepting, this diff by itself is fine, but we should talk about the registration thing ^^

…TIC_DISPATCH"

Summary:
Don't need call these global registerers when USE_STATIC_DISPATCH is
set as they will keep all aten functions at link time.

Should solely rely on jit/generated/register_aten_ops* to keep "interface"
aten functions (which are directly called from JIT), and rely on
STATIC_DISPATCH + linker to keep all other aten functions that are
transitively needed by the "interface" functions.

Test Plan:
- build and run in the demo app;
- with stacked diff to shrink registered "interface" functions, linker
  can strip out unused aten implementations;

Pull Request resolved: #25815

Differential Revision: [D17247236](https://our.internmc.facebook.com/intern/diff/D17247236)
…TIC_DISPATCH"

Summary:
Don't need call these global registerers when USE_STATIC_DISPATCH is
set as they will keep all aten functions at link time.

Should solely rely on jit/generated/register_aten_ops* to keep "interface"
aten functions (which are directly called from JIT), and rely on
STATIC_DISPATCH + linker to keep all other aten functions that are
transitively needed by the "interface" functions.

Test Plan:
- build and run in the demo app;
- with stacked diff to shrink registered "interface" functions, linker
  can strip out unused aten implementations;

Pull Request resolved: #25815

Differential Revision: [D17247236](https://our.internmc.facebook.com/intern/diff/D17247236)
@facebook-github-bot
Copy link
Contributor

@ljk53 merged this pull request in 41cf556.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Sep 10, 2019
Summary:
Pull Request resolved: pytorch/pytorch#25815

Don't need call these global registerers when USE_STATIC_DISPATCH is
set as they will keep all aten functions at link time.

Should solely rely on jit/generated/register_aten_ops* to keep "interface"
aten functions (which are directly called from JIT), and rely on
STATIC_DISPATCH + linker to keep all other aten functions that are
transitively needed by the "interface" functions.

Test Plan:
- build and run in the demo app;
- with stacked diff to shrink registered "interface" functions, linker
  can strip out unused aten implementations;

Differential Revision: D17247236

Pulled By: ljk53

fbshipit-source-id: 1feb5fbb8b9cfa057b9ba8bf3f2967f40980c917
@facebook-github-bot facebook-github-bot deleted the gh/ljk53/35/head branch October 28, 2019 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: internals Related to internal abstractions in c10 and ATen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants