Skip to content

Docs for Qualcomm scripts use outdated (removed) CLI flags#21880

Description

@mcollinswisc

馃摎 The doc issue

Summary

The "Deploying and running on device" section of the Qualcomm AI Engine Backend tutorial tells readers to compile DeepLabV3 with -b build-android -m SM8550.
https://docs.pytorch.org/executorch/stable/backends-qualcomm.html#aot-compile-a-model
Those short options were removed on 2026-06-16 by PR #19660. The tutorial was never updated, so some of the documented commands now fail at argument parsing.

This reproduces on v1.4.0 and on current HEAD of main.

What the docs say

Tutorial, AOT compile step:

cd $EXECUTORCH_ROOT

python -m examples.qualcomm.scripts.deeplab_v3 -b build-android -m SM8550 --compile_only --download

The on-device step further down has the same problem with -s and -t:

  • The model is merely executed. If we want to feed real inputs and get model outputs, we can use
    ```bash
    cd $EXECUTORCH_ROOT
    # android
    python -m examples.qualcomm.scripts.deeplab_v3 -b build-android -m SM8550 --download -s <device_serial>
    # (optional) linux embedded
    python -m examples.qualcomm.scripts.deeplab_v3 -b build-oe-linux -m SXR1230P --download -s <device_serial> -t aarch64-oe-linux-gcc-9.3
    ```

Line 292 needs a second fix beyond the flags: aarch64-oe-linux-gcc-9.3 is not a valid --target
value either. The choices are aarch64-android, aarch64-oe-linux-gcc9.3, and
aarch64-oe-linux-gcc11.2, so the extra hyphen is wrong in long form too:

  • parser.add_argument(
    "--target",
    help="Target platform for deployment",
    choices=[
    "aarch64-android",
    "aarch64-oe-linux-gcc9.3",
    "aarch64-oe-linux-gcc11.2",
    ],
    default="aarch64-android",
    type=str,
    )

What happens when you run it

Running that first command:

$ cd $EXECUTORCH_ROOT
$ python -m examples.qualcomm.scripts.deeplab_v3 -b build-android -m SM8550 --compile_only --download
usage: deeplab_v3.py [-h] [--config_file CONFIG_FILE] [--soc_model SOC_MODEL]
                     [--build_folder BUILD_FOLDER] [--host HOST]
                     [--online_prepare] [--ip IP] [--port PORT]
                     [--skip_delegate_node_ids SKIP_DELEGATE_NODE_IDS]
                     [--skip_delegate_node_ops SKIP_DELEGATE_NODE_OPS]
                     [--compile_only] [--device DEVICE]
                     [--backend {htp,gpu,lpai}] [--shared_buffer]
                     [--skip_push] [--dump_intermediate_outputs]
                     [--profile_level {0,2,3}] [--enable_x86_64] [--ci]
                     [--seed SEED]
                     [--target {aarch64-android,aarch64-oe-linux-gcc9.3,aarch64-oe-linux-gcc11.2}]
                     [--pre_gen_pte PRE_GEN_PTE]
                     [--direct_build_folder DIRECT_BUILD_FOLDER]
                     [--htp_performance_mode {...}]
                     [-a ARTIFACT] [-d]
deeplab_v3.py: error: unrecognized arguments: -b build-android -m SM8550
$ echo $?
2

Suggest a potential alternative/fix

The new correct command would be:

python -m examples.qualcomm.scripts.deeplab_v3 \
    --build_folder build-android --soc_model SM8550 --compile_only --download

(and I ran this one & it succeeds)

The same change affects other documents:

  • docs/source/llm/build-run-llama3-qualcomm-ai-engine-direct-backend.md
    L70,
    L84
  • backends/qualcomm/README.md
    L123
  • backends/qualcomm/debugger/README.md
    L16,
    L262,
    L291-L293
  • examples/qualcomm/custom_op/README.md (4 command blocks)
    L293-L299,
    L304-L309,
    L318-L324,
    L329-L334
  • examples/qualcomm/qaihub_scripts/llama/README.md
    L33,
    L56
  • examples/qualcomm/qaihub_scripts/stable_diffusion/README.md
    L35
  • .claude/skills/qualcomm/SKILL.md
    L80-L86,
    L91
    -- the second is prose listing -m/-b/-s/-H as the flags to use. Note -a there is still
    valid: test_qnn_delegate.py registers its own -r, -a, -i, -p, -n, -e, -d, -F.

cc @cbilgin @psiddh

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: qnnIssues related to Qualcomm's QNN delegate and code under backends/qualcomm/

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions