Skip to content

Revert "Revert "Python Bindings for SymInts (#78135)""#79608

Closed
ezyang wants to merge 2 commits intogh/ezyang/1222/basefrom
gh/ezyang/1222/head
Closed

Revert "Revert "Python Bindings for SymInts (#78135)""#79608
ezyang wants to merge 2 commits intogh/ezyang/1222/basefrom
gh/ezyang/1222/head

Conversation

@ezyang
Copy link
Copy Markdown
Contributor

@ezyang ezyang commented Jun 15, 2022

Stack from ghstack (oldest at bottom):

This reverts commit b8db0a0.

This reverts commit b8db0a0.

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

facebook-github-bot commented Jun 15, 2022

🔗 Helpful links

❌ 17 New Failures

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

Expand to see more
  • 17/17 failures introduced in this PR

🕵️ 17 new failures recognized by patterns

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

See GitHub Actions build pull / linux-xenial-cuda11.3-py3.7-gcc7 / test (default, 3, 4, linux.4xlarge.nvidia.gpu) (1/17)

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

2022-06-15T17:27:25.0664695Z RuntimeError: test_ops_jit failed!
2022-06-15T17:27:20.8345799Z 
2022-06-15T17:27:20.8345970Z FAILED (errors=2, skipped=102, expected failures=160)
2022-06-15T17:27:20.8346183Z 
2022-06-15T17:27:20.8346308Z Generating XML reports...
2022-06-15T17:27:21.0247727Z Generated XML report: test-reports/python-unittest/test_ops_jit/TEST-TestJitCUDA-20220615170733.xml
2022-06-15T17:27:25.0655665Z Traceback (most recent call last):
2022-06-15T17:27:25.0656374Z   File "test/run_test.py", line 946, in <module>
2022-06-15T17:27:25.0659732Z     main()
2022-06-15T17:27:25.0660285Z   File "test/run_test.py", line 924, in main
2022-06-15T17:27:25.0664072Z     raise RuntimeError(err_message)
2022-06-15T17:27:25.0664695Z RuntimeError: test_ops_jit failed!
2022-06-15T17:27:25.6001049Z + cleanup
2022-06-15T17:27:25.6001501Z + retcode=1
2022-06-15T17:27:25.6001749Z + set +x
2022-06-15T17:27:25.6047831Z ##[error]Process completed with exit code 1.
2022-06-15T17:27:25.6086911Z Prepare all required actions
2022-06-15T17:27:25.6087343Z Getting action download info
2022-06-15T17:27:25.8023935Z ##[group]Run ./.github/actions/get-workflow-job-id
2022-06-15T17:27:25.8024246Z with:
2022-06-15T17:27:25.8024669Z   github-token: ***
2022-06-15T17:27:25.8024916Z env:

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

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

2022-06-15T16:11:58.1711881Z RuntimeError: test_ops_jit failed!
2022-06-15T16:11:54.5225536Z 
2022-06-15T16:11:54.5225657Z FAILED (errors=2, skipped=101, expected failures=151)
2022-06-15T16:11:54.5225809Z 
2022-06-15T16:11:54.5225896Z Generating XML reports...
2022-06-15T16:11:54.6841142Z Generated XML report: test-reports/python-unittest/test_ops_jit/TEST-TestJitCPU-20220615155841.xml
2022-06-15T16:11:58.1707177Z Traceback (most recent call last):
2022-06-15T16:11:58.1707732Z   File "test/run_test.py", line 946, in <module>
2022-06-15T16:11:58.1709742Z     main()
2022-06-15T16:11:58.1709965Z   File "test/run_test.py", line 924, in main
2022-06-15T16:11:58.1711589Z     raise RuntimeError(err_message)
2022-06-15T16:11:58.1711881Z RuntimeError: test_ops_jit failed!
2022-06-15T16:11:58.4705793Z 
2022-06-15T16:11:58.4706323Z real	37m20.821s
2022-06-15T16:11:58.4706532Z user	86m31.920s
2022-06-15T16:11:58.4706772Z sys	4m59.318s
2022-06-15T16:11:58.4707022Z + cleanup
2022-06-15T16:11:58.4707252Z + retcode=1
2022-06-15T16:11:58.4707485Z + set +x
2022-06-15T16:11:58.4748909Z ##[error]Process completed with exit code 1.
2022-06-15T16:11:58.4808808Z Prepare all required actions
2022-06-15T16:11:58.4809093Z Getting action download info

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

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

2022-06-15T15:50:24.2192971Z RuntimeError: test_ops_jit failed!
2022-06-15T15:50:20.1290076Z 
2022-06-15T15:50:20.1290251Z FAILED (errors=2, skipped=101, expected failures=151)
2022-06-15T15:50:20.1290459Z 
2022-06-15T15:50:20.1290599Z Generating XML reports...
2022-06-15T15:50:20.2766495Z Generated XML report: test-reports/python-unittest/test_ops_jit/TEST-TestJitCPU-20220615153717.xml
2022-06-15T15:50:24.2188789Z Traceback (most recent call last):
2022-06-15T15:50:24.2189072Z   File "test/run_test.py", line 946, in <module>
2022-06-15T15:50:24.2190736Z     main()
2022-06-15T15:50:24.2191068Z   File "test/run_test.py", line 924, in main
2022-06-15T15:50:24.2192563Z     raise RuntimeError(err_message)
2022-06-15T15:50:24.2192971Z RuntimeError: test_ops_jit failed!
2022-06-15T15:50:24.4857534Z 
2022-06-15T15:50:24.4857789Z real	13m25.226s
2022-06-15T15:50:24.4858105Z user	22m24.827s
2022-06-15T15:50:24.4858493Z sys	0m18.271s
2022-06-15T15:50:24.4858784Z + cleanup
2022-06-15T15:50:24.4859005Z + retcode=1
2022-06-15T15:50:24.4859155Z + set +x
2022-06-15T15:50:24.4895149Z ##[error]Process completed with exit code 1.
2022-06-15T15:50:24.4938598Z Prepare all required actions
2022-06-15T15:50:24.4938902Z Getting action download info

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

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

2022-06-15T15:35:30.7378440Z The PR is introduc...m to confirm whether this change is wanted or not.
2022-06-15T15:35:30.7364695Z processing existing schema:  duration_ns(__torch__.torch.classes.profiling.InstructionStats _0) -> int _0
2022-06-15T15:35:30.7366192Z processing existing schema:  source(__torch__.torch.classes.profiling.SourceStats _0) -> __torch__.torch.classes.profiling.SourceRef _0
2022-06-15T15:35:30.7368848Z processing existing schema:  line_map(__torch__.torch.classes.profiling.SourceStats _0) -> Dict(int, __torch__.torch.classes.profiling.InstructionStats) _0
2022-06-15T15:35:30.7369536Z processing existing schema:  __init__(__torch__.torch.classes.profiling._ScriptProfile _0) -> NoneType _0
2022-06-15T15:35:30.7370867Z processing existing schema:  enable(__torch__.torch.classes.profiling._ScriptProfile _0) -> NoneType _0
2022-06-15T15:35:30.7372337Z processing existing schema:  disable(__torch__.torch.classes.profiling._ScriptProfile _0) -> NoneType _0
2022-06-15T15:35:30.7374041Z processing existing schema:  _dump_stats(__torch__.torch.classes.profiling._ScriptProfile _0) -> __torch__.torch.classes.profiling.SourceStats[] _0
2022-06-15T15:35:30.7375305Z processing existing schema:  __init__(__torch__.torch.classes.c10d.ProcessGroup _0, int _1, int _2) -> NoneType _0
2022-06-15T15:35:30.7376609Z processing existing schema:  __init__(__torch__.torch.classes.c10d.Work _0) -> NoneType _0
2022-06-15T15:35:30.7378114Z processing existing schema:  __init__(__torch__.torch.classes.dist_rpc.WorkerInfo _0, str _1, int _2) -> NoneType _0
2022-06-15T15:35:30.7378440Z The PR is introducing backward incompatible changes to the operator library. Please contact PyTorch team to confirm whether this change is wanted or not. 
2022-06-15T15:35:30.7378448Z 
2022-06-15T15:35:30.7378520Z Broken ops: [
2022-06-15T15:35:30.7378921Z 	aten::empty.SymInt(SymInt[] size, *, int? dtype=None, int? layout=None, Device? device=None, bool? pin_memory=None, int? memory_format=None) -> Tensor
2022-06-15T15:35:30.7378985Z ]
2022-06-15T15:35:30.8538091Z + cleanup
2022-06-15T15:35:30.8538438Z + retcode=1
2022-06-15T15:35:30.8538671Z + set +x
2022-06-15T15:35:30.8574154Z ##[error]Process completed with exit code 1.
2022-06-15T15:35:30.8602915Z Prepare all required actions
2022-06-15T15:35:30.8603164Z Getting action download info

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

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

2022-06-15T17:07:36.7422931Z RuntimeError: test_ops_jit failed!
2022-06-15T17:07:22.9205521Z 
2022-06-15T17:07:22.9205640Z FAILED (errors=2, skipped=101, expected failures=151)
2022-06-15T17:07:22.9205790Z 
2022-06-15T17:07:22.9205868Z Generating XML reports...
2022-06-15T17:07:23.1009116Z Generated XML report: test-reports/python-unittest/test_ops_jit/TEST-TestJitCPU-20220615154429.xml
2022-06-15T17:07:36.7415036Z Traceback (most recent call last):
2022-06-15T17:07:36.7415387Z   File "test/run_test.py", line 946, in <module>
2022-06-15T17:07:36.7419303Z     main()
2022-06-15T17:07:36.7419495Z   File "test/run_test.py", line 924, in main
2022-06-15T17:07:36.7422701Z     raise RuntimeError(err_message)
2022-06-15T17:07:36.7422931Z RuntimeError: test_ops_jit failed!
2022-06-15T17:07:37.3256009Z 
2022-06-15T17:07:37.3256493Z real	83m20.734s
2022-06-15T17:07:37.3256890Z user	81m50.250s
2022-06-15T17:07:37.3257139Z sys	1m33.350s
2022-06-15T17:07:37.3257312Z + cleanup
2022-06-15T17:07:37.3257482Z + retcode=1
2022-06-15T17:07:37.3257728Z + set +x
2022-06-15T17:07:37.3296250Z ##[error]Process completed with exit code 1.
2022-06-15T17:07:37.3333199Z Prepare all required actions
2022-06-15T17:07:37.3333492Z Getting action download info

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

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

2022-06-15T16:18:32.4082214Z RuntimeError: test_jit_fuser_te failed!
2022-06-15T16:18:31.1464565Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-jit.test_fuser_common.TestFuserCommon-20220615161630.xml
2022-06-15T16:18:31.1466712Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-TestLoopnestRandomizationCPU-20220615161630.xml
2022-06-15T16:18:31.8310089Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-TestNNCOpInfoCPU-20220615161630.xml
2022-06-15T16:18:31.8389155Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-TestTEFuserDynamic-20220615161630.xml
2022-06-15T16:18:31.8468614Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-TestTEFuserStatic-20220615161630.xml
2022-06-15T16:18:32.4077031Z Traceback (most recent call last):
2022-06-15T16:18:32.4077313Z   File "test/run_test.py", line 946, in <module>
2022-06-15T16:18:32.4079240Z     main()
2022-06-15T16:18:32.4079616Z   File "test/run_test.py", line 924, in main
2022-06-15T16:18:32.4081797Z     raise RuntimeError(err_message)
2022-06-15T16:18:32.4082214Z RuntimeError: test_jit_fuser_te failed!
2022-06-15T16:18:32.7147662Z 
2022-06-15T16:18:32.7148468Z real	41m36.996s
2022-06-15T16:18:32.7148787Z user	68m14.099s
2022-06-15T16:18:32.7149054Z sys	3m55.153s
2022-06-15T16:18:32.7149277Z + cleanup
2022-06-15T16:18:32.7149436Z + retcode=1
2022-06-15T16:18:32.7149599Z + set +x
2022-06-15T16:18:32.7186476Z ##[error]Process completed with exit code 1.
2022-06-15T16:18:32.7224230Z Prepare all required actions
2022-06-15T16:18:32.7224532Z Getting action download info

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

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

2022-06-15T16:07:59.7054706Z RuntimeError: test_jit_fuser_te failed!
2022-06-15T16:07:58.5125931Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-jit.test_fuser_common.TestFuserCommon-20220615160554.xml
2022-06-15T16:07:58.5130817Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-TestLoopnestRandomizationCPU-20220615160554.xml
2022-06-15T16:07:59.1917280Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-TestNNCOpInfoCPU-20220615160554.xml
2022-06-15T16:07:59.1994759Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-TestTEFuserDynamic-20220615160554.xml
2022-06-15T16:07:59.2074708Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-TestTEFuserStatic-20220615160554.xml
2022-06-15T16:07:59.7048544Z Traceback (most recent call last):
2022-06-15T16:07:59.7049020Z   File "test/run_test.py", line 946, in <module>
2022-06-15T16:07:59.7051548Z     main()
2022-06-15T16:07:59.7051906Z   File "test/run_test.py", line 924, in main
2022-06-15T16:07:59.7054308Z     raise RuntimeError(err_message)
2022-06-15T16:07:59.7054706Z RuntimeError: test_jit_fuser_te failed!
2022-06-15T16:07:59.9744425Z 
2022-06-15T16:07:59.9744844Z real	33m14.938s
2022-06-15T16:07:59.9745202Z user	87m47.954s
2022-06-15T16:07:59.9745508Z sys	2m26.387s
2022-06-15T16:07:59.9745723Z + cleanup
2022-06-15T16:07:59.9746107Z + retcode=1
2022-06-15T16:07:59.9746267Z + set +x
2022-06-15T16:07:59.9782503Z ##[error]Process completed with exit code 1.
2022-06-15T16:07:59.9819094Z Prepare all required actions
2022-06-15T16:07:59.9819384Z Getting action download info

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

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

2022-06-15T16:27:29.2962162Z RuntimeError: test_ops_jit failed!
2022-06-15T16:27:25.0647150Z 
2022-06-15T16:27:25.0647301Z FAILED (errors=2, skipped=101, expected failures=151)
2022-06-15T16:27:25.0647448Z 
2022-06-15T16:27:25.0647530Z Generating XML reports...
2022-06-15T16:27:25.2226231Z Generated XML report: test-reports/python-unittest/test_ops_jit/TEST-TestJitCPU-20220615160931.xml
2022-06-15T16:27:29.2957527Z Traceback (most recent call last):
2022-06-15T16:27:29.2957958Z   File "test/run_test.py", line 946, in <module>
2022-06-15T16:27:29.2959611Z     main()
2022-06-15T16:27:29.2959958Z   File "test/run_test.py", line 924, in main
2022-06-15T16:27:29.2961879Z     raise RuntimeError(err_message)
2022-06-15T16:27:29.2962162Z RuntimeError: test_ops_jit failed!
2022-06-15T16:27:29.5813254Z 
2022-06-15T16:27:29.5813687Z real	52m50.078s
2022-06-15T16:27:29.5814051Z user	123m34.670s
2022-06-15T16:27:29.5814354Z sys	7m9.473s
2022-06-15T16:27:29.5814527Z + cleanup
2022-06-15T16:27:29.5814684Z + retcode=1
2022-06-15T16:27:29.5814829Z + set +x
2022-06-15T16:27:29.5858875Z ##[error]Process completed with exit code 1.
2022-06-15T16:27:29.5942453Z Prepare all required actions
2022-06-15T16:27:29.5942936Z Getting action download info

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

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

2022-06-15T15:47:11.0685400Z RuntimeError: test_jit_fuser_te failed!
2022-06-15T15:47:09.9795191Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-jit.test_fuser_common.TestFuserCommon-20220615154515.xml
2022-06-15T15:47:09.9797628Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-TestLoopnestRandomizationCPU-20220615154515.xml
2022-06-15T15:47:10.6281780Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-TestNNCOpInfoCPU-20220615154515.xml
2022-06-15T15:47:10.6357787Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-TestTEFuserDynamic-20220615154515.xml
2022-06-15T15:47:10.6440289Z Generated XML report: test-reports/python-unittest/test_jit_fuser_te/TEST-TestTEFuserStatic-20220615154515.xml
2022-06-15T15:47:11.0680362Z Traceback (most recent call last):
2022-06-15T15:47:11.0680637Z   File "test/run_test.py", line 946, in <module>
2022-06-15T15:47:11.0683020Z     main()
2022-06-15T15:47:11.0683235Z   File "test/run_test.py", line 924, in main
2022-06-15T15:47:11.0685169Z     raise RuntimeError(err_message)
2022-06-15T15:47:11.0685400Z RuntimeError: test_jit_fuser_te failed!
2022-06-15T15:47:11.2922000Z 
2022-06-15T15:47:11.2922487Z real	12m42.928s
2022-06-15T15:47:11.2922805Z user	34m43.951s
2022-06-15T15:47:11.2923079Z sys	1m2.038s
2022-06-15T15:47:11.2923323Z + cleanup
2022-06-15T15:47:11.2924514Z + retcode=1
2022-06-15T15:47:11.2924869Z + set +x
2022-06-15T15:47:11.2960439Z ##[error]Process completed with exit code 1.
2022-06-15T15:47:11.2995305Z Prepare all required actions
2022-06-15T15:47:11.2995614Z Getting action download info

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

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

2022-06-15T16:31:06.9892184Z RuntimeError: test_ops_jit failed!
2022-06-15T16:31:01.1305372Z 
2022-06-15T16:31:01.1305538Z FAILED (errors=2, skipped=101, expected failures=151)
2022-06-15T16:31:01.1305738Z 
2022-06-15T16:31:01.1305850Z Generating XML reports...
2022-06-15T16:31:01.1306252Z Generated XML report: test-reports\python-unittest\test_ops_jit\TEST-TestJitCPU-20220615160620.xml
2022-06-15T16:31:06.9890701Z Traceback (most recent call last):
2022-06-15T16:31:06.9891130Z   File "run_test.py", line 946, in <module>
2022-06-15T16:31:06.9891382Z     main()
2022-06-15T16:31:06.9891615Z   File "run_test.py", line 924, in main
2022-06-15T16:31:06.9891913Z     raise RuntimeError(err_message)
2022-06-15T16:31:06.9892184Z RuntimeError: test_ops_jit failed!
2022-06-15T16:31:07.2927698Z 
2022-06-15T16:31:07.2928267Z (base) C:\actions-runner\_work\pytorch\pytorch\test>if ERRORLEVEL 1 goto fail 
2022-06-15T16:31:07.2930485Z 
2022-06-15T16:31:07.2930898Z (base) C:\actions-runner\_work\pytorch\pytorch\test>exit /b 1 
2022-06-15T16:31:07.2957077Z + cleanup
2022-06-15T16:31:07.2957319Z + retcode=1
2022-06-15T16:31:07.2957489Z + set +x
2022-06-15T16:31:07.2986403Z ##[error]Process completed with exit code 1.
2022-06-15T16:31:07.3127557Z Prepare all required actions
2022-06-15T16:31:07.3128095Z Getting action download info

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

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

2022-06-15T15:41:34.0081227Z SUMMARY: Undefined.../jenkins/workspace/aten/src/ATen/Utils.cpp:20:3 in
2022-06-15T15:41:34.0060924Z     #10 0x55f639e40c81 in run_mod /home/builder/tkoch/workspace/python_1648536129212/work/Python/pythonrun.c:1037
2022-06-15T15:41:34.0061889Z     #11 0x55f639e4bc69 in PyRun_StringFlags /home/builder/tkoch/workspace/python_1648536129212/work/Python/pythonrun.c:961
2022-06-15T15:41:34.0062933Z     #12 0x55f639e4bccb in PyRun_SimpleStringFlags /home/builder/tkoch/workspace/python_1648536129212/work/Python/pythonrun.c:455
2022-06-15T15:41:34.0064436Z     #13 0x55f639e4bdc8 in pymain_run_command /home/builder/tkoch/workspace/python_1648536129212/work/Modules/main.c:420
2022-06-15T15:41:34.0065436Z     #14 0x55f639e4bdc8 in pymain_run_python /home/builder/tkoch/workspace/python_1648536129212/work/Modules/main.c:2907
2022-06-15T15:41:34.0066128Z     #15 0x55f639e4bdc8 in pymain_main /home/builder/tkoch/workspace/python_1648536129212/work/Modules/main.c:3460
2022-06-15T15:41:34.0066613Z     #16 0x55f639e4c18b in _Py_UnixMain /home/builder/tkoch/workspace/python_1648536129212/work/Modules/main.c:3495
2022-06-15T15:41:34.0079809Z     #17 0x7fbd4ed76082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082)
2022-06-15T15:41:34.0080364Z     #18 0x55f639df1039 in _start (/opt/conda/bin/python3.7+0x1d8039)
2022-06-15T15:41:34.0080665Z 
2022-06-15T15:41:34.0081227Z SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /var/lib/jenkins/workspace/aten/src/ATen/Utils.cpp:20:3 in 
2022-06-15T15:41:34.0370459Z + retcode=1
2022-06-15T15:41:34.0370797Z + set -e
2022-06-15T15:41:34.0370950Z + return 1
2022-06-15T15:41:34.0373248Z + [[ linux-focal-py3.7-clang7-asan-default == *-NO_AVX-* ]]
2022-06-15T15:41:34.0373579Z + [[ default == \n\o\g\p\u\_\N\O\_\A\V\X ]]
2022-06-15T15:41:34.0373925Z + [[ linux-focal-py3.7-clang7-asan-default == *-NO_AVX2-* ]]
2022-06-15T15:41:34.0374210Z + [[ default == \n\o\g\p\u\_\N\O\_\A\V\X\2 ]]
2022-06-15T15:41:34.0374560Z + [[ linux-focal-py3.7-clang7-asan-default == *-NO_AVX512-* ]]
2022-06-15T15:41:34.0374853Z + [[ default == \n\o\g\p\u\_\N\O\_\A\V\X\5\1\2 ]]
2022-06-15T15:41:34.0376863Z + [[ linux-focal-py3.7-clang7-asan-default == *tbb* ]]

See GitHub Actions build pull / linux-xenial-cuda11.3-py3.7-gcc7 / test (default, 4, 4, linux.4xlarge.nvidia.gpu) (12/17)

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

2022-06-15T17:48:30.0106598Z RuntimeError: test_namedtensor failed!
2022-06-15T17:48:29.7100399Z 
2022-06-15T17:48:29.7100570Z FAILED (errors=1, skipped=2, expected failures=3)
2022-06-15T17:48:29.7100775Z 
2022-06-15T17:48:29.7100901Z Generating XML reports...
2022-06-15T17:48:29.7232041Z Generated XML report: test-reports/python-unittest/test_namedtensor/TEST-TestNamedTensor-20220615174826.xml
2022-06-15T17:48:30.0100011Z Traceback (most recent call last):
2022-06-15T17:48:30.0100380Z   File "test/run_test.py", line 946, in <module>
2022-06-15T17:48:30.0103460Z     main()
2022-06-15T17:48:30.0103754Z   File "test/run_test.py", line 924, in main
2022-06-15T17:48:30.0106291Z     raise RuntimeError(err_message)
2022-06-15T17:48:30.0106598Z RuntimeError: test_namedtensor failed!
2022-06-15T17:48:30.5674811Z + cleanup
2022-06-15T17:48:30.5675119Z + retcode=1
2022-06-15T17:48:30.5675336Z + set +x
2022-06-15T17:48:30.5724117Z ##[error]Process completed with exit code 1.
2022-06-15T17:48:30.5762882Z Prepare all required actions
2022-06-15T17:48:30.5763307Z Getting action download info
2022-06-15T17:48:30.7625470Z ##[group]Run ./.github/actions/get-workflow-job-id
2022-06-15T17:48:30.7625768Z with:
2022-06-15T17:48:30.7626206Z   github-token: ***
2022-06-15T17:48:30.7626424Z env:

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

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

2022-06-15T16:47:30.6657318Z RuntimeError: distributions/test_distributions failed!
2022-06-15T16:47:30.2664531Z Generated XML report: test-reports\python-unittest\distributions.test_distributions\TEST-TestLazyLogitsInitialization-20220615164657.xml
2022-06-15T16:47:30.2665111Z Generated XML report: test-reports\python-unittest\distributions.test_distributions\TEST-TestNumericalStability-20220615164657.xml
2022-06-15T16:47:30.2665652Z Generated XML report: test-reports\python-unittest\distributions.test_distributions\TEST-TestRsample-20220615164657.xml
2022-06-15T16:47:30.2666160Z Generated XML report: test-reports\python-unittest\distributions.test_distributions\TEST-TestValidation-20220615164657.xml
2022-06-15T16:47:30.2666729Z Generated XML report: test-reports\python-unittest\distributions.test_distributions\TEST-TestJit-20220615164657.xml
2022-06-15T16:47:30.6656014Z Traceback (most recent call last):
2022-06-15T16:47:30.6656375Z   File "run_test.py", line 946, in <module>
2022-06-15T16:47:30.6656596Z     main()
2022-06-15T16:47:30.6656804Z   File "run_test.py", line 924, in main
2022-06-15T16:47:30.6657051Z     raise RuntimeError(err_message)
2022-06-15T16:47:30.6657318Z RuntimeError: distributions/test_distributions failed!
2022-06-15T16:47:30.9495712Z 
2022-06-15T16:47:30.9496351Z (base) C:\actions-runner\_work\pytorch\pytorch\test>if ERRORLEVEL 1 goto fail 
2022-06-15T16:47:30.9498133Z 
2022-06-15T16:47:30.9498542Z (base) C:\actions-runner\_work\pytorch\pytorch\test>exit /b 1 
2022-06-15T16:47:30.9530219Z + cleanup
2022-06-15T16:47:30.9530422Z + retcode=1
2022-06-15T16:47:30.9530578Z + set +x
2022-06-15T16:47:30.9580579Z ##[error]Process completed with exit code 1.
2022-06-15T16:47:30.9857663Z Prepare all required actions
2022-06-15T16:47:30.9858152Z Getting action download info

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

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

2022-06-15T16:44:26.2381937Z RuntimeError: test_namedtensor failed!
2022-06-15T16:44:25.7601701Z 
2022-06-15T16:44:25.7602041Z FAILED (errors=1, skipped=4, expected failures=3)
2022-06-15T16:44:25.7602189Z 
2022-06-15T16:44:25.7602274Z Generating XML reports...
2022-06-15T16:44:25.7708075Z Generated XML report: test-reports/python-unittest/test_namedtensor/TEST-TestNamedTensor-20220615164423.xml
2022-06-15T16:44:26.2345576Z Traceback (most recent call last):
2022-06-15T16:44:26.2345877Z   File "test/run_test.py", line 946, in <module>
2022-06-15T16:44:26.2378208Z     main()
2022-06-15T16:44:26.2378664Z   File "test/run_test.py", line 924, in main
2022-06-15T16:44:26.2381399Z     raise RuntimeError(err_message)
2022-06-15T16:44:26.2381937Z RuntimeError: test_namedtensor failed!
2022-06-15T16:44:26.7954912Z 
2022-06-15T16:44:26.7955235Z real	62m8.431s
2022-06-15T16:44:26.7955484Z user	94m39.401s
2022-06-15T16:44:26.7955646Z sys	2m23.724s
2022-06-15T16:44:26.7955817Z + cleanup
2022-06-15T16:44:26.7955977Z + retcode=1
2022-06-15T16:44:26.7956124Z + set +x
2022-06-15T16:44:26.7994562Z ##[error]Process completed with exit code 1.
2022-06-15T16:44:26.8028485Z Prepare all required actions
2022-06-15T16:44:26.8028794Z Getting action download info

See GitHub Actions build pull / linux-xenial-py3.7-clang7-onnx / test (default, 2, 2, linux.2xlarge) (15/17)

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

2022-06-15T15:37:42.5501584Z RuntimeError: Tracing operations taking symbolic ints isn't supported
2022-06-15T15:37:42.5475261Z   File "/opt/conda/lib/python3.7/site-packages/torch/jit/_trace.py", line 132, in forward
2022-06-15T15:37:42.5475550Z     self._force_outplace,
2022-06-15T15:37:42.5475912Z   File "/opt/conda/lib/python3.7/site-packages/torch/jit/_trace.py", line 118, in wrapper
2022-06-15T15:37:42.5497834Z     outs.append(self.inner(*trace_inputs))
2022-06-15T15:37:42.5498682Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1131, in _call_impl
2022-06-15T15:37:42.5499146Z     return forward_call(*input, **kwargs)
2022-06-15T15:37:42.5499720Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1119, in _slow_forward
2022-06-15T15:37:42.5500156Z     result = self.forward(*input, **kwargs)
2022-06-15T15:37:42.5500626Z   File "/var/lib/jenkins/workspace/test/onnx/test_pytorch_onnx_onnxruntime.py", line 11516, in forward
2022-06-15T15:37:42.5501059Z     return x.expand(4, 6, 2)
2022-06-15T15:37:42.5501584Z RuntimeError: Tracing operations taking symbolic ints isn't supported
2022-06-15T15:37:42.5502158Z �[33m=============================== warnings summary ===============================�[0m
2022-06-15T15:37:42.5502827Z ../.local/lib/python3.7/site-packages/torchvision/transforms/functional_pil.py:207
2022-06-15T15:37:42.5503638Z ../.local/lib/python3.7/site-packages/torchvision/transforms/functional_pil.py:207
2022-06-15T15:37:42.5504420Z ../.local/lib/python3.7/site-packages/torchvision/transforms/functional_pil.py:207
2022-06-15T15:37:42.5583354Z ../.local/lib/python3.7/site-packages/torchvision/transforms/functional_pil.py:207
2022-06-15T15:37:42.5584770Z   /var/lib/jenkins/.local/lib/python3.7/site-packages/torchvision/transforms/functional_pil.py:207: DeprecationWarning: BILINEAR is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead.
2022-06-15T15:37:42.5585609Z     def resize(img, size, interpolation=Image.BILINEAR):
2022-06-15T15:37:42.5585859Z 
2022-06-15T15:37:42.5586265Z ../.local/lib/python3.7/site-packages/torchvision/transforms/functional_pil.py:280
2022-06-15T15:37:42.5586822Z ../.local/lib/python3.7/site-packages/torchvision/transforms/functional_pil.py:280

See GitHub Actions build pull / linux-xenial-py3.7-clang7-onnx / test (default, 1, 2, linux.2xlarge) (16/17)

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

2022-06-15T15:48:14.7019566Z RuntimeError: Tracing operations taking symbolic ints isn't supported
2022-06-15T15:48:14.7016285Z   File "/opt/conda/lib/python3.7/site-packages/torch/jit/_trace.py", line 118, in wrapper
2022-06-15T15:48:14.7016702Z     outs.append(self.inner(*trace_inputs))
2022-06-15T15:48:14.7017148Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1131, in _call_impl
2022-06-15T15:48:14.7017431Z     return forward_call(*input, **kwargs)
2022-06-15T15:48:14.7017791Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1119, in _slow_forward
2022-06-15T15:48:14.7018076Z     result = self.forward(*input, **kwargs)
2022-06-15T15:48:14.7018361Z   File "/var/lib/jenkins/workspace/test/onnx/test_operators.py", line 77, in forward
2022-06-15T15:48:14.7018663Z     return self.f(*itertools.chain(args, self.params))
2022-06-15T15:48:14.7018946Z   File "/var/lib/jenkins/workspace/test/onnx/test_operators.py", line 754, in <lambda>
2022-06-15T15:48:14.7019231Z     self.assertONNX(lambda x: x.expand(4, 6, 2), x)
2022-06-15T15:48:14.7019566Z RuntimeError: Tracing operations taking symbolic ints isn't supported
2022-06-15T15:48:14.7019736Z 
2022-06-15T15:48:14.7019741Z 
2022-06-15T15:48:14.7019747Z 
2022-06-15T15:48:14.7019752Z 
2022-06-15T15:48:14.7019918Z [gw1] �[31mFAILED�[0m test/onnx/test_operators.py �[1A
2022-06-15T15:48:14.7401649Z  �[36mtest/onnx/test_operators.py�[0m::TestOperators.test_expand�[0m �[31m⨯�[0m         �[31m16% �[0m�[40m�[32m█�[0m�[40m�[31m▋�[0m�[40m�[31m        �[0m�[1B
2022-06-15T15:48:14.7402001Z 
2022-06-15T15:48:14.7408056Z 
2022-06-15T15:48:14.7408068Z 
2022-06-15T15:48:14.7408552Z [gw1] �[32mPASSED�[0m test/onnx/test_operators.py �[1A

See GitHub Actions build pull / linux-xenial-cuda11.3-py3.7-gcc7 / test (default, 1, 4, linux.4xlarge.nvidia.gpu) (17/17)

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

2022-06-15T18:00:16.2771187Z RuntimeError: distributions/test_distributions failed!
2022-06-15T18:00:15.6363260Z Generated XML report: test-reports/python-unittest/distributions.test_distributions/TEST-TestLazyLogitsInitialization-20220615175909.xml
2022-06-15T18:00:15.6376393Z Generated XML report: test-reports/python-unittest/distributions.test_distributions/TEST-TestNumericalStability-20220615175909.xml
2022-06-15T18:00:15.6385477Z Generated XML report: test-reports/python-unittest/distributions.test_distributions/TEST-TestRsample-20220615175909.xml
2022-06-15T18:00:15.6392164Z Generated XML report: test-reports/python-unittest/distributions.test_distributions/TEST-TestValidation-20220615175909.xml
2022-06-15T18:00:15.6445276Z Generated XML report: test-reports/python-unittest/distributions.test_distributions/TEST-TestJit-20220615175909.xml
2022-06-15T18:00:16.2763907Z Traceback (most recent call last):
2022-06-15T18:00:16.2764282Z   File "test/run_test.py", line 946, in <module>
2022-06-15T18:00:16.2767445Z     main()
2022-06-15T18:00:16.2767850Z   File "test/run_test.py", line 924, in main
2022-06-15T18:00:16.2770800Z     raise RuntimeError(err_message)
2022-06-15T18:00:16.2771187Z RuntimeError: distributions/test_distributions failed!
2022-06-15T18:00:16.8881064Z + cleanup
2022-06-15T18:00:16.8881380Z + retcode=1
2022-06-15T18:00:16.8881626Z + set +x
2022-06-15T18:00:16.8932327Z ##[error]Process completed with exit code 1.
2022-06-15T18:00:16.8970748Z Prepare all required actions
2022-06-15T18:00:16.8971183Z Getting action download info
2022-06-15T18:00:17.3968525Z ##[group]Run ./.github/actions/get-workflow-job-id
2022-06-15T18:00:17.3968834Z with:
2022-06-15T18:00:17.3969240Z   github-token: ***
2022-06-15T18:00:17.3969490Z env:

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.

@ezyang ezyang requested a review from Krovatkin June 15, 2022 14:39
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jun 15, 2022
@ezyang
Copy link
Copy Markdown
Contributor Author

ezyang commented Jun 15, 2022

Here is the diff from Nick's OG PR:

diff --git a/test/test_dynamic_shapes.py b/test/test_dynamic_shapes.py
index 48758714196..73084486f42 100644
--- a/test/test_dynamic_shapes.py
+++ b/test/test_dynamic_shapes.py
@@ -2,6 +2,8 @@
 # Owner(s): ["oncall: jit"]
 
 from torch._C import _disabled_torch_function_impl
+import torch.fx
+import torch.nn.functional as F
 from torch.testing._internal.common_utils import run_tests, TestCase
 import unittest
 import torch
@@ -290,6 +292,18 @@ class TestPySymInt(TestCase):
         self.assertTrue(str(expand_x.sym_size(1)), str(x.sym_size(0)))
         self.assertTrue(str(expand_x.sym_size(1)), str(result.sym_size(0)))
 
+    def test_fx_trace_intlist(self):
+        class CustomModule(torch.nn.Module):
+            def forward(self, x):
+                bs, c, h, w = x.shape
+                return F.pad(x, (0, w % 2, 0, h % 2, 0, 0))
+
+        m = CustomModule()
+        x = torch.rand(1, 3, 4, 4)
+        # should not TypeError: pad(): argument 'pad' (position 2) must be
+        # tuple of ints, not tuple
+        torch.fx.symbolic_trace(m)
+
 
 if __name__ == '__main__':
     run_tests()
diff --git a/tools/autograd/gen_python_functions.py b/tools/autograd/gen_python_functions.py
index 9774be74d60..2336b235491 100644
--- a/tools/autograd/gen_python_functions.py
+++ b/tools/autograd/gen_python_functions.py
@@ -1113,6 +1113,8 @@ def group_overloads(
 def sort_overloads(
     grouped_overloads: Sequence[PythonSignatureGroup],
 ) -> Sequence[PythonSignatureGroup]:
+    # NB: Smaller here means lower priority
+
     def is_arg_smaller(t1: Type, t2: Type) -> bool:
         return (
             str(t1) == "Scalar"
@@ -1131,6 +1133,10 @@ def sort_overloads(
             # last in signature ordering. See discussion: https://github.com/pytorch/pytorch/issues/58087
             str(t1) == "Tensor[]"
             and str(t2).find("[]") != -1
+            or
+            # Prioritize SymIntArrayRef overload over IntArrayRef
+            str(t1) == "int[]"
+            and str(t2) == "SymInt[]"
         )
 
     def is_smaller(s1: PythonSignature, s2: PythonSignature) -> bool:
diff --git a/torch/csrc/utils/python_arg_parser.cpp b/torch/csrc/utils/python_arg_parser.cpp
index b0d0dc57ba1..9853758691c 100644
--- a/torch/csrc/utils/python_arg_parser.cpp
+++ b/torch/csrc/utils/python_arg_parser.cpp
@@ -647,28 +647,17 @@ bool is_float_or_complex_list(PyObject* obj) {
   return true;
 }
 
-static bool all_ints_in_tuple(PyObject* obj) {
-  for (auto i : c10::irange(PySequence_Size(obj))) {
-    auto item = py::reinterpret_steal<py::object>(PySequence_GetItem(obj, i));
-    if (!THPUtils_checkIndex(item.ptr())) {
-      return false;
-    }
-  }
-
-  return true;
-}
-
 static bool is_int_list(PyObject* obj, int broadcast_size) {
   if (PyTuple_Check(obj) || PyList_Check(obj)) {
     if (PySequence_Size(obj) == 0) {
       return true;
     }
 
-    if (all_ints_in_tuple(obj)) {
+    auto item = py::reinterpret_steal<py::object>(PySequence_GetItem(obj, 0));
+    if (THPUtils_checkIndex(item.ptr())) {
       return true;
     }
 
-    auto item = py::reinterpret_steal<py::object>(PySequence_GetItem(obj, 0));
     // NOTE: JIT tracer allows arbitrary scalar tensors to act as ints
     // in an intlist argument. Even float or complex scalar tensors.
     return (
@@ -1298,9 +1287,7 @@ bool FunctionSignature::parse(
       // should avoid having complex signatures that make use of it...
     } else if (
         allow_varargs_intlist && arg_pos == 0 && !is_kwd &&
-        ((param.type_ == ParameterType::SYM_INT_LIST &&
-          is_int_or_symint(obj)) ||
-         all_ints_in_tuple(args))) {
+          is_int_or_symint(obj)) {
       // take all positional arguments as this parameter
       // e.g. permute(1, 2, 3) -> permute((1, 2, 3))
       dst[i++] = args;

Copy link
Copy Markdown
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

Stamping.

ezyang added a commit that referenced this pull request Jun 15, 2022
This reverts commit b8db0a0.

ghstack-source-id: 602ffd6
Pull Request resolved: #79608
Comment on lines +295 to +305
def test_fx_trace_intlist(self):
class CustomModule(torch.nn.Module):
def forward(self, x):
bs, c, h, w = x.shape
return F.pad(x, (0, w % 2, 0, h % 2, 0, 0))

m = CustomModule()
x = torch.rand(1, 3, 4, 4)
# should not TypeError: pad(): argument 'pad' (position 2) must be
# tuple of ints, not tuple
torch.fx.symbolic_trace(m)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Technically, we do not need to create a custom module to repro the issue, just a function:

def foo(x):
    bs, c, h, w = x.shape
    return F.pad(x, (0, w % 2, 0, h % 2, 0, 0))

torch.fx.symbolic_trace(foo)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed, or at least remove the unused x variable.

Krovatkin pushed a commit to Krovatkin/pytorch that referenced this pull request Jun 15, 2022
This reverts commit b8db0a0.

ghstack-source-id: 602ffd6
Pull Request resolved: pytorch#79608
wconstab pushed a commit that referenced this pull request Jun 17, 2022
This reverts commit b8db0a0.

ghstack-source-id: 602ffd6
Pull Request resolved: #79608
@ezyang ezyang closed this Jun 27, 2022
@facebook-github-bot facebook-github-bot deleted the gh/ezyang/1222/head branch July 28, 2022 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants