mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[pytorch][codegen] migrate gen_variable_type to new data model (#49735)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/49735 This is the final wave of autograd codegen data model migration. After this PR: - autograd codegen no longer depends on Declarations.yaml; - autograd codegen sources are fully type annotated and pass mypy-strict check; To avoid potential merge conflicts with other pending PRs, some structural changes are intentionally avoided, e.g. didn't move inner methods out, didn't change all inner methods to avoid reading outer function's variables, and etc. Confirmed byte-for-byte compatible with the old codegen: ``` Run it before and after this PR: .jenkins/pytorch/codegen-test.sh <baseline_output_dir> .jenkins/pytorch/codegen-test.sh <test_output_dir> Then run diff to compare the generated files: diff -Naur <baseline_output_dir> <test_output_dir> ``` Confirmed clean mypy-strict run: ``` mypy --config mypy-strict.ini ``` Test Plan: Imported from OSS Reviewed By: ezyang, bhosmer Differential Revision: D25678879 Pulled By: ljk53 fbshipit-source-id: ba6e2eb6b9fb744208f7f79a922d933fcc3bde9f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a272a7eeab
commit
e71a13e8a3
@ -31,9 +31,11 @@ strict_equality = True
|
||||
|
||||
files = tools/codegen/gen.py,
|
||||
tools/autograd/gen_annotated_fn_args.py,
|
||||
tools/autograd/gen_autograd.py,
|
||||
tools/autograd/gen_python_functions.py,
|
||||
tools/autograd/gen_trace_type.py,
|
||||
tools/autograd/gen_variable_factories.py,
|
||||
tools/autograd/gen_variable_type.py,
|
||||
tools/autograd/load_derivatives.py,
|
||||
torch/utils/benchmark/utils/common.py,
|
||||
torch/utils/benchmark/utils/timer.py,
|
||||
|
Reference in New Issue
Block a user