Skip to content

Commit 92d84f8

Browse files
committed
Qualcomm AI Engine Direct - Merge the two pybind libraries into a single library
Summary: - Prevent dynamic_cast failures caused by separate typeinfo in each library.
1 parent 1864fb0 commit 92d84f8

File tree

117 files changed

+1530
-1629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+1530
-1629
lines changed

backends/qualcomm/CMakeLists.txt

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,11 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
267267
${CMAKE_CURRENT_BINARY_DIR}/pybind11
268268
)
269269
add_library(PyQnnManagerAdaptor MODULE)
270-
add_library(PyQnnWrapperAdaptor MODULE)
271270
# PyQnnManager containing a pybind type triggers the warning because pybind11
272271
# code internally forces hidden visibility.
273272
set_target_properties(
274273
PyQnnManagerAdaptor PROPERTIES CXX_VISIBILITY_PRESET hidden
275274
)
276-
set_target_properties(
277-
PyQnnWrapperAdaptor PROPERTIES CXX_VISIBILITY_PRESET hidden
278-
)
279275

280276
target_link_libraries(
281277
PyQnnManagerAdaptor
@@ -287,18 +283,14 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
287283
executorch
288284
extension_tensor
289285
qnn_backend_options
290-
)
291-
target_link_libraries(
292-
PyQnnWrapperAdaptor PRIVATE pybind11::module pybind11::lto wrappers
293-
qnn_executorch_logging qnn_executorch_header
286+
wrappers
287+
qnn_executorch_logging
294288
)
295289

296290
pybind11_extension(PyQnnManagerAdaptor)
297-
pybind11_extension(PyQnnWrapperAdaptor)
298291
if(NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES RelWithDebInfo)
299292
# Strip unnecessary sections of the binary
300293
pybind11_strip(PyQnnManagerAdaptor)
301-
pybind11_strip(PyQnnWrapperAdaptor)
302294
endif()
303295

304296
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -309,9 +301,6 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
309301
target_compile_options(
310302
PyQnnManagerAdaptor PUBLIC ${_pybind_compile_options}
311303
)
312-
target_compile_options(
313-
PyQnnWrapperAdaptor PUBLIC ${_pybind_compile_options}
314-
)
315304
endif()
316305

317306
add_subdirectory(
@@ -320,7 +309,7 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
320309
)
321310

322311
install(
323-
TARGETS PyQnnManagerAdaptor PyQnnWrapperAdaptor
312+
TARGETS PyQnnManagerAdaptor
324313
LIBRARY
325314
DESTINATION ${CMAKE_INSTALL_LIBDIR}/executorch/backends/qualcomm/python
326315
RUNTIME

backends/qualcomm/aot/python/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,3 @@ target_sources(
99
PyQnnManagerAdaptor PUBLIC ${CMAKE_CURRENT_LIST_DIR}/PyQnnManagerAdaptor.cpp
1010
${CMAKE_CURRENT_LIST_DIR}/PyQnnManagerAdaptor.h
1111
)
12-
13-
# PyQnnWrapperAdaptor
14-
target_sources(
15-
PyQnnWrapperAdaptor PUBLIC ${CMAKE_CURRENT_LIST_DIR}/PyQnnWrapperAdaptor.cpp
16-
${CMAKE_CURRENT_LIST_DIR}/PyQnnWrapperAdaptor.h
17-
)

0 commit comments

Comments
 (0)