Skip to content

Commit 35adcc0

Browse files
committed
define macro in header so not limited to cmake build
1 parent 4638ef3 commit 35adcc0

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

backends/qualcomm/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,6 @@ target_link_libraries(
248248
extension_tensor qnn_backend_options
249249
)
250250

251-
# Add CTX_BIN_ALIGNMENT here so all backend files has access to this macro.
252-
add_compile_definitions(QNN_CTX_BIN_ALIGNMENT=256)
253251
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES Hexagon)
254252
# Add macro here so we can dlopen the correct .so library.
255253
if(DSP_TYPE STREQUAL "3")

backends/qualcomm/runtime/backends/QnnCustomProtocol.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
#include <tuple>
1919
#include <vector>
2020

21+
#define QNN_CTX_BIN_ALIGNMENT 256
22+
2123
namespace executorch {
2224
namespace backends {
2325
namespace qnn {

backends/qualcomm/runtime/backends/direct_mode/QnnExecuTorchIdlWrapper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "HAP_farf.h"
1111

12+
#include <executorch/backends/qualcomm/runtime/backends/QnnCustomProtocol.h>
1213
#include <executorch/devtools/etdump/etdump_flatcc.h>
1314
#include <executorch/extension/data_loader/file_data_loader.h>
1415
#include <executorch/runtime/core/memory_allocator.h>

0 commit comments

Comments
 (0)