benchmark
1808fbca - ignore mark_dynamic() in export (#2451)

Commit
1 year ago
ignore mark_dynamic() in export (#2451) Summary: Pull Request resolved: https://github.com/pytorch/benchmark/pull/2451 Previously we were accomodating `torch._dynamo.mark_dynamic()` for export's dynamic shapes. Here we clean things up and ignore it, requiring users to specify an export input for `dynamic_shapes`. Note: there's 4 decorators relevant to export, `mark_dynamic, maybe_mark_dynamic, mark_static, mark_unbacked`. User calls that involve export have only been `mark_dynamic()`, and we use `maybe_mark_dynamic` under the hood for `Dim.AUTO`, but we could start using others. One reason I decided to not warn and just silently ignore is these decorators cause the tensors to carry dynamic info, and it'll be hard to tell whether the markers are from export or user calls when re-exporting with the same inputs. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang rec X-link: https://github.com/pytorch/pytorch/pull/135536 Reviewed By: desertfire, avikchaudhuri Differential Revision: D62404528 Pulled By: pianpwk fbshipit-source-id: 1da81cbc71c337b40cc336dfdb93292210ab66aa
Author
Parents
Loading