pytorch
717d8c62 - [BE] Fix pybind deprecation warnings (#72376)

Commit
3 years ago
[BE] Fix pybind deprecation warnings (#72376) Summary: Fixes: ``` ../torch/csrc/autograd/python_variable.cpp:1798:33: warning: ‘bool pybind11::handle::operator==(const pybind11::handle&) const’ is deprecated: Use obj1.is(obj2) instead [-Wdeprecated-declarations] TORCH_CHECK(out == py::none(), "Expected __torch_dispatch__ for ", op.operator_name(), ``` and ``` ../torch/csrc/jit/python/python_list.cpp:254:57: warning: ‘pybind11::object::object(pybind11::handle, bool)’ is deprecated: Use reinterpret_borrow<object>() or reinterpret_steal<object>() [-Wdeprecated-declarations] py::object(obj, /*is_borrowed*/ true), ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/72376 Reviewed By: albanD Differential Revision: D34021328 Pulled By: malfet fbshipit-source-id: 72906077db9031311c6b0ae4c65eb79df9c514d4 (cherry picked from commit e1877ca268b2a48d27adee9cb13f1616fb2ec487)
Author
Committer
Parents
Loading