Source compiler installation pytorch debug version

  1. The official website instructions to install

    pytorch Installation Guide: https://github.com/pytorch/pytorch

    conda install the corresponding package: https://anaconda.org/anaconda/ (source site can search the package)

  2. If export cmake_path manner as official website provides unsuccessful, the recommended route cmake added in ~ / .bashrc

    eg:export CMAKE_PREFIX_PATH="/home/jzc/miniconda3/bin:$CMAKE_PREFIX_PATH"

  3. If development mode, build build and install python setup.py build develop

  4. If you want to compile debug mode, use Debug = 1 python setup.py install

    In this way will most likely not change the original settings, compile time or release. If this happens, please forced to set debug environment variables, adding os.environ in pytorch / tools / setup_helpers / env.py in [ 'DEBUG'] = '1'

  5. NO_CUDA = 1 python setup.py install using this method to set the environment variable, time may cause the compiler does not recognize a good set environment variables

    Therefore, the insurance point method is to set the environment variable in CMakelist.txt in.

  6. Compile time, can not find -lxxxx not find the corresponding library may occur.

    If you find the library in the lib anaconda in, but gcc / gxx not search, then enter the installation directory gcc / gxx of (x86_64-linux-gnu /) to establish a soft link, the link existing library file to the directory under

    https://blog.csdn.net/qq_39436605/article/details/80893885

Guess you like

Origin www.cnblogs.com/jzcbest1016/p/12481977.html