Skip to content

Commit 1c382c5

Browse files
Martin LindströmMartin Lindström
authored andcommitted
Arm backend: Fix compilation errors in executor runner
When building arm_executor_runner.cpp with the two macros ET_EVENT_TRACER_ENABLED and SEMIHOSTING set, compilation errors occur. This patch corrects the code to fix this problem. Change-Id: I14eb0d797f885a08c78328f45297b07d1127b5e6
1 parent e2098f8 commit 1c382c5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/arm/executor_runner/arm_executor_runner.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ using executorch::bundled_program::verify_method_outputs;
9292
#if defined(ET_EVENT_TRACER_ENABLED)
9393
using executorch::etdump::ETDumpGen;
9494
using executorch::etdump::ETDumpResult;
95+
using torch::executor::etdump_result;
9596
#endif
9697
/**
9798
* The method_allocation_pool should be large enough to fit the setup, input
@@ -435,7 +436,7 @@ struct RunnerContext {
435436
Box<ArmMemoryAllocator> temp_allocator;
436437
Box<Result<Method>> method;
437438
#if defined(ET_EVENT_TRACER_ENABLED)
438-
Box<torch::executor::ETDumpGen> etdump_gen;
439+
Box<ETDumpGen> etdump_gen;
439440
#endif
440441
#if defined(SEMIHOSTING)
441442
Box<ArmMemoryAllocator> input_file_allocator;
@@ -783,11 +784,11 @@ void write_etdump(RunnerContext& ctx) {
783784
#else
784785
// Dump the etdump data containing profiling/debugging data to the specified
785786
// file.
786-
etdump_result result = etdump_gen.get_etdump_data();
787+
etdump_result result = ctx.etdump_gen->get_etdump_data();
787788
if (result.buf != nullptr && result.size > 0) {
788789
// On a device with a file system we can just write it out
789790
// to the file-system.
790-
char etdump_filename = "etdump.bin";
791+
const char* etdump_filename = "etdump.bin";
791792
ET_LOG(Info, "Writing etdump to file: %s", etdump_filename);
792793
FILE* f = fopen(etdump_filename, "w+");
793794
fwrite((uint8_t*)result.buf, 1, result.size, f);

0 commit comments

Comments
 (0)