-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key error in index_propagation when looking up dynamic shape vr #127677
Comments
this error comes from an internal model so I'm working on getting a minimal repro |
|
@lezcano this is a perfect example of "people allocating symbols willy nilly and not keeping track of what their value ranges" are. A bandaid solution that would definitely work is if we make |
This one's a bit odd. You shouldn't get an |
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
I see this, should q0 be replaced by s0 in this case?
|
That is unrelated. The point is that the symbol |
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
…nge (pytorch#127681) Summary: Issue: pytorch#127677 Test Plan: ci --- Differential Revision: D58048558
This happens when you have something like: a = ops.indirect_indexing(...)
b = ops.index_expr(a, ...)
c = ops.indirect_indexing(b, ...) This is a bit weird but is valid IR so we should handle it gracefully |
And yeah it would be good if we could use the bound of |
#127681) Purpose of this PR is to get around this error: #127677 Differential Revision: D58048558 Pull Request resolved: #127681 Approved by: https://github.com/lezcano
pytorch#127681) Purpose of this PR is to get around this error: pytorch#127677 Differential Revision: D58048558 Pull Request resolved: pytorch#127681 Approved by: https://github.com/lezcano
Compiling this encoder #121637 with nightly I got: W0606 13:31:53.266000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] q0 is not in var_ranges, defaulting to unknown range.
W0606 13:31:53.267000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] q1 is not in var_ranges, defaulting to unknown range.
W0606 13:31:53.277000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] q0 is not in var_ranges, defaulting to unknown range.
W0606 13:31:53.277000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] q1 is not in var_ranges, defaulting to unknown range.
W0606 13:31:53.610000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] z0 is not in var_ranges, defaulting to unknown range.
W0606 13:31:53.610000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] z1 is not in var_ranges, defaulting to unknown range.
W0606 13:31:53.620000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] z0 is not in var_ranges, defaulting to unknown range.
W0606 13:31:53.620000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] z1 is not in var_ranges, defaulting to unknown range.
W0606 13:31:54.979000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] q0 is not in var_ranges, defaulting to unknown range.
W0606 13:31:55.114000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] z0 is not in var_ranges, defaulting to unknown range.
W0606 13:31:57.485000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] q0 is not in var_ranges, defaulting to unknown range.
W0606 13:31:57.617000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] z0 is not in var_ranges, defaulting to unknown range.
W0606 13:31:59.574000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] q0 is not in var_ranges, defaulting to unknown range.
W0606 13:31:59.709000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] z0 is not in var_ranges, defaulting to unknown range.
W0606 13:32:06.453000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] y1 is not in var_ranges, defaulting to unknown range.
W0606 13:32:06.454000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] y0 is not in var_ranges, defaulting to unknown range.
W0606 13:32:06.464000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] y1 is not in var_ranges, defaulting to unknown range.
W0606 13:32:06.464000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] y0 is not in var_ranges, defaulting to unknown range.
W0606 13:32:07.437000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] x0 is not in var_ranges, defaulting to unknown range.
W0606 13:32:08.775000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] x0 is not in var_ranges, defaulting to unknown range.
W0606 13:32:10.533000 136005565806400 torch/fx/experimental/symbolic_shapes.py:4417] [0/0] x0 is not in var_ranges, defaulting to unknown range. |
Yeah, this being a warning is too chatty, we should reduce the verbosity |
was able to minimal repro this, will share smth soon |
Also compiling that mentioned SwinB encoder with the last nightly it is going to take forever. I was waiting form more then 30/40 minutes and the compilation never end but it is still going to continuously print these W0608 10:19:56.462000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] q1 is not in var_ranges, defaulting to unknown range.
W0608 10:19:56.463000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:19:57.250000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:19:57.251000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] z1 is not in var_ranges, defaulting to unknown range.
W0608 10:20:00.017000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:00.388000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:02.362000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:02.638000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:02.891000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:03.145000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:04.216000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:04.562000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:06.352000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:06.641000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:06.858000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:07.080000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:12.044000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] ps2 is not in var_ranges, defaulting to unknown range.
W0608 10:20:14.859000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:20:14.859000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x2 is not in var_ranges, defaulting to unknown range.
W0608 10:20:15.997000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] ps9 is not in var_ranges, defaulting to unknown range.
W0608 10:20:21.599000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:22.175000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] ps11 is not in var_ranges, defaulting to unknown range.
W0608 10:20:22.176000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:22.680000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:24.548000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:24.871000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:25.147000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:25.335000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:27.103000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] ps11 is not in var_ranges, defaulting to unknown range.
W0608 10:20:27.103000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:27.550000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] ps11 is not in var_ranges, defaulting to unknown range.
W0608 10:20:27.550000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:20:30.250000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:20:31.050000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:20:31.051000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] ps11 is not in var_ranges, defaulting to unknown range.
W0608 10:20:31.564000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:20:33.395000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:20:33.628000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:20:33.843000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:20:34.354000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:20:37.129000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:20:37.130000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] ps11 is not in var_ranges, defaulting to unknown range.
W0608 10:20:37.495000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:20:37.496000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/0] ps11 is not in var_ranges, defaulting to unknown range.
V0608 10:21:56.286000 137538496919360 torch/_dynamo/guards.py:2610] [5/1] [__recompiles] Recompiling function forward in /workspace/networks/encoders/swin/swin_transformer.py:425
V0608 10:21:56.286000 137538496919360 torch/_dynamo/guards.py:2610] [5/1] [__recompiles] triggered by the following guard failure(s):
V0608 10:21:56.286000 137538496919360 torch/_dynamo/guards.py:2610] [5/1] [__recompiles] - Eq(IntTrueDiv(L['H'], L['self'].window_size), 38.8571428571429) # _dynamo/output_graph.py:451 in init_ambient_guards
V0608 10:21:58.570000 137538496919360 torch/_dynamo/guards.py:2610] [6/1] [__recompiles] Recompiling function torch_dynamo_resume_in_forward_at_433 in /workspace/networks/encoders/swin/swin_transformer.py:433
V0608 10:21:58.570000 137538496919360 torch/_dynamo/guards.py:2610] [6/1] [__recompiles] triggered by the following guard failure(s):
V0608 10:21:58.570000 137538496919360 torch/_dynamo/guards.py:2610] [6/1] [__recompiles] - Eq(IntTrueDiv(L['W'], L['self'].window_size), 38.8571428571429) # _dynamo/output_graph.py:451 in init_ambient_guards
V0608 10:21:58.746000 137538496919360 torch/_dynamo/guards.py:2610] [7/1] [__recompiles] Recompiling function torch_dynamo_resume_in_forward_at_434 in /workspace/networks/encoders/swin/swin_transformer.py:434
V0608 10:21:58.746000 137538496919360 torch/_dynamo/guards.py:2610] [7/1] [__recompiles] triggered by the following guard failure(s):
V0608 10:21:58.746000 137538496919360 torch/_dynamo/guards.py:2610] [7/1] [__recompiles] - tensor 'L['x']' dtype mismatch. expected Float, actual Half
W0608 10:25:12.267000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] q1 is not in var_ranges, defaulting to unknown range.
W0608 10:25:12.267000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:13.055000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:13.055000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] z1 is not in var_ranges, defaulting to unknown range.
W0608 10:25:15.955000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:16.348000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:18.323000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:18.626000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:18.887000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:19.153000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] q0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:20.253000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:20.597000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:22.368000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:22.635000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:22.854000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:23.088000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] z0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:28.195000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] ps2 is not in var_ranges, defaulting to unknown range.
W0608 10:25:30.976000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:25:30.976000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x2 is not in var_ranges, defaulting to unknown range.
W0608 10:25:31.979000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] ps9 is not in var_ranges, defaulting to unknown range.
W0608 10:25:37.977000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:38.572000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] ps11 is not in var_ranges, defaulting to unknown range.
W0608 10:25:38.573000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:39.106000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:41.024000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:41.367000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:41.601000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:41.793000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:43.550000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] ps11 is not in var_ranges, defaulting to unknown range.
W0608 10:25:43.550000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:43.988000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] ps11 is not in var_ranges, defaulting to unknown range.
W0608 10:25:43.989000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x0 is not in var_ranges, defaulting to unknown range.
W0608 10:25:46.799000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:25:47.611000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:25:47.611000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] ps11 is not in var_ranges, defaulting to unknown range.
W0608 10:25:48.141000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:25:50.047000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:25:50.294000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:25:50.510000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:25:50.703000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:25:53.414000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:25:53.414000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] ps11 is not in var_ranges, defaulting to unknown range.
W0608 10:25:53.771000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] x1 is not in var_ranges, defaulting to unknown range.
W0608 10:25:53.771000 137538496919360 torch/fx/experimental/symbolic_shapes.py:4451] [7/1] ps11 is not in var_ranges, defaulting to unknown range.
V0608 10:27:12.925000 137538496919360 torch/_dynamo/guards.py:2610] [5/2] [__recompiles] Recompiling function forward in /workspace/networks/encoders/swin/swin_transformer.py:425
V0608 10:27:12.925000 137538496919360 torch/_dynamo/guards.py:2610] [5/2] [__recompiles] triggered by the following guard failure(s):
V0608 10:27:12.925000 137538496919360 torch/_dynamo/guards.py:2610] [5/2] [__recompiles] - Eq(IntTrueDiv(L['H'], L['self'].window_size), 19.4285714285714) # _dynamo/output_graph.py:451 in init_ambient_guards
V0608 10:27:12.925000 137538496919360 torch/_dynamo/guards.py:2610] [5/2] [__recompiles] - Eq(IntTrueDiv(L['H'], L['self'].window_size), 38.8571428571429) # _dynamo/output_graph.py:451 in init_ambient_guards
V0608 10:27:15.318000 137538496919360 torch/_dynamo/guards.py:2610] [6/2] [__recompiles] Recompiling function torch_dynamo_resume_in_forward_at_433 in /workspace/networks/encoders/swin/swin_transformer.py:433
V0608 10:27:15.318000 137538496919360 torch/_dynamo/guards.py:2610] [6/2] [__recompiles] triggered by the following guard failure(s):
V0608 10:27:15.318000 137538496919360 torch/_dynamo/guards.py:2610] [6/2] [__recompiles] - Eq(IntTrueDiv(L['W'], L['self'].window_size), 19.4285714285714) # _dynamo/output_graph.py:451 in init_ambient_guards
V0608 10:27:15.318000 137538496919360 torch/_dynamo/guards.py:2610] [6/2] [__recompiles] - Eq(IntTrueDiv(L['W'], L['self'].window_size), 38.8571428571429) # _dynamo/output_graph.py:451 in init_ambient_guards
V0608 10:27:15.399000 137538496919360 torch/_dynamo/guards.py:2610] [7/2] [__recompiles] Recompiling function torch_dynamo_resume_in_forward_at_434 in /workspace/networks/encoders/swin/swin_transformer.py:434
V0608 10:27:15.399000 137538496919360 torch/_dynamo/guards.py:2610] [7/2] [__recompiles] triggered by the following guard failure(s):
V0608 10:27:15.399000 137538496919360 torch/_dynamo/guards.py:2610] [7/2] [__recompiles] - tensor 'L['x']' stride mismatch at index 1. expected 256, actual 512
V0608 10:27:15.399000 137538496919360 torch/_dynamo/guards.py:2610] [7/2] [__recompiles] - tensor 'L['x']' dtype mismatch. expected Float, actual Half |
…pagation" Tries to fix #127677. # Context Just as peterbell10 pointed out, we have the following scenario: ``` a = ops.indirect_indexing(...) b = ops.index_expr(a, ...) c = ops.indirect_indexing(b, ...) ``` We can repro this as: ``` def forward(self, arg0_1, arg1_1, arg2_1): iota = torch.ops.prims.iota.default(arg0_1, start = 0, step = 1, index=0), repeat_interleave = torch.ops.aten.repeat_interleave.Tensor(arg1_1); index = torch.ops.aten.index.Tensor(iota, [repeat_interleave]); index_1 = torch.ops.aten.index.Tensor(arg2_1, [index]); return (index_1,) ``` which should generate a JIT py file like this: ``` def triton_poi_fused_index_select_0(in_ptr0, in_ptr1, out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): ... tmp0 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last') tmp1 = ks0 tmp2 = tmp0 + tmp1 tmp3 = tmp0 < 0 tmp4 = tl.where(tmp3, tmp2, tmp0) # check_bounds() tl.device_assert(((0 <= tmp4) & (tmp4 < ks0)) | ~(xmask), "index out of bounds: 0 <= tmp4 < ks0") def call(): arg0_1, arg1_1, arg2_1 = args buf1 = aten.repeat_interleave.Tensor(arg1_1) buf4 = empty_strided_cuda((u0, 64), (64, 1)) triton_poi_fused_index_select_0.run( buf1, arg2_1, buf4, s0, triton_poi_fused_index_select_0_xnumel, grid=grid(triton_poi_fused_index_select_0_xnumel), stream=stream0) ``` # Issue In our `IndexPropagation.indirect_indexing()` call we have `expr=indirect0` which is spawned in `LoopBodyBlock.indirect_indexing()`. https://github.com/pytorch/pytorch/blob/3b555ba47713d489975a9bb6cb6c31975f805e3f/torch/_inductor/ir.py#L8154-L8160 When we try to see if we can prove its bounds, we fail because `indirect0` isn't in `var_ranges`. # Approach We can probably skip the check to prove `indirect0`'s bounds because its purpose is to add a bounds check as a device side assert. Thankfully, we already do this in the codegen pass. https://github.com/pytorch/pytorch/blob/3b555ba47713d489975a9bb6cb6c31975f805e3f/torch/_inductor/codegen/common.py#L1730-L1733 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 amjames desertfire chauhang [ghstack-poisoned]
…pagation" Tries to fix #127677. # Context Just as peterbell10 pointed out, we have the following scenario: ``` a = ops.indirect_indexing(...) b = ops.index_expr(a, ...) c = ops.indirect_indexing(b, ...) ``` We can repro this as: ``` def forward(self, arg0_1, arg1_1, arg2_1): iota = torch.ops.prims.iota.default(arg0_1, start = 0, step = 1, index=0), repeat_interleave = torch.ops.aten.repeat_interleave.Tensor(arg1_1); index = torch.ops.aten.index.Tensor(iota, [repeat_interleave]); index_1 = torch.ops.aten.index.Tensor(arg2_1, [index]); return (index_1,) ``` which should generate a JIT py file like this: ``` def triton_poi_fused_index_select_0(in_ptr0, in_ptr1, out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): ... tmp0 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last') tmp1 = ks0 tmp2 = tmp0 + tmp1 tmp3 = tmp0 < 0 tmp4 = tl.where(tmp3, tmp2, tmp0) # check_bounds() tl.device_assert(((0 <= tmp4) & (tmp4 < ks0)) | ~(xmask), "index out of bounds: 0 <= tmp4 < ks0") def call(): arg0_1, arg1_1, arg2_1 = args buf1 = aten.repeat_interleave.Tensor(arg1_1) buf4 = empty_strided_cuda((u0, 64), (64, 1)) triton_poi_fused_index_select_0.run( buf1, arg2_1, buf4, s0, triton_poi_fused_index_select_0_xnumel, grid=grid(triton_poi_fused_index_select_0_xnumel), stream=stream0) ``` # Issue In our `IndexPropagation.indirect_indexing()` call we have `expr=indirect0` which is spawned in `LoopBodyBlock.indirect_indexing()`. https://github.com/pytorch/pytorch/blob/3b555ba47713d489975a9bb6cb6c31975f805e3f/torch/_inductor/ir.py#L8154-L8160 When we try to see if we can prove its bounds, we fail because `indirect0` isn't in `var_ranges`. # Approach Add `indirectX symbols with a default range (-inf, +inf) to `self.var_to_range` to avoid a lookup error with `indirectX`. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 amjames desertfire chauhang [ghstack-poisoned]
…pagation" Tries to fix #127677. # Context Just as peterbell10 pointed out, we have the following scenario: ``` a = ops.indirect_indexing(...) b = ops.index_expr(a, ...) c = ops.indirect_indexing(b, ...) ``` We can repro this as: ``` def forward(self, arg0_1, arg1_1, arg2_1): iota = torch.ops.prims.iota.default(arg0_1, start = 0, step = 1, index=0), repeat_interleave = torch.ops.aten.repeat_interleave.Tensor(arg1_1); index = torch.ops.aten.index.Tensor(iota, [repeat_interleave]); index_1 = torch.ops.aten.index.Tensor(arg2_1, [index]); return (index_1,) ``` which should generate a JIT py file like this: ``` def triton_poi_fused_index_select_0(in_ptr0, in_ptr1, out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): ... tmp0 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last') tmp1 = ks0 tmp2 = tmp0 + tmp1 tmp3 = tmp0 < 0 tmp4 = tl.where(tmp3, tmp2, tmp0) # check_bounds() tl.device_assert(((0 <= tmp4) & (tmp4 < ks0)) | ~(xmask), "index out of bounds: 0 <= tmp4 < ks0") def call(): arg0_1, arg1_1, arg2_1 = args buf1 = aten.repeat_interleave.Tensor(arg1_1) buf4 = empty_strided_cuda((u0, 64), (64, 1)) triton_poi_fused_index_select_0.run( buf1, arg2_1, buf4, s0, triton_poi_fused_index_select_0_xnumel, grid=grid(triton_poi_fused_index_select_0_xnumel), stream=stream0) ``` # Issue In our `IndexPropagation.indirect_indexing()` call we have `expr=indirect0` which is spawned in `LoopBodyBlock.indirect_indexing()`. https://github.com/pytorch/pytorch/blob/3b555ba47713d489975a9bb6cb6c31975f805e3f/torch/_inductor/ir.py#L8154-L8160 When we try to see if we can prove its bounds, we fail because `indirect0` isn't in `var_ranges`. # Approach Add `indirectX symbols with a default range (-inf, +inf) to `self.var_to_range` to avoid a lookup error with `indirectX`. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 amjames desertfire chauhang [ghstack-poisoned]
…pagation" Tries to fix #127677. # Context Just as peterbell10 pointed out, we have the following scenario: ``` a = ops.indirect_indexing(...) b = ops.index_expr(a, ...) c = ops.indirect_indexing(b, ...) ``` We can repro this as: ``` def forward(self, arg0_1, arg1_1, arg2_1): iota = torch.ops.prims.iota.default(arg0_1, start = 0, step = 1, index=0), repeat_interleave = torch.ops.aten.repeat_interleave.Tensor(arg1_1); index = torch.ops.aten.index.Tensor(iota, [repeat_interleave]); index_1 = torch.ops.aten.index.Tensor(arg2_1, [index]); return (index_1,) ``` which should generate a JIT py file like this: ``` def triton_poi_fused_index_select_0(in_ptr0, in_ptr1, out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): ... tmp0 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last') tmp1 = ks0 tmp2 = tmp0 + tmp1 tmp3 = tmp0 < 0 tmp4 = tl.where(tmp3, tmp2, tmp0) # check_bounds() tl.device_assert(((0 <= tmp4) & (tmp4 < ks0)) | ~(xmask), "index out of bounds: 0 <= tmp4 < ks0") def call(): arg0_1, arg1_1, arg2_1 = args buf1 = aten.repeat_interleave.Tensor(arg1_1) buf4 = empty_strided_cuda((u0, 64), (64, 1)) triton_poi_fused_index_select_0.run( buf1, arg2_1, buf4, s0, triton_poi_fused_index_select_0_xnumel, grid=grid(triton_poi_fused_index_select_0_xnumel), stream=stream0) ``` # Issue In our `IndexPropagation.indirect_indexing()` call we have `expr=indirect0` which is spawned in `LoopBodyBlock.indirect_indexing()`. https://github.com/pytorch/pytorch/blob/3b555ba47713d489975a9bb6cb6c31975f805e3f/torch/_inductor/ir.py#L8154-L8160 When we try to see if we can prove its bounds, we fail because `indirect0` isn't in `var_ranges`. # Approach When creating `indirect` symbols from fallback, specify its range to be `[-size, size -1]` to avoid a lookup error with `indirectX`. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 amjames desertfire chauhang [ghstack-poisoned]
…pagation" Tries to fix #127677. # Context Just as peterbell10 pointed out, we have the following scenario: ``` a = ops.indirect_indexing(...) b = ops.index_expr(a, ...) c = ops.indirect_indexing(b, ...) ``` We can repro this as: ``` def forward(self, arg0_1, arg1_1, arg2_1): iota = torch.ops.prims.iota.default(arg0_1, start = 0, step = 1, index=0), repeat_interleave = torch.ops.aten.repeat_interleave.Tensor(arg1_1); index = torch.ops.aten.index.Tensor(iota, [repeat_interleave]); index_1 = torch.ops.aten.index.Tensor(arg2_1, [index]); return (index_1,) ``` which should generate a JIT py file like this: ``` def triton_poi_fused_index_select_0(in_ptr0, in_ptr1, out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): ... tmp0 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last') tmp1 = ks0 tmp2 = tmp0 + tmp1 tmp3 = tmp0 < 0 tmp4 = tl.where(tmp3, tmp2, tmp0) # check_bounds() tl.device_assert(((0 <= tmp4) & (tmp4 < ks0)) | ~(xmask), "index out of bounds: 0 <= tmp4 < ks0") def call(): arg0_1, arg1_1, arg2_1 = args buf1 = aten.repeat_interleave.Tensor(arg1_1) buf4 = empty_strided_cuda((u0, 64), (64, 1)) triton_poi_fused_index_select_0.run( buf1, arg2_1, buf4, s0, triton_poi_fused_index_select_0_xnumel, grid=grid(triton_poi_fused_index_select_0_xnumel), stream=stream0) ``` # Issue In our `IndexPropagation.indirect_indexing()` call we have `expr=indirect0` which is spawned in `LoopBodyBlock.indirect_indexing()`. https://github.com/pytorch/pytorch/blob/3b555ba47713d489975a9bb6cb6c31975f805e3f/torch/_inductor/ir.py#L8154-L8160 When we try to see if we can prove its bounds, we fail because `indirect0` isn't in `var_ranges`. # Approach When creating `indirect` symbols from fallback, specify its range to be `[-size, size -1]` to avoid a lookup error with `indirectX`. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 amjames desertfire chauhang [ghstack-poisoned]
…se for index_propagation" Tries to fix #127677. # Context Just as peterbell10 pointed out, we have the following scenario: ``` a = ops.indirect_indexing(...) b = ops.index_expr(a, ...) c = ops.indirect_indexing(b, ...) ``` We can repro this as: ``` def forward(self, arg0_1, arg1_1, arg2_1): iota = torch.ops.prims.iota.default(arg0_1, start = 0, step = 1, index=0), repeat_interleave = torch.ops.aten.repeat_interleave.Tensor(arg1_1); index = torch.ops.aten.index.Tensor(iota, [repeat_interleave]); index_1 = torch.ops.aten.index.Tensor(arg2_1, [index]); return (index_1,) ``` which should generate a JIT py file like this: ``` def triton_poi_fused_index_select_0(in_ptr0, in_ptr1, out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): ... tmp0 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last') tmp1 = ks0 tmp2 = tmp0 + tmp1 tmp3 = tmp0 < 0 tmp4 = tl.where(tmp3, tmp2, tmp0) # check_bounds() tl.device_assert(((0 <= tmp4) & (tmp4 < ks0)) | ~(xmask), "index out of bounds: 0 <= tmp4 < ks0") def call(): arg0_1, arg1_1, arg2_1 = args buf1 = aten.repeat_interleave.Tensor(arg1_1) buf4 = empty_strided_cuda((u0, 64), (64, 1)) triton_poi_fused_index_select_0.run( buf1, arg2_1, buf4, s0, triton_poi_fused_index_select_0_xnumel, grid=grid(triton_poi_fused_index_select_0_xnumel), stream=stream0) ``` # Issue In our `IndexPropagation.indirect_indexing()` call we have `expr=indirect0` which is spawned in `LoopBodyBlock.indirect_indexing()`. https://github.com/pytorch/pytorch/blob/3b555ba47713d489975a9bb6cb6c31975f805e3f/torch/_inductor/ir.py#L8154-L8160 When we try to see if we can prove its bounds, we fail because `indirect0` isn't in `var_ranges`. # Approach When creating `indirect` symbols from fallback, specify its range to be `[-size, size -1]` to avoid a lookup error with `indirectX`. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 amjames desertfire chauhang [ghstack-poisoned]
…pagation" Tries to fix #127677. # Context Just as peterbell10 pointed out, we have the following scenario: ``` a = ops.indirect_indexing(...) b = ops.index_expr(a, ...) c = ops.indirect_indexing(b, ...) ``` We can repro this as: ``` def forward(self, arg0_1, arg1_1, arg2_1): iota = torch.ops.prims.iota.default(arg0_1, start = 0, step = 1, index=0), repeat_interleave = torch.ops.aten.repeat_interleave.Tensor(arg1_1); index = torch.ops.aten.index.Tensor(iota, [repeat_interleave]); index_1 = torch.ops.aten.index.Tensor(arg2_1, [index]); return (index_1,) ``` which should generate a JIT py file like this: ``` def triton_poi_fused_index_select_0(in_ptr0, in_ptr1, out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): ... tmp0 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last') tmp1 = ks0 tmp2 = tmp0 + tmp1 tmp3 = tmp0 < 0 tmp4 = tl.where(tmp3, tmp2, tmp0) # check_bounds() tl.device_assert(((0 <= tmp4) & (tmp4 < ks0)) | ~(xmask), "index out of bounds: 0 <= tmp4 < ks0") def call(): arg0_1, arg1_1, arg2_1 = args buf1 = aten.repeat_interleave.Tensor(arg1_1) buf4 = empty_strided_cuda((u0, 64), (64, 1)) triton_poi_fused_index_select_0.run( buf1, arg2_1, buf4, s0, triton_poi_fused_index_select_0_xnumel, grid=grid(triton_poi_fused_index_select_0_xnumel), stream=stream0) ``` # Issue In our `IndexPropagation.indirect_indexing()` call we have `expr=indirect0` which is spawned in `LoopBodyBlock.indirect_indexing()`. https://github.com/pytorch/pytorch/blob/3b555ba47713d489975a9bb6cb6c31975f805e3f/torch/_inductor/ir.py#L8154-L8160 When we try to see if we can prove its bounds, we fail because `indirect0` isn't in `var_ranges`. # Approach When creating `indirect` symbols from fallback, specify its range to be `[-size, size -1]` to avoid a lookup error with `indirectX`. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 amjames desertfire chauhang [ghstack-poisoned]
…ytorch#128378) Tries to fix pytorch#127677. # Context Just as @peterbell10 pointed out, we have the following scenario: ``` a = ops.indirect_indexing(...) b = ops.index_expr(a, ...) c = ops.indirect_indexing(b, ...) ``` We can repro this as: ``` def forward(self, arg0_1, arg1_1, arg2_1): iota = torch.ops.prims.iota.default(arg0_1, start = 0, step = 1, index=0), repeat_interleave = torch.ops.aten.repeat_interleave.Tensor(arg1_1); index = torch.ops.aten.index.Tensor(iota, [repeat_interleave]); index_1 = torch.ops.aten.index.Tensor(arg2_1, [index]); return (index_1,) ``` which should generate a JIT py file like this: ``` def triton_poi_fused_index_select_0(in_ptr0, in_ptr1, out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): ... tmp0 = tl.load(in_ptr0 + (x1), xmask, eviction_policy='evict_last') tmp1 = ks0 tmp2 = tmp0 + tmp1 tmp3 = tmp0 < 0 tmp4 = tl.where(tmp3, tmp2, tmp0) # check_bounds() tl.device_assert(((0 <= tmp4) & (tmp4 < ks0)) | ~(xmask), "index out of bounds: 0 <= tmp4 < ks0") def call(): arg0_1, arg1_1, arg2_1 = args buf1 = aten.repeat_interleave.Tensor(arg1_1) buf4 = empty_strided_cuda((u0, 64), (64, 1)) triton_poi_fused_index_select_0.run( buf1, arg2_1, buf4, s0, triton_poi_fused_index_select_0_xnumel, grid=grid(triton_poi_fused_index_select_0_xnumel), stream=stream0) ``` # Issue In our `IndexPropagation.indirect_indexing()` call we have `expr=indirect0` which is spawned in `LoopBodyBlock.indirect_indexing()`. https://github.com/pytorch/pytorch/blob/3b555ba47713d489975a9bb6cb6c31975f805e3f/torch/_inductor/ir.py#L8154-L8160 When we try to see if we can prove its bounds, we fail because `indirect0` isn't in `var_ranges`. # Approach When creating `indirect` symbols from fallback, specify its range to be `[-size, size -1]` to avoid a lookup error with `indirectX`. Pull Request resolved: pytorch#128378 Approved by: https://github.com/lezcano, https://github.com/peterbell10
🐛 Describe the bug
No response
Error logs
Minified repro
No response
Versions
n/a
cc @ezyang @msaroufim @bdhirsh @anijain2305 @chauhang
The text was updated successfully, but these errors were encountered: