Skip to content

Conversation

@bdhirsh
Copy link
Contributor

@bdhirsh bdhirsh commented Aug 1, 2022

Although this won't fully solve the "input metadata mutations" issue for AOTAutograd, there's no reason functionalization should break on input metadata mutations - this PR updates functionalization to use as_strided_() to mutate input metadata when necessary, similar to how it uses copy_() to handle input data mutations.

I also switched the functionalization tests over to using the proper functionalize() from functorch, which resulted in a few expect test changes.

Stack from ghstack:

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 1, 2022

🔗 Helpful links

❌ 14 New Failures, 1 Flaky Failures

As of commit 6830320 (more details on the Dr. CI page):

Expand to see more
  • 14/15 failures introduced in this PR
  • 1/15 tentatively recognized as flaky ❄️

🕵️ 14 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages

See GitHub Actions build pull / linux-focal-py3.7-clang7-asan / test (default, 4, 5, linux.2xlarge) (1/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T16:05:34.0919649Z FAIL [0.003s]: tes..._surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T16:05:34.0264586Z   test_type_check_reshape_false (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:05:34.0296346Z   test_type_check_reshape_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:05:34.0473405Z   test_type_check_symbolic_inferenceconv2D_maxpool2d_flatten (fx.test_gradual_type.TypeCheckerTest) ... ok (0.018s)
2022-08-11T16:05:34.0503065Z   test_type_check_transpose_False (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:05:34.0534058Z   test_type_check_transpose_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:05:34.0793673Z   test_type_maxpool2d_fully_static (fx.test_gradual_type.TypeCheckerTest) ... ok (0.026s)
2022-08-11T16:05:34.0829975Z   test_type_typechecl_maxpool2d_3dinput (fx.test_gradual_type.TypeCheckerTest) ... ok (0.004s)
2022-08-11T16:05:34.0917289Z   test_typecheck_basicblock (fx.test_gradual_type.TypeCheckerTest) ... ok (0.009s)
2022-08-11T16:05:34.0918337Z 
2022-08-11T16:05:34.0919319Z ======================================================================
2022-08-11T16:05:34.0919649Z FAIL [0.003s]: test_public_api_surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T16:05:34.0920148Z ----------------------------------------------------------------------
2022-08-11T16:05:34.0920411Z Traceback (most recent call last):
2022-08-11T16:05:34.0920656Z   File "test_fx.py", line 3814, in test_public_api_surface
2022-08-11T16:05:34.0920952Z     raise AssertionError(f"Public FX API(s) {non_back_compat_strs} introduced but not given a "
2022-08-11T16:05:34.0921669Z AssertionError: Public FX API(s) ['torch.fx.passes.reinplace.reinplace'] introduced but not given a backwards-compatibility classification! Please decorate these API(s) with `@torch.fx._compatibility.compatibility` to specify BC guarantees.
2022-08-11T16:05:34.0922189Z 
2022-08-11T16:05:34.0922393Z ----------------------------------------------------------------------
2022-08-11T16:05:34.0922638Z Ran 1002 tests in 10.888s
2022-08-11T16:05:34.0922740Z 
2022-08-11T16:05:34.0922861Z FAILED (failures=1, skipped=198, expected failures=5)

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (functorch, 1, 1, linux.2xlarge) (2/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T16:05:17.6576661Z ModuleNotFoundError: No module named 'functorch'
2022-08-11T16:05:16.7538390Z prioritized: []
2022-08-11T16:05:16.7539599Z the rest: ['/var/lib/jenkins/workspace/functorch/test/test_compile_cache', '/var/lib/jenkins/workspace/functorch/test/test_dims', '/var/lib/jenkins/workspace/functorch/test/test_eager_transforms', '/var/lib/jenkins/workspace/functorch/test/test_functionalize', '/var/lib/jenkins/workspace/functorch/test/test_memory_efficient_fusion', '/var/lib/jenkins/workspace/functorch/test/test_minifier', '/var/lib/jenkins/workspace/functorch/test/test_ops', '/var/lib/jenkins/workspace/functorch/test/test_pythonkey', '/var/lib/jenkins/workspace/functorch/test/test_vmap']
2022-08-11T16:05:16.7540205Z 
2022-08-11T16:05:16.7540613Z Downloading https://raw.githubusercontent.com/pytorch/test-infra/generated-stats/stats/slow-tests.json to /var/lib/jenkins/workspace/test/.pytorch-slow-tests.json
2022-08-11T16:05:16.7739396Z Downloading https://raw.githubusercontent.com/pytorch/test-infra/generated-stats/stats/disabled-tests.json to /var/lib/jenkins/workspace/test/.pytorch-disabled-tests.json
2022-08-11T16:05:16.8146140Z Running /var/lib/jenkins/workspace/functorch/test/test_compile_cache ... [2022-08-11 16:05:16.814332]
2022-08-11T16:05:16.8146746Z Executing ['/opt/conda/bin/python', '-bb', '/var/lib/jenkins/workspace/functorch/test/test_compile_cache.py', '-v', '--import-slow-tests', '--import-disabled-tests'] ... [2022-08-11 16:05:16.814380]
2022-08-11T16:05:17.6575614Z Traceback (most recent call last):
2022-08-11T16:05:17.6575980Z   File "/var/lib/jenkins/workspace/functorch/test/test_compile_cache.py", line 5, in <module>
2022-08-11T16:05:17.6576310Z     import functorch
2022-08-11T16:05:17.6576661Z ModuleNotFoundError: No module named 'functorch'
2022-08-11T16:05:17.7865811Z Traceback (most recent call last):
2022-08-11T16:05:17.7866071Z   File "test/run_test.py", line 974, in <module>
2022-08-11T16:05:17.7867667Z     main()
2022-08-11T16:05:17.7867871Z   File "test/run_test.py", line 952, in main
2022-08-11T16:05:17.7869382Z     raise RuntimeError(err_message)
2022-08-11T16:05:17.7869654Z RuntimeError: /var/lib/jenkins/workspace/functorch/test/test_compile_cache failed!
2022-08-11T16:05:18.0212230Z ##[error]Process completed with exit code 1.
2022-08-11T16:05:18.0249531Z Prepare all required actions
2022-08-11T16:05:18.0249852Z Getting action download info
2022-08-11T16:05:18.1914513Z ##[group]Run ./.github/actions/get-workflow-job-id

See GitHub Actions build pull / linux-bionic-cuda11.6-py3.10-gcc7 / test (functorch, 1, 1, linux.4xlarge.nvidia.gpu) (3/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T16:23:33.2244490Z ModuleNotFoundError: No module named 'functorch'
2022-08-11T16:23:31.7708592Z prioritized: []
2022-08-11T16:23:31.7710061Z the rest: ['/var/lib/jenkins/workspace/functorch/test/test_compile_cache', '/var/lib/jenkins/workspace/functorch/test/test_dims', '/var/lib/jenkins/workspace/functorch/test/test_eager_transforms', '/var/lib/jenkins/workspace/functorch/test/test_functionalize', '/var/lib/jenkins/workspace/functorch/test/test_memory_efficient_fusion', '/var/lib/jenkins/workspace/functorch/test/test_minifier', '/var/lib/jenkins/workspace/functorch/test/test_ops', '/var/lib/jenkins/workspace/functorch/test/test_pythonkey', '/var/lib/jenkins/workspace/functorch/test/test_vmap']
2022-08-11T16:23:31.7711115Z 
2022-08-11T16:23:31.7711663Z Downloading https://raw.githubusercontent.com/pytorch/test-infra/generated-stats/stats/slow-tests.json to /var/lib/jenkins/workspace/test/.pytorch-slow-tests.json
2022-08-11T16:23:31.7926474Z Downloading https://raw.githubusercontent.com/pytorch/test-infra/generated-stats/stats/disabled-tests.json to /var/lib/jenkins/workspace/test/.pytorch-disabled-tests.json
2022-08-11T16:23:31.8286261Z Running /var/lib/jenkins/workspace/functorch/test/test_compile_cache ... [2022-08-11 16:23:31.828239]
2022-08-11T16:23:31.8287056Z Executing ['/opt/conda/bin/python', '-bb', '/var/lib/jenkins/workspace/functorch/test/test_compile_cache.py', '-v', '--import-slow-tests', '--import-disabled-tests'] ... [2022-08-11 16:23:31.828299]
2022-08-11T16:23:33.2243119Z Traceback (most recent call last):
2022-08-11T16:23:33.2243655Z   File "/var/lib/jenkins/workspace/functorch/test/test_compile_cache.py", line 5, in <module>
2022-08-11T16:23:33.2244015Z     import functorch
2022-08-11T16:23:33.2244490Z ModuleNotFoundError: No module named 'functorch'
2022-08-11T16:23:33.4102445Z Traceback (most recent call last):
2022-08-11T16:23:33.4103187Z   File "/var/lib/jenkins/workspace/test/run_test.py", line 974, in <module>
2022-08-11T16:23:33.4105053Z     main()
2022-08-11T16:23:33.4105547Z   File "/var/lib/jenkins/workspace/test/run_test.py", line 952, in main
2022-08-11T16:23:33.4107598Z     raise RuntimeError(err_message)
2022-08-11T16:23:33.4108253Z RuntimeError: /var/lib/jenkins/workspace/functorch/test/test_compile_cache failed!
2022-08-11T16:23:33.6647373Z ##[error]Process completed with exit code 1.
2022-08-11T16:23:33.6688255Z Prepare all required actions
2022-08-11T16:23:33.6688731Z Getting action download info
2022-08-11T16:23:33.8278300Z ##[group]Run ./.github/actions/get-workflow-job-id

See GitHub Actions build pull / linux-focal-py3.7-clang7-asan / test (default, 3, 5, linux.2xlarge) (4/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T16:05:38.5627499Z RuntimeError: test_functionalization failed!
2022-08-11T16:05:35.2056260Z Executing ['/opt/conda/bin/python', '-bb', 'test_functionalization.py', '-v', '--import-slow-tests', '--import-disabled-tests'] ... [2022-08-11 16:05:35.205223]
2022-08-11T16:05:38.1168967Z Traceback (most recent call last):
2022-08-11T16:05:38.1169417Z   File "test_functionalization.py", line 8, in <module>
2022-08-11T16:05:38.1169696Z     from functorch.experimental import functionalize
2022-08-11T16:05:38.1170165Z ModuleNotFoundError: No module named 'functorch'
2022-08-11T16:05:38.5619276Z Traceback (most recent call last):
2022-08-11T16:05:38.5619589Z   File "test/run_test.py", line 974, in <module>
2022-08-11T16:05:38.5623042Z     main()
2022-08-11T16:05:38.5623278Z   File "test/run_test.py", line 952, in main
2022-08-11T16:05:38.5627009Z     raise RuntimeError(err_message)
2022-08-11T16:05:38.5627499Z RuntimeError: test_functionalization failed!
2022-08-11T16:05:39.0945410Z 
2022-08-11T16:05:39.0945787Z real	0m27.905s
2022-08-11T16:05:39.0946121Z user	0m25.998s
2022-08-11T16:05:39.0946432Z sys	0m5.424s
2022-08-11T16:05:39.0974208Z ##[error]Process completed with exit code 1.
2022-08-11T16:05:39.1010390Z Prepare all required actions
2022-08-11T16:05:39.1010689Z Getting action download info
2022-08-11T16:05:39.2808873Z ##[group]Run ./.github/actions/get-workflow-job-id
2022-08-11T16:05:39.2809098Z with:
2022-08-11T16:05:39.2809414Z   github-token: ***

See GitHub Actions build pull / win-vs2019-cpu-py3 / test (default, 1, 2, windows.4xlarge) (5/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T17:26:31.7176888Z FAIL [0.000s]: tes..._surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T17:26:31.6651166Z   test_type_check_reshape_false (fx.test_gradual_type.TypeCheckerTest) ... ok (0.000s)
2022-08-11T17:26:31.6687359Z   test_type_check_reshape_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.016s)
2022-08-11T17:26:31.6709217Z   test_type_check_symbolic_inferenceconv2D_maxpool2d_flatten (fx.test_gradual_type.TypeCheckerTest) ... skip: no sympy (0.000s)
2022-08-11T17:26:31.6739790Z   test_type_check_transpose_False (fx.test_gradual_type.TypeCheckerTest) ... ok (0.000s)
2022-08-11T17:26:31.6774844Z   test_type_check_transpose_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.010s)
2022-08-11T17:26:31.7044726Z   test_type_maxpool2d_fully_static (fx.test_gradual_type.TypeCheckerTest) ... ok (0.016s)
2022-08-11T17:26:31.7088993Z   test_type_typechecl_maxpool2d_3dinput (fx.test_gradual_type.TypeCheckerTest) ... ok (0.016s)
2022-08-11T17:26:31.7175574Z   test_typecheck_basicblock (fx.test_gradual_type.TypeCheckerTest) ... ok (0.000s)
2022-08-11T17:26:31.7176092Z 
2022-08-11T17:26:31.7176266Z ======================================================================
2022-08-11T17:26:31.7176888Z FAIL [0.000s]: test_public_api_surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T17:26:31.7177470Z ----------------------------------------------------------------------
2022-08-11T17:26:31.7177926Z Traceback (most recent call last):
2022-08-11T17:26:31.7178488Z   File "test_fx.py", line 3814, in test_public_api_surface
2022-08-11T17:26:31.7179153Z     raise AssertionError(f"Public FX API(s) {non_back_compat_strs} introduced but not given a "
2022-08-11T17:26:31.7180231Z AssertionError: Public FX API(s) ['torch.fx.passes.reinplace.reinplace'] introduced but not given a backwards-compatibility classification! Please decorate these API(s) with `@torch.fx._compatibility.compatibility` to specify BC guarantees.
2022-08-11T17:26:31.7180915Z 
2022-08-11T17:26:31.8440551Z ----------------------------------------------------------------------
2022-08-11T17:26:31.8440916Z Ran 1002 tests in 8.062s
2022-08-11T17:26:31.8441072Z 
2022-08-11T17:26:31.8441221Z FAILED (failures=1, skipped=208, expected failures=5)

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (dynamo, 1, 2, linux.2xlarge) (6/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T18:16:22.1551034Z FAIL [0.035s]: tes..._surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T18:16:17.0432493Z   test_type_check_reshape_false (fx.test_gradual_type.TypeCheckerTest) ... ok (0.005s)
2022-08-11T18:16:17.0493969Z   test_type_check_reshape_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.006s)
2022-08-11T18:16:17.0723010Z   test_type_check_symbolic_inferenceconv2D_maxpool2d_flatten (fx.test_gradual_type.TypeCheckerTest) ... ok (0.023s)
2022-08-11T18:16:17.0777790Z   test_type_check_transpose_False (fx.test_gradual_type.TypeCheckerTest) ... ok (0.005s)
2022-08-11T18:16:17.0843925Z   test_type_check_transpose_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.007s)
2022-08-11T18:16:22.0865086Z   test_type_maxpool2d_fully_static (fx.test_gradual_type.TypeCheckerTest) ... ok (5.002s)
2022-08-11T18:16:22.0961859Z   test_type_typechecl_maxpool2d_3dinput (fx.test_gradual_type.TypeCheckerTest) ... ok (0.010s)
2022-08-11T18:16:22.1538897Z   test_typecheck_basicblock (fx.test_gradual_type.TypeCheckerTest) ... ok (0.057s)
2022-08-11T18:16:22.1539249Z 
2022-08-11T18:16:22.1539579Z ======================================================================
2022-08-11T18:16:22.1551034Z FAIL [0.035s]: test_public_api_surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T18:16:22.1551859Z ----------------------------------------------------------------------
2022-08-11T18:16:22.1552294Z Traceback (most recent call last):
2022-08-11T18:16:22.1552716Z   File "test_fx.py", line 3782, in test_public_api_surface
2022-08-11T18:16:22.1553096Z     def test_public_api_surface(self):
2022-08-11T18:16:22.1553493Z   File "test_fx.py", line 3782, in test_public_api_surface
2022-08-11T18:16:22.1553891Z     def test_public_api_surface(self):
2022-08-11T18:16:22.1554270Z   File "test_fx.py", line 3782, in test_public_api_surface
2022-08-11T18:16:22.1554656Z     def test_public_api_surface(self):
2022-08-11T18:16:22.1555047Z   File "test_fx.py", line 3814, in test_public_api_surface
2022-08-11T18:16:22.1555875Z     raise AssertionError(f"Public FX API(s) {non_back_compat_strs} introduced but not given a "

See GitHub Actions build pull / linux-focal-py3.7-gcc7 / test (default, 1, 2, linux.2xlarge) (7/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T16:10:17.5269627Z FAIL [0.002s]: tes..._surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T16:10:17.4633214Z   test_type_check_reshape_false (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:10:17.4664645Z   test_type_check_reshape_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:10:17.4830153Z   test_type_check_symbolic_inferenceconv2D_maxpool2d_flatten (fx.test_gradual_type.TypeCheckerTest) ... ok (0.016s)
2022-08-11T16:10:17.4859828Z   test_type_check_transpose_False (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:10:17.4892778Z   test_type_check_transpose_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:10:17.5149395Z   test_type_maxpool2d_fully_static (fx.test_gradual_type.TypeCheckerTest) ... ok (0.026s)
2022-08-11T16:10:17.5194057Z   test_type_typechecl_maxpool2d_3dinput (fx.test_gradual_type.TypeCheckerTest) ... ok (0.004s)
2022-08-11T16:10:17.5267370Z   test_typecheck_basicblock (fx.test_gradual_type.TypeCheckerTest) ... ok (0.007s)
2022-08-11T16:10:17.5268807Z 
2022-08-11T16:10:17.5269225Z ======================================================================
2022-08-11T16:10:17.5269627Z FAIL [0.002s]: test_public_api_surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T16:10:17.5270483Z ----------------------------------------------------------------------
2022-08-11T16:10:17.5272166Z Traceback (most recent call last):
2022-08-11T16:10:17.5272536Z   File "test_fx.py", line 3814, in test_public_api_surface
2022-08-11T16:10:17.5272946Z     raise AssertionError(f"Public FX API(s) {non_back_compat_strs} introduced but not given a "
2022-08-11T16:10:17.5273967Z AssertionError: Public FX API(s) ['torch.fx.passes.reinplace.reinplace'] introduced but not given a backwards-compatibility classification! Please decorate these API(s) with `@torch.fx._compatibility.compatibility` to specify BC guarantees.
2022-08-11T16:10:17.5274512Z 
2022-08-11T16:10:17.5274783Z ----------------------------------------------------------------------
2022-08-11T16:10:17.5275091Z Ran 1100 tests in 203.761s
2022-08-11T16:10:17.5275240Z 
2022-08-11T16:10:17.5279629Z FAILED (failures=1, skipped=194, expected failures=5)

See GitHub Actions build pull / linux-focal-py3.7-gcc7 / test (default, 2, 2, linux.2xlarge) (8/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T16:14:31.9805033Z RuntimeError: test_functionalization failed!
2022-08-11T16:14:30.6898032Z Executing ['/opt/conda/bin/python', '-bb', 'test_functionalization.py', '-v', '--import-slow-tests', '--import-disabled-tests'] ... [2022-08-11 16:14:30.689301]
2022-08-11T16:14:31.7911131Z Traceback (most recent call last):
2022-08-11T16:14:31.7911696Z   File "test_functionalization.py", line 8, in <module>
2022-08-11T16:14:31.7912029Z     from functorch.experimental import functionalize
2022-08-11T16:14:31.7912468Z ModuleNotFoundError: No module named 'functorch'
2022-08-11T16:14:31.9799427Z Traceback (most recent call last):
2022-08-11T16:14:31.9799806Z   File "test/run_test.py", line 974, in <module>
2022-08-11T16:14:31.9802169Z     main()
2022-08-11T16:14:31.9802425Z   File "test/run_test.py", line 952, in main
2022-08-11T16:14:31.9804603Z     raise RuntimeError(err_message)
2022-08-11T16:14:31.9805033Z RuntimeError: test_functionalization failed!
2022-08-11T16:14:32.2683467Z 
2022-08-11T16:14:32.2683784Z real	7m35.680s
2022-08-11T16:14:32.2684152Z user	9m32.926s
2022-08-11T16:14:32.2709920Z sys	0m4.634s
2022-08-11T16:14:32.2715260Z ##[error]Process completed with exit code 1.
2022-08-11T16:14:32.2755278Z Prepare all required actions
2022-08-11T16:14:32.2755589Z Getting action download info
2022-08-11T16:14:32.4707173Z ##[group]Run ./.github/actions/get-workflow-job-id
2022-08-11T16:14:32.4707523Z with:
2022-08-11T16:14:32.4707882Z   github-token: ***

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (crossref, 2, 2, linux.2xlarge) (9/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T16:13:47.2423528Z RuntimeError: test_functionalization failed!
2022-08-11T16:13:46.0658080Z Executing ['/opt/conda/bin/python', '-bb', 'test_functionalization.py', '-v', '--import-slow-tests', '--import-disabled-tests'] ... [2022-08-11 16:13:46.065456]
2022-08-11T16:13:47.0858030Z Traceback (most recent call last):
2022-08-11T16:13:47.0858578Z   File "test_functionalization.py", line 8, in <module>
2022-08-11T16:13:47.0858876Z     from functorch.experimental import functionalize
2022-08-11T16:13:47.0859511Z ModuleNotFoundError: No module named 'functorch'
2022-08-11T16:13:47.2417598Z Traceback (most recent call last):
2022-08-11T16:13:47.2418060Z   File "test/run_test.py", line 974, in <module>
2022-08-11T16:13:47.2420549Z     main()
2022-08-11T16:13:47.2420893Z   File "test/run_test.py", line 952, in main
2022-08-11T16:13:47.2423142Z     raise RuntimeError(err_message)
2022-08-11T16:13:47.2423528Z RuntimeError: test_functionalization failed!
2022-08-11T16:13:47.4874935Z 
2022-08-11T16:13:47.4875598Z real	7m27.392s
2022-08-11T16:13:47.4875931Z user	10m47.312s
2022-08-11T16:13:47.4876090Z sys	0m12.492s
2022-08-11T16:13:47.4905713Z ##[error]Process completed with exit code 1.
2022-08-11T16:13:47.4943205Z Prepare all required actions
2022-08-11T16:13:47.4943497Z Getting action download info
2022-08-11T16:13:47.6985021Z ##[group]Run ./.github/actions/get-workflow-job-id
2022-08-11T16:13:47.6985241Z with:
2022-08-11T16:13:47.6985573Z   github-token: ***

See GitHub Actions build pull / linux-focal-py3.7-gcc7 / test (functorch, 1, 1, linux.2xlarge) (10/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T16:05:48.2526115Z ModuleNotFoundError: No module named 'functorch'
2022-08-11T16:05:47.3202543Z prioritized: []
2022-08-11T16:05:47.3204512Z the rest: ['/var/lib/jenkins/workspace/functorch/test/test_compile_cache', '/var/lib/jenkins/workspace/functorch/test/test_dims', '/var/lib/jenkins/workspace/functorch/test/test_eager_transforms', '/var/lib/jenkins/workspace/functorch/test/test_functionalize', '/var/lib/jenkins/workspace/functorch/test/test_memory_efficient_fusion', '/var/lib/jenkins/workspace/functorch/test/test_minifier', '/var/lib/jenkins/workspace/functorch/test/test_ops', '/var/lib/jenkins/workspace/functorch/test/test_pythonkey', '/var/lib/jenkins/workspace/functorch/test/test_vmap']
2022-08-11T16:05:47.3205137Z 
2022-08-11T16:05:47.3205552Z Downloading https://raw.githubusercontent.com/pytorch/test-infra/generated-stats/stats/slow-tests.json to /var/lib/jenkins/workspace/test/.pytorch-slow-tests.json
2022-08-11T16:05:47.3409065Z Downloading https://raw.githubusercontent.com/pytorch/test-infra/generated-stats/stats/disabled-tests.json to /var/lib/jenkins/workspace/test/.pytorch-disabled-tests.json
2022-08-11T16:05:47.3821877Z Running /var/lib/jenkins/workspace/functorch/test/test_compile_cache ... [2022-08-11 16:05:47.381821]
2022-08-11T16:05:47.3822729Z Executing ['/opt/conda/bin/python', '-bb', '/var/lib/jenkins/workspace/functorch/test/test_compile_cache.py', '-v', '--import-slow-tests', '--import-disabled-tests'] ... [2022-08-11 16:05:47.381873]
2022-08-11T16:05:48.2524783Z Traceback (most recent call last):
2022-08-11T16:05:48.2525263Z   File "/var/lib/jenkins/workspace/functorch/test/test_compile_cache.py", line 5, in <module>
2022-08-11T16:05:48.2525642Z     import functorch
2022-08-11T16:05:48.2526115Z ModuleNotFoundError: No module named 'functorch'
2022-08-11T16:05:48.4107814Z Traceback (most recent call last):
2022-08-11T16:05:48.4108296Z   File "test/run_test.py", line 974, in <module>
2022-08-11T16:05:48.4110696Z     main()
2022-08-11T16:05:48.4111068Z   File "test/run_test.py", line 952, in main
2022-08-11T16:05:48.4113574Z     raise RuntimeError(err_message)
2022-08-11T16:05:48.4114001Z RuntimeError: /var/lib/jenkins/workspace/functorch/test/test_compile_cache failed!
2022-08-11T16:05:48.6889870Z ##[error]Process completed with exit code 1.
2022-08-11T16:05:48.6920146Z Prepare all required actions
2022-08-11T16:05:48.6920436Z Getting action download info
2022-08-11T16:05:48.8648640Z ##[group]Run ./.github/actions/get-workflow-job-id

See GitHub Actions build pull / linux-bionic-cuda11.6-py3.10-gcc7 / test (default, 3, 4, linux.4xlarge.nvidia.gpu) (11/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T16:26:43.9093397Z FAIL [0.003s]: tes..._surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T16:26:43.8310937Z   test_type_check_reshape_false (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:26:43.8345506Z   test_type_check_reshape_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:26:43.8545420Z   test_type_check_symbolic_inferenceconv2D_maxpool2d_flatten (fx.test_gradual_type.TypeCheckerTest) ... ok (0.020s)
2022-08-11T16:26:43.8591486Z   test_type_check_transpose_False (fx.test_gradual_type.TypeCheckerTest) ... ok (0.005s)
2022-08-11T16:26:43.8625713Z   test_type_check_transpose_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:26:43.8926364Z   test_type_maxpool2d_fully_static (fx.test_gradual_type.TypeCheckerTest) ... ok (0.030s)
2022-08-11T16:26:43.8975801Z   test_type_typechecl_maxpool2d_3dinput (fx.test_gradual_type.TypeCheckerTest) ... ok (0.005s)
2022-08-11T16:26:43.9089134Z   test_typecheck_basicblock (fx.test_gradual_type.TypeCheckerTest) ... ok (0.011s)
2022-08-11T16:26:43.9089746Z 
2022-08-11T16:26:43.9090338Z ======================================================================
2022-08-11T16:26:43.9093397Z FAIL [0.003s]: test_public_api_surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T16:26:43.9094620Z ----------------------------------------------------------------------
2022-08-11T16:26:43.9095270Z Traceback (most recent call last):
2022-08-11T16:26:43.9096170Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 3814, in test_public_api_surface
2022-08-11T16:26:43.9097077Z     raise AssertionError(f"Public FX API(s) {non_back_compat_strs} introduced but not given a "
2022-08-11T16:26:43.9099012Z AssertionError: Public FX API(s) ['torch.fx.passes.reinplace.reinplace'] introduced but not given a backwards-compatibility classification! Please decorate these API(s) with `@torch.fx._compatibility.compatibility` to specify BC guarantees.
2022-08-11T16:26:43.9099596Z 
2022-08-11T16:26:43.9099880Z ----------------------------------------------------------------------
2022-08-11T16:26:43.9100235Z Ran 1009 tests in 4.366s
2022-08-11T16:26:43.9100377Z 
2022-08-11T16:26:43.9100564Z FAILED (failures=1, skipped=598, expected failures=3)

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (dynamo, 2, 2, linux.2xlarge) (12/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T16:06:55.4648237Z RuntimeError: test_functionalization failed!
2022-08-11T16:06:54.0610903Z Executing ['/opt/conda/bin/python', '-bb', 'test_functionalization.py', '-v', '--import-slow-tests', '--import-disabled-tests'] ... [2022-08-11 16:06:54.060686]
2022-08-11T16:06:55.2185262Z Traceback (most recent call last):
2022-08-11T16:06:55.2185605Z   File "test_functionalization.py", line 8, in <module>
2022-08-11T16:06:55.2185886Z     from functorch.experimental import functionalize
2022-08-11T16:06:55.2186324Z ModuleNotFoundError: No module named 'functorch'
2022-08-11T16:06:55.4643897Z Traceback (most recent call last):
2022-08-11T16:06:55.4644229Z   File "test/run_test.py", line 974, in <module>
2022-08-11T16:06:55.4645728Z     main()
2022-08-11T16:06:55.4645984Z   File "test/run_test.py", line 952, in main
2022-08-11T16:06:55.4647914Z     raise RuntimeError(err_message)
2022-08-11T16:06:55.4648237Z RuntimeError: test_functionalization failed!
2022-08-11T16:06:55.8017597Z 
2022-08-11T16:06:55.8017980Z real	0m19.220s
2022-08-11T16:06:55.8018353Z user	0m19.131s
2022-08-11T16:06:55.8018612Z sys	0m3.046s
2022-08-11T16:06:55.8048057Z ##[error]Process completed with exit code 1.
2022-08-11T16:06:55.8084370Z Prepare all required actions
2022-08-11T16:06:55.8084670Z Getting action download info
2022-08-11T16:06:55.9875892Z ##[group]Run ./.github/actions/get-workflow-job-id
2022-08-11T16:06:55.9876116Z with:
2022-08-11T16:06:55.9876453Z   github-token: ***

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (default, 1, 2, linux.2xlarge) (13/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T16:10:11.0603563Z FAIL [0.002s]: tes..._surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T16:10:10.9971672Z   test_type_check_reshape_false (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:10:11.0002049Z   test_type_check_reshape_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:10:11.0168958Z   test_type_check_symbolic_inferenceconv2D_maxpool2d_flatten (fx.test_gradual_type.TypeCheckerTest) ... ok (0.016s)
2022-08-11T16:10:11.0203662Z   test_type_check_transpose_False (fx.test_gradual_type.TypeCheckerTest) ... ok (0.004s)
2022-08-11T16:10:11.0235662Z   test_type_check_transpose_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:10:11.0484586Z   test_type_maxpool2d_fully_static (fx.test_gradual_type.TypeCheckerTest) ... ok (0.025s)
2022-08-11T16:10:11.0529145Z   test_type_typechecl_maxpool2d_3dinput (fx.test_gradual_type.TypeCheckerTest) ... ok (0.004s)
2022-08-11T16:10:11.0601323Z   test_typecheck_basicblock (fx.test_gradual_type.TypeCheckerTest) ... ok (0.007s)
2022-08-11T16:10:11.0602748Z 
2022-08-11T16:10:11.0603061Z ======================================================================
2022-08-11T16:10:11.0603563Z FAIL [0.002s]: test_public_api_surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T16:10:11.0605537Z ----------------------------------------------------------------------
2022-08-11T16:10:11.0606003Z Traceback (most recent call last):
2022-08-11T16:10:11.0606409Z   File "test_fx.py", line 3814, in test_public_api_surface
2022-08-11T16:10:11.0606923Z     raise AssertionError(f"Public FX API(s) {non_back_compat_strs} introduced but not given a "
2022-08-11T16:10:11.0608156Z AssertionError: Public FX API(s) ['torch.fx.passes.reinplace.reinplace'] introduced but not given a backwards-compatibility classification! Please decorate these API(s) with `@torch.fx._compatibility.compatibility` to specify BC guarantees.
2022-08-11T16:10:11.0608862Z 
2022-08-11T16:10:11.0609176Z ----------------------------------------------------------------------
2022-08-11T16:10:11.0620973Z Ran 1100 tests in 197.580s
2022-08-11T16:10:11.0621247Z 
2022-08-11T16:10:11.0621377Z FAILED (failures=1, skipped=194, expected failures=5)

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (crossref, 1, 2, linux.2xlarge) (14/14)

Step: "Test" (full log | diagnosis details)

2022-08-11T16:09:47.8063672Z FAIL [0.002s]: tes..._surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T16:09:47.7433202Z   test_type_check_reshape_false (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:09:47.7465116Z   test_type_check_reshape_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:09:47.7630550Z   test_type_check_symbolic_inferenceconv2D_maxpool2d_flatten (fx.test_gradual_type.TypeCheckerTest) ... ok (0.016s)
2022-08-11T16:09:47.7658919Z   test_type_check_transpose_False (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:09:47.7691588Z   test_type_check_transpose_true (fx.test_gradual_type.TypeCheckerTest) ... ok (0.003s)
2022-08-11T16:09:47.7947026Z   test_type_maxpool2d_fully_static (fx.test_gradual_type.TypeCheckerTest) ... ok (0.025s)
2022-08-11T16:09:47.7983626Z   test_type_typechecl_maxpool2d_3dinput (fx.test_gradual_type.TypeCheckerTest) ... ok (0.004s)
2022-08-11T16:09:47.8060112Z   test_typecheck_basicblock (fx.test_gradual_type.TypeCheckerTest) ... ok (0.007s)
2022-08-11T16:09:47.8062826Z 
2022-08-11T16:09:47.8063079Z ======================================================================
2022-08-11T16:09:47.8063672Z FAIL [0.002s]: test_public_api_surface (__main__.TestFXAPIBackwardCompatibility)
2022-08-11T16:09:47.8064513Z ----------------------------------------------------------------------
2022-08-11T16:09:47.8064908Z Traceback (most recent call last):
2022-08-11T16:09:47.8065329Z   File "test_fx.py", line 3814, in test_public_api_surface
2022-08-11T16:09:47.8065898Z     raise AssertionError(f"Public FX API(s) {non_back_compat_strs} introduced but not given a "
2022-08-11T16:09:47.8066815Z AssertionError: Public FX API(s) ['torch.fx.passes.reinplace.reinplace'] introduced but not given a backwards-compatibility classification! Please decorate these API(s) with `@torch.fx._compatibility.compatibility` to specify BC guarantees.
2022-08-11T16:09:47.8067216Z 
2022-08-11T16:09:47.8073698Z ----------------------------------------------------------------------
2022-08-11T16:09:47.8074193Z Ran 1100 tests in 199.823s
2022-08-11T16:09:47.8074363Z 
2022-08-11T16:09:47.8074489Z FAILED (failures=1, skipped=194, expected failures=5)

❄️ 1 failure tentatively classified as flaky:

See GitHub Actions build pull / linux-xenial-cuda11.3-py3.7-gcc7-bazel-test / build-and-test (1/1)

Step: "Build" (full log | diagnosis details) ❄️

2022-08-11T15:58:48.6112245Z Segmentation fault (core dumped)
2022-08-11T15:58:25.1613873Z �[32mINFO: �[0mFrom Compiling aten/src/ATen/native/quantized/cuda/FakeQuantizeCore.cu:
2022-08-11T15:58:25.1614980Z nvcc warning : incompatible redefinition for option 'std', the last value of this option was used
2022-08-11T15:58:31.7059977Z �[32mINFO: �[0mFrom Compiling aten/src/ATen/native/cuda/ActivationEluKernel.cu:
2022-08-11T15:58:31.7060833Z nvcc warning : incompatible redefinition for option 'std', the last value of this option was used
2022-08-11T15:58:47.5704800Z �[32mINFO: �[0mFrom Compiling aten/src/ATen/native/cuda/ActivationHardshrinkKernel.cu:
2022-08-11T15:58:47.5726033Z nvcc warning : incompatible redefinition for option 'std', the last value of this option was used
2022-08-11T15:58:48.5896104Z �[31m�[1mERROR: �[0m/var/lib/jenkins/workspace/BUILD.bazel:414:11: Compiling aten/src/ATen/native/cuda/UnaryOpsKernel.cu failed: (Segmentation fault): nvcc failed: error executing command external/local_cuda/cuda/bin/nvcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++11' -MD -MF ... (remaining 267 argument(s) skipped)
2022-08-11T15:58:48.5897128Z 
2022-08-11T15:58:48.5897491Z Use --sandbox_debug to see verbose messages from the sandbox
2022-08-11T15:58:48.6035773Z nvcc warning : incompatible redefinition for option 'std', the last value of this option was used
2022-08-11T15:58:48.6112245Z Segmentation fault (core dumped)
2022-08-11T15:58:49.6803676Z �[32mINFO: �[0mElapsed time: 498.890s, Critical Path: 154.91s
2022-08-11T15:58:49.6808791Z �[32mINFO: �[0m1394 processes: 136 internal, 1 local, 1257 processwrapper-sandbox.
2022-08-11T15:58:49.6809623Z �[31m�[1mFAILED:�[0m Build did NOT complete successfully
2022-08-11T15:58:49.6862105Z �[31m�[1mFAILED:�[0m Build did NOT complete successfully
2022-08-11T15:58:49.6982191Z �[0m+ sccache_epilogue
2022-08-11T15:58:49.6982773Z + echo '::group::Sccache Compilation Log'
2022-08-11T15:58:49.6983864Z ##[group]Sccache Compilation Log
2022-08-11T15:58:49.6984427Z + echo '=================== sccache compilation log ==================='
2022-08-11T15:58:49.6984836Z =================== sccache compilation log ===================
2022-08-11T15:58:49.6985387Z + python /var/lib/jenkins/workspace/.jenkins/pytorch/print_sccache_log.py /var/lib/jenkins/sccache_error.log

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

… test to use functionalize()"

[ghstack-poisoned]
@bdhirsh bdhirsh requested a review from ezyang August 1, 2022 21:47
from torch.utils._pytree import tree_map
from torch.fx.experimental.proxy_tensor import make_fx
from torch.fx.passes.reinplace import reinplace
from functorch.experimental import functionalize
Copy link
Contributor

Choose a reason for hiding this comment

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

since the build systems are not unified yet, ideally you should test if functorch is actually importable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, looks like CI is actually failing for that reason....

Any idea on the timeline for unifying build systems? Otherwise I guess I could try to import functionalize(), and fall back to the roll-your-own version that was in this file.

Copy link
Contributor

Choose a reason for hiding this comment

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

to test in CI, just update the CI to start building functorch after regular pytorch

@zou3519 knows unified build timeline

Copy link
Contributor

@zou3519 zou3519 Aug 2, 2022

Choose a reason for hiding this comment

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

+1, A short fix is to install functorch in all CI configurations so that it's available for testing.

Unified build timeline: by 1.13, unless people have reasons for it earlier

Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

short and sweet (well maybe not the expect test updates lol)

bdhirsh added 2 commits August 3, 2022 11:38
… test to use functionalize()"

Although this won't fully solve the "input metadata mutations" issue for AOTAutograd, there's no reason functionalization should break on input metadata mutations - this PR updates functionalization to use `as_strided_()` to mutate input metadata when necessary, similar to how it uses `copy_()` to handle input data mutations.

I also switched the functionalization tests over to using the proper `functionalize()` from functorch, which resulted in a few expect test changes.




[ghstack-poisoned]
… test to use functionalize()"

Although this won't fully solve the "input metadata mutations" issue for AOTAutograd, there's no reason functionalization should break on input metadata mutations - this PR updates functionalization to use `as_strided_()` to mutate input metadata when necessary, similar to how it uses `copy_()` to handle input data mutations.

I also switched the functionalization tests over to using the proper `functionalize()` from functorch, which resulted in a few expect test changes.




[ghstack-poisoned]
bdhirsh added 2 commits August 3, 2022 16:47
… test to use functionalize()"

Although this won't fully solve the "input metadata mutations" issue for AOTAutograd, there's no reason functionalization should break on input metadata mutations - this PR updates functionalization to use `as_strided_()` to mutate input metadata when necessary, similar to how it uses `copy_()` to handle input data mutations.

I also switched the functionalization tests over to using the proper `functionalize()` from functorch, which resulted in a few expect test changes.




[ghstack-poisoned]
… test to use functionalize()"

Although this won't fully solve the "input metadata mutations" issue for AOTAutograd, there's no reason functionalization should break on input metadata mutations - this PR updates functionalization to use `as_strided_()` to mutate input metadata when necessary, similar to how it uses `copy_()` to handle input data mutations.

I also switched the functionalization tests over to using the proper `functionalize()` from functorch, which resulted in a few expect test changes.




[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 24, 2022
…n inputs"

A version of this PR was sitting at #82601 but that PR some other cleanup that relies on being able to use functorch in pytorch/pytorch CI tests, which isn't ready yet. I pulled the change out here to unblock functionalization for some models run with inductor (see pytorch/torchdynamo#964 (comment)).




[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 24, 2022
A version of this PR was sitting at #82601 but that PR some other cleanup that relies on being able to use functorch in pytorch/pytorch CI tests, which isn't ready yet. I pulled the change out here to unblock functionalization for some models run with inductor (see pytorch/torchdynamo#964 (comment)).




[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 25, 2022
…n inputs"

A version of this PR was sitting at #82601 but that PR some other cleanup that relies on being able to use functorch in pytorch/pytorch CI tests, which isn't ready yet. I pulled the change out here to unblock functionalization for some models run with inductor (see pytorch/torchdynamo#964 (comment)).




[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Aug 25, 2022
A version of this PR was sitting at #82601 but that PR some other cleanup that relies on being able to use functorch in pytorch/pytorch CI tests, which isn't ready yet. I pulled the change out here to unblock functionalization for some models run with inductor (see pytorch/torchdynamo#964 (comment)).




[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Aug 25, 2022
A version of this PR was sitting at #82601 but that PR some other cleanup that relies on being able to use functorch in pytorch/pytorch CI tests, which isn't ready yet. I pulled the change out here to unblock functionalization for some models run with inductor (see pytorch/torchdynamo#964 (comment)).

Pull Request resolved: #83993
Approved by: https://github.com/ezyang
facebook-github-bot pushed a commit to pytorch/functorch that referenced this pull request Aug 26, 2022
Summary:
A version of this PR was sitting at pytorch/pytorch#82601 but that PR some other cleanup that relies on being able to use functorch in pytorch/pytorch CI tests, which isn't ready yet. I pulled the change out here to unblock functionalization for some models run with inductor (see pytorch/torchdynamo#964 (comment)).

X-link: pytorch/pytorch#83993
Approved by: https://github.com/ezyang

Reviewed By: malfet

Differential Revision: D39034436

Pulled By: bdhirsh

fbshipit-source-id: a419018f4306e8dc2e7542d793c0520bf821fb1d
facebook-github-bot pushed a commit that referenced this pull request Aug 26, 2022
Summary:
A version of this PR was sitting at #82601 but that PR some other cleanup that relies on being able to use functorch in pytorch/pytorch CI tests, which isn't ready yet. I pulled the change out here to unblock functionalization for some models run with inductor (see pytorch/torchdynamo#964 (comment)).

Pull Request resolved: #83993
Approved by: https://github.com/ezyang

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/b82c74da07430ba4a221403d383eeb27de04f7f7

Reviewed By: malfet

Differential Revision: D39034436

Pulled By: bdhirsh

fbshipit-source-id: a419018f4306e8dc2e7542d793c0520bf821fb1d
… test to use functionalize()"

Although this won't fully solve the "input metadata mutations" issue for AOTAutograd, there's no reason functionalization should break on input metadata mutations - this PR updates functionalization to use `as_strided_()` to mutate input metadata when necessary, similar to how it uses `copy_()` to handle input data mutations.

I also switched the functionalization tests over to using the proper `functionalize()` from functorch, which resulted in a few expect test changes.




[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 26, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/82601

Note: Links to docs will display an error until the docs builds have been completed.

❌ 7 Failures, 1 Pending

As of commit a75a5f2:

The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

… test to use functionalize()"

Although this won't fully solve the "input metadata mutations" issue for AOTAutograd, there's no reason functionalization should break on input metadata mutations - this PR updates functionalization to use `as_strided_()` to mutate input metadata when necessary, similar to how it uses `copy_()` to handle input data mutations.

I also switched the functionalization tests over to using the proper `functionalize()` from functorch, which resulted in a few expect test changes.




[ghstack-poisoned]
… test to use functionalize()"

Although this won't fully solve the "input metadata mutations" issue for AOTAutograd, there's no reason functionalization should break on input metadata mutations - this PR updates functionalization to use `as_strided_()` to mutate input metadata when necessary, similar to how it uses `copy_()` to handle input data mutations.

I also switched the functionalization tests over to using the proper `functionalize()` from functorch, which resulted in a few expect test changes.




[ghstack-poisoned]
… test to use functionalize()"

Although this won't fully solve the "input metadata mutations" issue for AOTAutograd, there's no reason functionalization should break on input metadata mutations - this PR updates functionalization to use `as_strided_()` to mutate input metadata when necessary, similar to how it uses `copy_()` to handle input data mutations.

I also switched the functionalization tests over to using the proper `functionalize()` from functorch, which resulted in a few expect test changes.




[ghstack-poisoned]
… test to use functionalize()"

Although this won't fully solve the "input metadata mutations" issue for AOTAutograd, there's no reason functionalization should break on input metadata mutations - this PR updates functionalization to use `as_strided_()` to mutate input metadata when necessary, similar to how it uses `copy_()` to handle input data mutations.

I also switched the functionalization tests over to using the proper `functionalize()` from functorch, which resulted in a few expect test changes.




[ghstack-poisoned]
@bdhirsh bdhirsh mentioned this pull request Sep 29, 2022
… test to use functionalize()"

Although this won't fully solve the "input metadata mutations" issue for AOTAutograd, there's no reason functionalization should break on input metadata mutations - this PR updates functionalization to use `as_strided_()` to mutate input metadata when necessary, similar to how it uses `copy_()` to handle input data mutations.

I also switched the functionalization tests over to using the proper `functionalize()` from functorch, which resulted in a few expect test changes.




[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

/easycla

As part of the transition to the PyTorch Foundation, this project now requires contributions be covered under the new CLA. See #85559 for additional details.

This comment will trigger a new check of this PR. If you are already covered, you will simply see a new "EasyCLA" check that passes. If you are not covered, a bot will leave a new comment with a link to sign.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2022

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Dec 3, 2022
@github-actions github-actions bot closed this Jan 2, 2023
@facebook-github-bot facebook-github-bot deleted the gh/bdhirsh/288/head branch June 8, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants