cmake
pytorch build 과정
Build에서 Generator란?
https://stackoverflow.com/questions/25941536/what-is-a-cmake-generator
cmake generator가 ninja로 설정되어 있는데 generator used previously: visual studio 16 2019로 되어 있어 생기는 에러
binary directory
either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
원인
cmake generator - ninja 와 VS19 간의 충돌
set USE_NINJA=OFF로 충돌 방지
두번째 문제 발생
When you specify `CMAKE_GENERATOR_TOOLSET_VERSION`, you must also activate the vs environment of this version. Please read the notes in the build steps carefully.
-> ninja 사용만 꺼놓으면 되는 줄 알았는데, ninja가 default cmake generator로 설정되어 있는지 이런 에러가 떴다.
결과
build from source에서의 문제점이였는데, conda install을 사용하니 그냥 바로 pytorch와 cuda가 compatible해졌다.
언젠가는 직접 소스코드를 build뿐만 아니라 배포해야할 상황이 올 수도 있으니 차근차근 개념을 잡아놓자.