When trying to setup by source build I see errors like:
**/Users/davidradley/pytorch/torch/csrc/autograd/generated/python_functions_4.cpp:264:24:** **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_LU", (getter)THPLinalgSlogdetBackward0_LU_getter, nullptr, nullptr, nullptr},
I am am using the brew llvm and have it first in my path; does anyone know what these sorts of errors indicate. Does it mean that the compiler I am using is mismatching the source code in terms of support for this cast? Or mismatching libraries?
My environment is
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: macOS 13.4.1 (arm64)
GCC version: Could not collect
Clang version: 16.0.6
CMake version: version 3.26.4
Libc version: N/A
Python version: 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:41:52) [Clang 15.0.7 ] (64-bit runtime)
Python platform: macOS-13.4.1-arm64-arm-64bit
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
CPU:
Apple M1 Max
Versions of relevant libraries:
[pip3] flake8==6.0.0
[pip3] flake8-bugbear==23.3.23
[pip3] flake8-comprehensions==3.12.0
[pip3] flake8-executable==2.1.3
[pip3] flake8-logging-format==0.9.0
[pip3] flake8-pyi==23.3.1
[pip3] flake8-simplify==0.19.3
[pip3] mypy==0.960
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.25.2
[pip3] torch==2.1.0a0+gitf353d17
[pip3] torchgen==0.0.1
[conda] numpy 1.25.2 pypi_0 pypi
[conda] torch 2.1.0a0+gitf353d17 pypi_0 pypi
[conda] torchgen 0.0.1 pypi_0 pypi
I cleaned out conda and cleaned out and did not use the llvm environment and the dev setup has now gone through cleanly with llvm. It is working for me now with gcc.