We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d21aa7e commit c65bc42Copy full SHA for c65bc42
torch/csrc/dynamo/guards.cpp
@@ -2695,7 +2695,9 @@ class GuardAccessor {
2695
// subtree on immutable dict getitems.
2696
virtual bool check_nopybind(PyObject* obj, bool matches_dict_tag = false) = 0;
2697
virtual bool check_nopybind(FrameLocalsMapping* map, bool matches_dict_tag) {
2698
- throw std::runtime_error("fallback to python");
+ // throw std::runtime_error("fallback to python");
2699
+ // Could fallback to running check on the Python dict (lazily constructed)
2700
+ return check_nopybind((PyObject*)map->to_dict(), matches_dict_tag);
2701
}
2702
virtual GuardDebugInfo check_verbose_nopybind(PyObject* obj) = 0;
2703
virtual std::string repr() const = 0;
0 commit comments