Skip to content

Commit c886ad2

Browse files
committed
Fix linker issue when building executor_runner
- Remove explicit addition of `-DET_EVENT_TRACER_ENABLED` from backends/qualcomm/CMakeLists.txt as setting the definition without enabling cmake flag `EXECUTORCH_ENABLE_EVENT_TRACER` caused issues when building the executor_runner. - Replace deprecated namespace `torch::executor` with `executorch::etdump` in the executor_runner.cpp. Signed-off-by: Benjamin Klimczak <[email protected]> Change-Id: Iadff38374e661f42e394dc69903548922ca08aea
1 parent 07d1c26 commit c886ad2

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

backends/qualcomm/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright (c) Qualcomm Innovation Center, Inc.
2+
# Copyright 2025 Arm Limited and/or its affiliates.
23
# All rights reserved
34
#
45
# This source code is licensed under the BSD-style license found in the
@@ -199,11 +200,6 @@ target_link_libraries(
199200
#
200201
target_link_options_shared_lib(qnn_executorch_backend)
201202

202-
#
203-
# add compile option
204-
#
205-
target_compile_options(executorch PUBLIC -DET_EVENT_TRACER_ENABLED)
206-
207203
#
208204
# add sources
209205
#

examples/portable/executor_runner/executor_runner.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class EventTraceManager {
6464
public:
6565
EventTraceManager() : event_tracer_ptr_(nullptr) {
6666
#ifdef ET_EVENT_TRACER_ENABLED
67-
event_tracer_ptr_ = std::make_shared<torch::executor::ETDumpGen>();
67+
event_tracer_ptr_ = std::make_shared<executorch::etdump::ETDumpGen>();
6868
#endif // ET_EVENT_TRACER_ENABLED
6969
}
7070

@@ -79,8 +79,8 @@ class EventTraceManager {
7979
}
8080

8181
#ifdef ET_EVENT_TRACER_ENABLED
82-
torch::executor::ETDumpGen* const etdump_ptr =
83-
static_cast<torch::executor::ETDumpGen*>(event_tracer_ptr);
82+
executorch::etdump::ETDumpGen* const etdump_ptr =
83+
static_cast<executorch::etdump::ETDumpGen*>(event_tracer_ptr);
8484

8585
const char* filename = FLAGS_etdump_path.c_str();
8686

@@ -91,7 +91,7 @@ class EventTraceManager {
9191
return Error::AccessFailed;
9292
}
9393

94-
torch::executor::etdump_result result = etdump_ptr->get_etdump_data();
94+
executorch::etdump::ETDumpResult result = etdump_ptr->get_etdump_data();
9595
if (result.buf != nullptr && result.size > 0) {
9696
fwrite((uint8_t*)result.buf, 1, result.size, etdump_file.get());
9797
free(result.buf);

0 commit comments

Comments
 (0)