Commit Graph

9 Commits

Author SHA1 Message Date
Will Constable
69389fb542 Sync lazy_tensor_staging back to master (#72875)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72875

This diff contains changes from several PRs landed to lazy_tensor_staging branch.
* generating 'fallback' overrides for each codegenned op, useful for debugging
* supports operators which are missing aten:: symbols for op names, instead using their string counterpart
* makes the IR class a base class instead of hardcoding the assumption of TS

It also resolves lint issues and in particular cleans up the following:
* {Type}s shouldn't be passed into isValueType, and using the catch-all base class of CType is nicer than specifying a list of types.

Fixes #72852

Test Plan: test manually on lazy_tensor_staging branch

Reviewed By: shunting314

Differential Revision: D34250357

fbshipit-source-id: aa7d589f605055d5d02bc77c77fa6f1182ff7497
(cherry picked from commit 2f8f5e4971)
2022-02-18 03:49:46 +00:00
Will Constable
889f3f48b2 Revert D34178476: Update lazy_ir.py from lazy_tensor_staging
Test Plan: revert-hammer

Differential Revision:
D34178476 (3842140fd5)

Original commit changeset: 7190b2e0d82b

Original Phabricator Diff: D34178476 (3842140fd5)

fbshipit-source-id: 4c969a355f01244c6f5acc52bc31679f2182aa55
(cherry picked from commit 17082075dd)
2022-02-16 19:34:41 +00:00
Will Constable
3842140fd5 Update lazy_ir.py from lazy_tensor_staging (#72730)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72730

This diff contains changes from several PRs landed to lazy_tensor_staging branch.
- generating 'fallback' overrides for each codegenned op, useful for debugging
- supports operators which are missing aten:: symbols for op names, instead using their string counterpart
- makes the IR class a base class instead of hardcoding the assumption of TS

Test Plan: tested on lazy_tensor_staging branch

Reviewed By: desertfire

Differential Revision: D34178476

fbshipit-source-id: 7190b2e0d82b4eb1f4510c858c24446c6df3f9d0
(cherry picked from commit 6713d3f0ef)
2022-02-16 18:33:31 +00:00
Jiewen Tan
524bbb1442 [LTC] Sync gen_lazy_tensor.py from the staging branch (#70385)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70385

This commit sync gen_lazy_tensor.py from the lazy_tensor_staging branch
to the master.

Test Plan: CI in the lazy_tensor_staging branch.

Reviewed By: wconstab

Differential Revision: D33306232

Pulled By: alanwaketan

fbshipit-source-id: a15c72b22418637f851a6cd4901a9f5c4be75449
2022-01-06 13:12:37 -08:00
Brian Hirsh
5e222d08a1 Revert "Revert D32498572: allow external backend codegen to be used without autograd kernels" (#69949)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69949

This reverts commit 33363cea64.

Test Plan: Imported from OSS

Reviewed By: H-Huang

Differential Revision: D33113544

Pulled By: bdhirsh

fbshipit-source-id: e219f10d52776498c9ad273e97bca3e3406cf702
2021-12-21 08:19:37 -08:00
Bin Bao
e6a4988b2d [LTC] Upstream utils in computation_client (#69621)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69621

Upstream the following utils
- metrics.h
- multi_wait.h
- thread_pool.h
- unique.h

Test Plan: Imported from OSS

Reviewed By: wconstab, VitalyFedyunin

Differential Revision: D32957629

Pulled By: desertfire

fbshipit-source-id: 5f2fb57493856556099b7cda7560a568d1f9ed97
2021-12-16 05:43:09 -08:00
Brian Hirsh
33363cea64 Revert D32498572: allow external backend codegen to be used without autograd kernels
Test Plan: revert-hammer

Differential Revision:
D32498572 (b83b6f7424)

Original commit changeset: 3e7159c633f6

Original Phabricator Diff: D32498572 (b83b6f7424)

fbshipit-source-id: f93fa444c95a2423eef5975a2ecdb96f14e0c535
2021-12-14 15:28:49 -08:00
Brian Hirsh
b83b6f7424 allow external backend codegen to be used without autograd kernels (#68529)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/68529

Test Plan: Imported from OSS

Reviewed By: wconstab

Differential Revision: D32498572

Pulled By: bdhirsh

fbshipit-source-id: 3e7159c633f6a80b60faa068436a4c49ebe731ca
2021-12-14 10:23:12 -08:00
Will Constable
397183f44c Add Lazy Tensor codegen infra (#69020)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69020

Merges the lazy tensor codegen infra which has already been used on lazy_tensor_staging.

Test Plan: Test via lazy_tensor_staging branch

Reviewed By: alanwaketan, bdhirsh

Differential Revision: D32570613

fbshipit-source-id: 2cd5698644398bda69669683f8de79fd3b6639b5
2021-12-02 07:51:52 -08:00