mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
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
22 lines
672 B
C++
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)
|