Commit Graph

8 Commits

Author SHA1 Message Date
Edward Yang
7c50c2f79e Reimplement per-operator selective build (#39401)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39401

This uses the technique proposed by smessmer in D16451848 to selectively
register operators without codegen.  See the Note inside for more
details.

This PR has feature parity with the old selective build apparatus:
it can whitelist schema def()s, impl()s, and on a per dispatch key
basis.  It has expanded dispatch key whitelisting, whereas previously
manually written registrations were not whitelisted at all.  (This
means we may be dropping dispatch keys where we weren't previously!)

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Test Plan: Imported from OSS

Reviewed By: pbelevich

Differential Revision: D21905593

Pulled By: ezyang

fbshipit-source-id: d4870f800c66be5ce57ec173c9b6e14a52c4a48b
2020-08-20 19:10:02 -07:00
Jiakai Liu
8ddd2c4e1b [pytorch] fix code analyzer for LLVM 9 & 10 (#42135)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/42135

Tested the code analyzer with LLVM 9 & 10 and fixed a couple issues:
- Rename local demangle() which is available as public API since LLVM 9;
- Fix falsely associated op registrations due to the `phi` instruction;

Test Plan: Imported from OSS

Reviewed By: iseeyuan

Differential Revision: D22795508

Pulled By: ljk53

fbshipit-source-id: 2d47af088acd3312a7ea5fd9361cdccd48940fe6
2020-07-28 14:57:07 -07:00
Jiakai Liu
f92089b8ca [pytorch] tweak code analyzer script to handle new namespaces (#40276)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/40276

- add a couple new namespaces;
- handle the case where both contextual namespace and opreator namespace
  are set (BackendSelectRegister.cpp and #39401);
- improve error message;

Test Plan: Imported from OSS

Differential Revision: D22135686

Pulled By: ljk53

fbshipit-source-id: 14d359c93573349b8fe1e05d7e44d875295a5f6d
2020-06-19 14:54:21 -07:00
Sebastian Messmer
5af4e76683 Back out "Revert D21530545: Remove call_unboxed_super_slow_temp_shim" (#38742)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38742

Original commit changeset: af9013ed37d2
ghstack-source-id: 104397898

Test Plan: waitforsandcastle

Differential Revision: D21651660

fbshipit-source-id: 8bb56eb8abd43fd01d1468f104babe92a09d2ad4
2020-05-19 18:23:20 -07:00
Sebastian Messmer
363a2d9455 Revert D21530545: Remove call_unboxed_super_slow_temp_shim
Test Plan: revert-hammer

Differential Revision:
D21530545

Original commit changeset: cdfb801e5519

fbshipit-source-id: af9013ed37d27bf8dca859902918c02eb8cceeb4
2020-05-19 16:07:36 -07:00
Sebastian Messmer
423a00ad39 Remove call_unboxed_super_slow_temp_shim (#38351)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38351

ghstack-source-id: 104368838

Test Plan: waitforsandcastle

Differential Revision: D21530545

fbshipit-source-id: cdfb801e551993ecb339f3f8ec7c9b3039766989
2020-05-19 14:19:28 -07:00
Sebastian Messmer
6968c8153e Warn against callOp (#37797)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37797

This is slow (see comment in code).
Not fixing this yet, but at least adding a warning so people are aware and don't add new call sites.
ghstack-source-id: 103887226

Test Plan: waitforsandcastle

Differential Revision: D21390364

fbshipit-source-id: 7bff1c3b9756a16c9d9110f209c23bf557266dda
2020-05-11 19:21:50 -07:00
Jiakai Liu
e0a5b443d6 [pytorch] remove unused flags from code analyzer & move format support to python (#37393)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37393

Simplify the code analyzer by removing some unused flags and moving the
different format printer logic to python script. It's easier to add other
post processing logic to adapt to different BUCK build configs.

Test Plan: Imported from OSS

Differential Revision: D21280836

Pulled By: ljk53

fbshipit-source-id: 0d66d5891d850f012c4ab4f39eabbd9aecc1caa9
2020-04-28 17:16:55 -07:00