Repository navigation
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/128045
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit b9c857c with merge base 81df076 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. [ghstack-poisoned]
|
test added |
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command |
|
I landed #128052 which adds new tests for this, so lets rebase to make sure no test failures |
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: inductor-periodic / cuda12.4-py3.10-gcc9-sm86 / test (inductor_torchbench, 2, 2, linux.g5.4xlarge.nvidia.gpu) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 4 jobs have failed, first few of them are: inductor / cuda12.1-py3.10-gcc9-sm86 / test (inductor_torchbench, 2, 2, linux.g5.4xlarge.nvidia.gpu), inductor / cuda12.1-py3.10-gcc9-sm86 / test (dynamic_inductor_torchbench, 1, 2, linux.g5.4xlarge.nvidia.gpu), inductor / cuda12.1-py3.10-gcc9-sm86 / test (dynamic_inductor_torchbench, 2, 2, linux.g5.4xlarge.nvidia.gpu), inductor / cuda12.1-py3.10-gcc9-sm86 / test (aot_inductor_torchbench, 2, 2, linux.g5.4xlarge.nvidia.gpu) Details for Dev Infra teamRaised by workflow job |
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
…sors" Some context: (1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache (2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args ([here](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L676)) (3) afterward, dynamo will [remove](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1274) any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol ([code](https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/output_graph.py#L1588)) (4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
This fixes an issue between dynamic shape + subclasses and inductor caching. Some context:
(1) inductor relies on an invariant today that all free symbols will show up as GraphArgs, when inductor generates guard expressions in the inductor cache
(2) dynamo fulfills this invariant: it does so by finding GraphArgs that have dynamic dims, and adding their symbols as extra graph args (here)
(3) afterward, dynamo will remove any graphargs from the graph that it sees are unused. However, it will explicitly make sure not to remove a graph arg if it sees that is corresponds to a free symbol (code)
(4) However, our code for computing "free symbols" was wrong: we loop through all graphargs and find their free symbols, but we weren't properly accounting for free symbols that live on the inner tensors of any tensor subclass graph args.
Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames @rec