pytorch
d78274b7 - Automatically guard when SymInt is converted to int (#95479)

Commit
1 year ago
Automatically guard when SymInt is converted to int (#95479) During enablement, we disabled int() conversions because they were any easy way to footgun guards. We have enough of dynamic shapes working now that this is now causing spurious errors; e.g., if you feed a symbolic int to x.size(symint). We now allow for implicit conversions of SymInt to int here, posting a guard. We expect guard provenance to help people debug overspecialization. Fixes https://github.com/pytorch/pytorch/issues/95328 Signed-off-by: Edward Z. Yang <ezyang@meta.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/95479 Approved by: https://github.com/wconstab, https://github.com/voznesenskym, https://github.com/ngimel
Author
Committer
Parents
Loading