@@ -395,7 +395,6 @@ At this point, the working directory should contain the following files:
395395
396396If all of these are present, you can now build and run:
397397``` bash
398- ./install_executorch.sh --clean
399398(mkdir cmake-out && cd cmake-out && cmake ..)
400399cmake --build cmake-out -j10
401400./cmake-out/nanogpt_runner
@@ -661,19 +660,15 @@ edge_config = get_xnnpack_edge_compile_config()
661660# Convert to edge dialect and lower to XNNPack.
662661edge_manager = to_edge_transform_and_lower(traced_model, partitioner = [XnnpackPartitioner()], compile_config = edge_config)
663662et_program = edge_manager.to_executorch()
664- ```
665-
666- Finally, ensure that the runner links against the ` xnnpack_backend ` target in CMakeLists.txt.
667663
664+ with open (" nanogpt.pte" , " wb" ) as file :
665+ file .write(et_program.buffer)
668666```
669- add_executable(nanogpt_runner main.cpp)
670- target_link_libraries(
671- nanogpt_runner
672- PRIVATE
673- executorch
674- extension_module_static # Provides the Module class
675- optimized_native_cpu_ops_lib # Provides baseline cross-platform kernels
676- xnnpack_backend) # Provides the XNNPACK CPU acceleration backend
667+
668+ Then run:
669+ ``` bash
670+ python export_nanogpt.py
671+ ./cmake-out/nanogpt_runner
677672```
678673
679674For more information, see [ Quantization in ExecuTorch] ( ../quantization-overview.md ) .
@@ -782,11 +777,14 @@ Run the export script and the ETRecord will be generated as `etrecord.bin`.
782777
783778An ETDump is an artifact generated at runtime containing a trace of the model execution. For more information, see [ the ETDump docs] ( ../etdump.md ) .
784779
785- Include the ETDump header in your code.
780+ Include the ETDump header and namespace in your code.
786781``` cpp
787782// main.cpp
788783
789784#include < executorch/devtools/etdump/etdump_flatcc.h>
785+
786+ using executorch::etdump::ETDumpGen;
787+ using torch::executor::etdump_result;
790788```
791789
792790Create an Instance of the ETDumpGen class and pass it to the Module constructor.
0 commit comments