You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import scikit_test
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libtorch.so: cannot open shared object file: No such file or directory
# Require CMake 3.15+ (matching scikit-build-core) Use new versions of all
# policies up to CMake 3.27
cmake_minimum_required(VERSION 3.15...3.27)
# Scikit-build-core sets these values for you, or you can just hard-code the
# name and version.
project(${SKBUILD_PROJECT_NAME}
VERSION ${SKBUILD_PROJECT_VERSION}
LANGUAGES CXX)
set(PYBIND11_NEWPYTHON ON)
add_subdirectory("extern/pybind11")
# find libtorch
find_package(Torch REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")
file(GLOB SOURCE ${CMAKE_SOURCE_DIR}/src/*.cpp)
set(INCLUDE_DIR "${CMAKE_SOURCE_DIR}/include")
include_directories(${INCLUDE_DIR})
pybind11_add_module(${PROJECT_NAME} ${SOURCE})
target_link_libraries(${PROJECT_NAME} PRIVATE ${TORCH_LIBRARIES})
# This is passing in the version as a define just as an example
target_compile_definitions(${PROJECT_NAME} PRIVATE VERSION_INFO=${PROJECT_VERSION})
# The install directory is the output (wheel) directory
install(TARGETS ${PROJECT_NAME} DESTINATION .)
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: