Repository: pytorch
Issue: error: cast from 'PyObject *(*)(THPCppFunction *, void *)' (aka '_object *(*)(torch::autograd::THPCppFunction *, void *)') to 'getter' (aka '_object *(*)(_object *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
Labels: module: build,triaged

### 🐛 Describe the bug

Build fails:
```
/usr/ports/misc/pytorch/work/pytorch-v2.1.2/torch/csrc/autograd/generated/python_functions_2.cpp:56:27: error: cast from 'PyObject *(*)(THPCppFunction *, void *)' (aka '_object *(*)(torch::autograd::THPCppFunction *, void *)') to 'getter' (aka '_object *(*)(_object *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  {(char*)"_saved_alpha", (getter)THPAddBackward0_alpha_getter, nullptr, nullptr, nullptr},
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/pytorch/work/pytorch-v2.1.2/torch/csrc/autograd/generated/python_functions_2.cpp:123:29: error: cast from 'PyObject *(*)(THPCppFunction *, void *)' (aka '_object *(*)(torch::autograd::THPCppFunction *, void *)') to 'getter' (aka '_object *(*)(_object *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  {(char*)"_saved_tensor1", (getter)THPAddcdivBackward0_tensor1_getter, nullptr, nullptr, nullptr},
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/pytorch/work/pytorch-v2.1.2/torch/csrc/autograd/generated/python_functions_2.cpp:124:33: error: cast from 'PyObject *(*)(THPCppFunction *, void *)' (aka '_object *(*)(torch::autograd::THPCppFunction *, void *)') to 'getter' (aka '_object *(*)(_object *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  {(char*)"_raw_saved_tensor1", (getter)THPAddcdivBackward0_tensor1_raw_getter, nullptr, nullptr, nullptr},
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/pytorch/work/pytorch-v2.1.2/torch/csrc/autograd/generated/python_functions_2.cpp:125:29: error: cast from 'PyObject *(*)(THPCppFunction *, void *)' (aka '_object *(*)(torch::autograd::THPCppFunction *, void *)') to 'getter' (aka '_object *(*)(_object *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  {(char*)"_saved_tensor2", (getter)THPAddcdivBackward0_tensor2_getter, nullptr, nullptr, nullptr},
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/pytorch/work/pytorch-v2.1.2/torch/csrc/autograd/generated/python_functions_2.cpp:126:33: error: cast from 'PyObject *(*)(THPCppFunction *, void *)' (aka '_object *(*)(torch::autograd::THPCppFunction *, void *)') to 'getter' (aka '_object *(*)(_object *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  {(char*)"_raw_saved_tensor2", (getter)THPAddcdivBackward0_tensor2_raw_getter, nullptr, nullptr, nullptr},
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/pytorch/work/pytorch-v2.1.2/torch/csrc/autograd/generated/python_functions_2.cpp:127:27: error: cast from 'PyObject *(*)(THPCppFunction *, void *)' (aka '_object *(*)(torch::autograd::THPCppFunction *, void *)') to 'getter' (aka '_object *(*)(_object *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  {(char*)"_saved_value", (getter)THPAddcdivBackward0_value_getter, nullptr, nullptr, nullptr},
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/pytorch/work/pytorch-v2.1.2/torch/csrc/autograd/generated/python_functions_2.cpp:148:26: error: cast from 'PyObject *(*)(THPCppFunction *, void *)' (aka '_object *(*)(torch::autograd::THPCppFunction *, void *)') to 'getter' (aka '_object *(*)(_object *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  {(char*)"_saved_self", (getter)THPAngleBackward0_self_getter, nullptr, nullptr, nullptr},
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/pytorch/work/pytorch-v2.1.2/torch/csrc/autograd/generated/python_functions_2.cpp:149:30: error: cast from 'PyObject *(*)(THPCppFunction *, void *)' (aka '_object *(*)(torch::autograd::THPCppFunction *, void *)') to 'getter' (aka '_object *(*)(_object *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  {(char*)"_raw_saved_self", (getter)THPAngleBackward0_self_raw_getter, nullptr, nullptr, nullptr},
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/pytorch/work/pytorch-v2.1.2/torch/csrc/autograd/generated/python_functions_2.cpp:178:26: error: cast from 'PyObject *(*)(THPCppFunction *, void *)' (aka '_object *(*)(torch::autograd::THPCppFunction *, void *)') to 'getter' (aka '_object *(*)(_object *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  {(char*)"_saved_self", (getter)THPAsinhBackward0_self_getter, nullptr, nullptr, nullptr},
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/pytorch/work/pytorch-v2.1.2/torch/csrc/autograd/generated/python_functions_2.cpp:179:30: error: cast from 'PyObject *(*)(THPCppFunction *, void *)' (aka '_object *(*)(torch::autograd::THPCppFunction *, void *)') to 'getter' (aka '_object *(*)(_object *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  {(char*)"_raw_saved_self", (getter)THPAsinhBackward0_self_raw_getter, nullptr, nullptr, nullptr},
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/pytorch/work/pytorch-v2.1.2/torch/csrc/autograd/generated/python_functions_2.cpp:242:26: error: cast from 'PyObject *(*)(THPCppFunction *, void *)' (aka '_object *(*)(torch::autograd::THPCppFunction *, void *)') to 'getter' (aka '_object *(*)(_object *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  {(char*)"_saved_size", (getter)THPAsStridedBackward1_size_getter, nullptr, nullptr, nullptr},
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

### Versions

PyTorch: 2.1.2

clang-16
FreeBSD 14.0

cc @malfet @seemethere