Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in the llm executorch profiling example #7677

Open
sheetalarkadam opened this issue Jan 15, 2025 · 1 comment
Open

Error in the llm executorch profiling example #7677

sheetalarkadam opened this issue Jan 15, 2025 · 1 comment
Assignees
Labels
module: devtools Features or issues related to profiling, debugging, bundled program, etc. module: doc Related to our documentation, both in docs/ and docblocks module: llm LLM examples and apps, and the extensions/llm libraries

Comments

@sheetalarkadam
Copy link

📚 The doc issue

I am following the instructions here
I am getting an error in etdump generation

I have made the following changes as mentioned in the blog

//main.cpp
#include <executorch/devtools/etdump/etdump_flatcc.h>
ETDumpGen* etdump_gen = static_cast<ETDumpGen*>(model.event_tracer());

ET_LOG(Info, "ETDump size: %zu blocks", etdump_gen->get_num_blocks());
etdump_result result = etdump_gen->get_etdump_data();
if (result.buf != nullptr && result.size > 0) {
    // On a device with a file system, users can just write it to a file.
    FILE* f = fopen("etdump.etdp", "w+");
    fwrite((uint8_t*)result.buf, 1, result.size, f);
    fclose(f);
    free(result.buf);
}
#CMakeLists.txt

option(EXECUTORCH_ENABLE_EVENT_TRACER "" ON)
option(EXECUTORCH_BUILD_DEVTOOLS "" ON)

target_link_libraries(
  nanogpt_runner
  PRIVATE executorch
          etdump # Provides the EventTracer class
)
target_compile_options(executorch PUBLIC -DET_EVENT_TRACER_ENABLED)
target_compile_options(portable_ops_lib PUBLIC -DET_EVENT_TRACER_ENABLED)

cmake --build cmake-out -j10 errors out with
[100%] Built target portable_kernels gmake[1]: Leaving directory 'et-nanogpt/cmake-out' gmake: *** [Makefile:136: all] Error 2
Line 136 in Makefile is $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all. Doesn't say anything else.

Also, can somebody also explain the line "(Note that this time we build in release mode to get around a flatccrt build limitation.)".

Suggest a potential alternative/fix

No response

@mcr229 mcr229 added module: doc Related to our documentation, both in docs/ and docblocks module: devtools Features or issues related to profiling, debugging, bundled program, etc. module: llm LLM examples and apps, and the extensions/llm libraries labels Jan 15, 2025
@mcr229
Copy link
Contributor

mcr229 commented Jan 15, 2025

@tarun292 @Olivia-liu would either of you be able to take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: devtools Features or issues related to profiling, debugging, bundled program, etc. module: doc Related to our documentation, both in docs/ and docblocks module: llm LLM examples and apps, and the extensions/llm libraries
Projects
None yet
Development

No branches or pull requests

5 participants