Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions backends/qualcomm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,11 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
${CMAKE_CURRENT_BINARY_DIR}/pybind11
)
add_library(PyQnnManagerAdaptor MODULE)
add_library(PyQnnWrapperAdaptor MODULE)
# PyQnnManager containing a pybind type triggers the warning because pybind11
# code internally forces hidden visibility.
set_target_properties(
PyQnnManagerAdaptor PROPERTIES CXX_VISIBILITY_PRESET hidden
)
set_target_properties(
PyQnnWrapperAdaptor PROPERTIES CXX_VISIBILITY_PRESET hidden
)

target_link_libraries(
PyQnnManagerAdaptor
Expand All @@ -287,18 +283,14 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
executorch
extension_tensor
qnn_backend_options
)
target_link_libraries(
PyQnnWrapperAdaptor PRIVATE pybind11::module pybind11::lto wrappers
qnn_executorch_logging qnn_executorch_header
wrappers
qnn_executorch_logging
)

pybind11_extension(PyQnnManagerAdaptor)
pybind11_extension(PyQnnWrapperAdaptor)
if(NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES RelWithDebInfo)
# Strip unnecessary sections of the binary
pybind11_strip(PyQnnManagerAdaptor)
pybind11_strip(PyQnnWrapperAdaptor)
endif()

if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
Expand All @@ -309,9 +301,6 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
target_compile_options(
PyQnnManagerAdaptor PUBLIC ${_pybind_compile_options}
)
target_compile_options(
PyQnnWrapperAdaptor PUBLIC ${_pybind_compile_options}
)
endif()

add_subdirectory(
Expand All @@ -320,7 +309,7 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
)

install(
TARGETS PyQnnManagerAdaptor PyQnnWrapperAdaptor
TARGETS PyQnnManagerAdaptor
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}/executorch/backends/qualcomm/python
RUNTIME
Expand Down
6 changes: 0 additions & 6 deletions backends/qualcomm/aot/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ target_sources(
PyQnnManagerAdaptor PUBLIC ${CMAKE_CURRENT_LIST_DIR}/PyQnnManagerAdaptor.cpp
${CMAKE_CURRENT_LIST_DIR}/PyQnnManagerAdaptor.h
)

# PyQnnWrapperAdaptor
target_sources(
PyQnnWrapperAdaptor PUBLIC ${CMAKE_CURRENT_LIST_DIR}/PyQnnWrapperAdaptor.cpp
${CMAKE_CURRENT_LIST_DIR}/PyQnnWrapperAdaptor.h
)
Loading