Kill capture_pre_autograd_graph API (#143224)

Summary:
Delete the following API:

- capture_pre_autograd_graph()
- capture_pre_autograd_graph_using_training_ir()
- gm_using_training_ir()

There's no more call sites to `capture_pre_autograd_graph`.

Except
1) two test cases in coreml, PR to remove: https://github.com/apple/coremltools/pull/2400
2) XLA: one test case in pytorch/xla, PR to remove: https://github.com/pytorch/xla/pull/8398
3) a few call sites guarded by version guard (< 2.5.0)

Test Plan: CI

Reviewed By: tugsbayasgalan

Differential Revision: D64056353

Pull Request resolved: https://github.com/pytorch/pytorch/pull/143224
Approved by: https://github.com/tugsbayasgalan
This commit is contained in:
Shangdi Yu
2024-12-16 23:06:22 +00:00
committed by PyTorch MergeBot
parent 6356690b3d
commit 4c62275325
7 changed files with 5 additions and 249 deletions

View File

@ -167,10 +167,6 @@ def log_torch_jit_trace_exportability(
return
def capture_pre_autograd_graph_using_training_ir() -> bool:
return False
def justknobs_check(name: str, default: bool = True) -> bool:
"""
This function can be used to killswitch functionality in FB prod,