mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[dynamo][guards] Fail on an unknown framelocals to dict conversion (#162695)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/162695 Approved by: https://github.com/williamwen42 ghstack dependencies: #162694
This commit is contained in:
parent
a3a40cb741
commit
a8432bcaad
|
|
@ -2648,9 +2648,7 @@ class GuardAccessor {
|
|||
// subtree on immutable dict getitems.
|
||||
virtual bool check_nopybind(PyObject* obj, bool matches_dict_tag = false) = 0;
|
||||
virtual bool check_nopybind(FrameLocalsMapping* map, bool matches_dict_tag) {
|
||||
// throw std::runtime_error("fallback to python");
|
||||
// Could fallback to running check on the Python dict (lazily constructed)
|
||||
return check_nopybind((PyObject*)map->to_dict(), matches_dict_tag);
|
||||
throw std::runtime_error("fallback to python");
|
||||
}
|
||||
virtual GuardDebugInfo check_verbose_nopybind(PyObject* obj) = 0;
|
||||
virtual std::string repr() const = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user