File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -660,19 +660,15 @@ edge_config = get_xnnpack_edge_compile_config()
660660# Convert to edge dialect and lower to XNNPack.
661661edge_manager = to_edge_transform_and_lower(traced_model, partitioner = [XnnpackPartitioner()], compile_config = edge_config)
662662et_program = edge_manager.to_executorch()
663- ```
664-
665- Finally, ensure that the runner links against the ` xnnpack_backend ` target in CMakeLists.txt.
666663
664+ with open (" nanogpt.pte" , " wb" ) as file :
665+ file .write(et_program.buffer)
667666```
668- add_executable(nanogpt_runner main.cpp)
669- target_link_libraries(
670- nanogpt_runner
671- PRIVATE
672- executorch
673- extension_module_static # Provides the Module class
674- optimized_native_cpu_ops_lib # Provides baseline cross-platform kernels
675- xnnpack_backend) # Provides the XNNPACK CPU acceleration backend
667+
668+ Then run:
669+ ``` bash
670+ python export_nanogpt.py
671+ ./cmake-out/nanogpt_runner
676672```
677673
678674For more information, see [ Quantization in ExecuTorch] ( ../quantization-overview.md ) .
You can’t perform that action at this time.
0 commit comments