File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed
Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 33#
44# Finds the Torch IPEX library
55#
6- # This will define the following variables:
6+ # This will define the following variables. The last 3 are appended to the
7+ # TORCH counterpart variables respectively.
78#
89# IPEX_FOUND -- True if the system has the Torch IPEX library
910# IPEX_INCLUDE_DIRS -- The include directories for torch
1718
1819include (FindPackageHandleStandardArgs)
1920
21+ FIND_PACKAGE (Torch REQUIRED)
22+
2023if (DEFINED ENV{IPEX_INSTALL_PREFIX})
2124 set (IPEX_INSTALL_PREFIX $ENV{IPEX_INSTALL_PREFIX} )
2225else ()
@@ -28,17 +31,20 @@ endif()
2831# Include directories.
2932if (EXISTS "${IPEX_INSTALL_PREFIX} /include" )
3033 set (IPEX_INCLUDE_DIRS ${IPEX_INSTALL_PREFIX} /include )
34+ list (APPEND TORCH_INCLUDE_DIRS ${IPEX_INCLUDE_DIRS} )
3135endif ()
3236
3337# Library dependencies.
3438if (@BUILD_WITH_CPU@)
3539 find_library (IPEX_CPU_CORE_LIBRARY intel-ext -pt-cpu PATHS "${IPEX_INSTALL_PREFIX} /lib" )
3640 set (IPEX_LIBRARIES ${IPEX_CPU_CORE_LIBRARY} )
41+ list (APPEND TORCH_LIBRARIES ${IPEX_CPU_CORE_LIBRARY} )
3742endif ()
3843
3944if (@BUILD_WITH_XPU@)
4045 find_library (IPEX_GPU_CORE_LIBRARY intel-ext -pt-gpu PATHS "${IPEX_INSTALL_PREFIX} /lib" )
4146 list (APPEND IPEX_LIBRARIES ${IPEX_GPU_CORE_LIBRARY} )
47+ list (APPEND TORCH_LIBRARIES ${IPEX_GPU_CORE_LIBRARY} )
4248endif ()
4349
4450find_package_handle_standard_args(IPEX DEFAULT_MSG IPEX_LIBRARIES IPEX_INCLUDE_DIRS)
Original file line number Diff line number Diff line change @@ -118,6 +118,20 @@ elif [[ ${COMMAND} == "uninstall" ]]; then
118118 fi
119119 done
120120
121+ if [ -f ${LIBTORCH_PATH} /lib/libintel-ext-pt-cpu.so ]; then
122+ rm -rf ${LIBTORCH_PATH} /lib/libintel-ext-pt-cpu.so
123+ fi
124+ if [ -f ${LIBTORCH_PATH} /lib/libintel-ext-pt-gpu.so ]; then
125+ rm -rf ${LIBTORCH_PATH} /lib/libintel-ext-pt-gpu.so
126+ fi
127+
128+ if [ -f ${LIBTORCH_PATH} /include/ipex.h ]; then
129+ rm -rf ${LIBTORCH_PATH} /include/ipex.h
130+ fi
131+ if [ -d ${LIBTORCH_PATH} /include/xpu ]; then
132+ rm -rf ${LIBTORCH_PATH} /include/xpu
133+ fi
134+
121135 if [ -d ${LIBTORCH_PATH} /share/cmake/IPEX ]; then
122136 rm -rf ${LIBTORCH_PATH} /share/cmake/IPEX
123137 fi
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ set(LIBIPEX_COMP_LIST)
1414include (CMakePackageConfigHelpers)
1515# CMake config file for the external project.
1616configure_package_config_file(
17- ${IPEX_ROOT_DIR} /cmake/IPEXConfig.cmake.in
17+ ${IPEX_ROOT_DIR} /cmake/cppsdk/ IPEXConfig.cmake.in
1818 ${PROJECT_BINARY_DIR} /IPEXConfig.cmake
1919 INSTALL_DESTINATION share/cmake/IPEX)
2020
@@ -71,9 +71,9 @@ if(BUILD_MODULE_TYPE STREQUAL "CPPSDK")
7171
7272 include (CPack)
7373
74- set (INSTALL_SCRIPT "libintel-ext-pt-${CMAKE_PROJECT_VERSION} .installer.sh " )
74+ set (INSTALL_SCRIPT "libintel-ext-pt-${CMAKE_PROJECT_VERSION} .run " )
7575 if (GLIBCXX_USE_CXX11_ABI)
76- set (INSTALL_SCRIPT "libintel-ext-pt-cxx11-abi-${CMAKE_PROJECT_VERSION} .installer.sh " )
76+ set (INSTALL_SCRIPT "libintel-ext-pt-cxx11-abi-${CMAKE_PROJECT_VERSION} .run " )
7777 endif ()
7878 configure_package_config_file(
7979 ${IPEX_ROOT_DIR} /cmake/cppsdk/libintel-ext -pt.installer.sh.in
You can’t perform that action at this time.
0 commit comments