cresset-template / cresset

Template repository to build PyTorch projects from source on any version of PyTorch/CUDA/cuDNN.
MIT License
714 stars 41 forks source link

Remove `CMAKE_PREFIX_PATH`. #157

Closed veritas9872 closed 7 months ago

veritas9872 commented 10 months ago

The problem during the build that caused incompatibility issues turned out to be CMAKE_PREFIX_PATH, which instructs CMake to look in that directory during compilation. This is why the packages in /opt/conda/lib were interfering with the compile, even though only /opt/conda/bin was included. Put /opt/conda/bin to the front of the PATH to ensure that the latest packages are used instead of system packages. Remove or comment out CMAKE_PREFIX_PATH in PyTorch build since it appears to be the cause of many problems.

veritas9872 commented 10 months ago

The issue seems to be with adding /etc/ld.so.conf.d to the linking later on instead of the PATH variable. Removing CMAKE_PREFIX_PATH does not work by itself.