이 튜토리얼을 이용해서 파이토치 모델을 C++로 변환하는 중입니다만
cmake를 이용하는 과정에서
cmake -DCMAKE_PREFIX_PATH=/path/to/libtorch … 명령어를 입력할 때
TorchConfig.cmake torch-config.cmake를 찾을 수 없다는 에러가 계속 반복됩니다
깃허브나 스택오버플로의 글을 읽어봐도 완전히 에러가 해결된 해법은 찾지 못하고 있습니다.
아래는 로그입니다
– Building for: Visual Studio 17 2022
– Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
– The C compiler identification is MSVC 19.32.31329.0
– The CXX compiler identification is MSVC 19.32.31329.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (find_package):
By not providing “FindTorch.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “Torch”, but
CMake did not find one.
Could not find a package configuration file provided by “Torch” with any of
the following names:
TorchConfig.cmake
torch-config.cmake
Add the installation prefix of “Torch” to CMAKE_PREFIX_PATH or set
“Torch_DIR” to a directory containing one of the above files. If “Torch”
provides a separate development package or SDK, be sure it has been
installed.
– Configuring incomplete, errors occurred!
See also “C:/Users/com/source/repos/luda1/luda1/CMakeFiles/CMakeOutput.log”.
libtorch의 파일을 찾지 못하는듯한데, 해결방법이 있을까요 ??