Skip to content

Introduction to TinyML on Arm using PyTorch and ExecuTorch: Failed to generate .pte file #2307

@avptin

Description

@avptin

Hi!

I am following https://learn.arm.com/learning-paths/embedded-and-microcontrollers/introduction-to-tinyml-on-arm/ on Ubuntu 24.04 WSL and getting the following error on the .pte file generation stage:

python -m examples.arm.aot_arm_compiler --model_name=examples/arm/simple_nn.py \
--delegate --quantize --target=ethos-u85-256 \
--so_library=cmake-out-aot-lib/kernels/quantized/libquantized_ops_aot_lib.so \
--system_config=Ethos_U85_SYS_DRAM_Mid --memory_mode=Sram_Only

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/peutin/executorch/examples/arm/aot_arm_compiler.py", line 819, in <module>
    args = get_args()
           ^^^^^^^^^^
  File "/home/user/executorch/examples/arm/aot_arm_compiler.py", line 624, in get_args
    torch.ops.load_library(args.so_library)
  File "/home/user/executorch-venv/lib/python3.12/site-packages/torch/_ops.py", line 1490, in load_library
    raise OSError(f"Could not load this library: {path}") from e
OSError: Could not load this library: /home/user/executorch/cmake-out-aot-lib/kernels/quantized/libquantized_ops_aot_lib.so

The entire "cmake-out-aot-lib" directory is missing.

The libquantized_ops_aot_lib.so library is being generated to a different location, but the operations fails too:

python -m examples.arm.aot_arm_compiler --model_name=examples/arm/simple_nn.py --delegate --quantize --target=ethos-u85-256 --so_library=pip-out/lib.linux-x86_64-cpython-312/executorch/kernels/quantized/libquantized_ops_aot_lib.so --system_config=Ethos_U85_SYS_DRAM_Mid --memory_mode=Sram_Only
[operator_registry.cpp:89] Re-registering quantized_decomposed::add.out, from NOT_SUPPORTED
[operator_registry.cpp:90] key: (null), is_fallback: true
[operator_registry.cpp:111] In function register_kernels(), assert failed (false): Kernel registration failed with error 22, see error log for details.
Aborted (core dumped)

executorch_full_log.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions