CMake Error at /opt/rocm/hip/cmake/FindHIP.cmake:680 (add_library):NO SOURCES given to target: c10_hip
时间: 2023-09-14 20:09:04 浏览: 136
This error occurs when the add_library() function in the FindHIP.cmake file is unable to find any source files for the c10_hip target. The c10_hip target is used to build HIP-enabled libraries for PyTorch.
To fix this error, ensure that the source files for the c10_hip target are included in the appropriate directory and that the CMakeLists.txt file for the project includes the correct paths to these files.
You can also try updating your version of HIP or PyTorch to ensure that all necessary files are present and up-to-date. Additionally, ensure that your build environment is properly configured to support HIP and that all dependencies are installed correctly.
相关问题
CMake Error at /opt/rocm/hip/cmake/FindHIP.cmake:680 (add library):NO SOURCES given to target: c10_hip
This error message indicates that there are no source files provided to the target "c10_hip" in the HIP module of CMake.
To resolve this error, you need to make sure that there are source files available for the target. You can do this by adding the source files to the CMakeLists.txt file using the "add_library" command.
For example, if you have a source file named "my_source.cpp", you can add it to the target as follows:
```
add_library(c10_hip my_source.cpp)
```
Make sure to replace "my_source.cpp" with the name of your actual source file.
Once you have added the source files to the target, you should be able to build your project without encountering this error message.
阅读全文