Files
pytorch/torch/csrc/PyInterpreterHooks.cpp
Yuanyuan Chen 36871622f1 [2/N] Mark unused parameters in C++ code (#165121)
This is follow-up of #164912 to mark unused C++ parameters to improve code readability.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/165121
Approved by: https://github.com/Skylion007
2025-10-15 03:04:39 +00:00

22 lines
672 B
C++

#include <torch/csrc/PyInterpreter.h>
#include <torch/csrc/PyInterpreterHooks.h>
namespace torch::detail {
PyInterpreterHooks::PyInterpreterHooks(
c10::impl::PyInterpreterHooksArgs /*unused*/) {}
c10::impl::PyInterpreter* PyInterpreterHooks::getPyInterpreter() const {
// Delegate to the existing implementation
return ::getPyInterpreter();
}
} // namespace torch::detail
// Sigh, the registry doesn't support namespaces :(
using c10::impl::PyInterpreterHooksRegistry;
using c10::impl::RegistererPyInterpreterHooksRegistry;
using PyInterpreterHooks = torch::detail::PyInterpreterHooks;
// Register the implementation
REGISTER_PYTHON_HOOKS(PyInterpreterHooks)