mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
And prevent new ones from appearing by removing `-Wno-error=extra-semi` (not sure what was thereason behind adding the warning but not erroring on on it when building with -Werror introduced by https://github.com/pytorch/pytorch/pull/140236 ) 300+ violations of that rule were fixed by running `sed -i -e "s/});/})/" /` against `torch/nativert` Other 3p deps that needs updates: - TensorPipe - LLVM - FBGEMM Pull Request resolved: https://github.com/pytorch/pytorch/pull/158730 Approved by: https://github.com/Skylion007
21 lines
656 B
C++
21 lines
656 B
C++
#include <torch/csrc/PyInterpreter.h>
|
|
#include <torch/csrc/PyInterpreterHooks.h>
|
|
|
|
namespace torch::detail {
|
|
|
|
PyInterpreterHooks::PyInterpreterHooks(c10::impl::PyInterpreterHooksArgs) {}
|
|
|
|
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)
|