Skip to content

Qualcomm AI Engine Direct - heap profiling at runtime on target#19716

Open
jethroqti wants to merge 1 commit into
pytorch:mainfrom
CodeLinaro:dev1/memory/profiling_rt
Open

Qualcomm AI Engine Direct - heap profiling at runtime on target#19716
jethroqti wants to merge 1 commit into
pytorch:mainfrom
CodeLinaro:dev1/memory/profiling_rt

Conversation

@jethroqti
Copy link
Copy Markdown
Contributor

Qualcomm AI Engine Direct - heap profiling at runtime on target

Summary:
Heap profiling at runtime with HTP backend on Android platforms. DSP
heap profiling is available for QnnContext_createFromBinary use-cases.
It captures total DSP heap usage at two checkpoints:
- Before the first context is created (before_context_created)
- After the last context is freed (after_context_freed)

The difference between the two values represents heap consumed during
context execution. The value after freeing is typically equal to or
greater than before creation.

Test plan:
python backends/qualcomm/tests/test_qnn_delegate.py
TestQNNQuantizedUtils.test_qnn_backend_runtime_option_heap_profile -b
build-android -H ${HOST} -s ${SN} -m ${SOC_MODEL}

Note:
This test is expected to run on target device.

    Summary:
    Heap profiling at runtime with HTP backend on Android platforms. DSP
    heap profiling is available for QnnContext_createFromBinary use-cases.
    It captures total DSP heap usage at two checkpoints:
    - Before the first context is created (before_context_created)
    - After the last context is freed (after_context_freed)

    The difference between the two values represents heap consumed during
    context execution. The value after freeing is typically equal to or
    greater than before creation.

    Test plan:
    python backends/qualcomm/tests/test_qnn_delegate.py
    TestQNNQuantizedUtils.test_qnn_backend_runtime_option_heap_profile -b
    build-android -H ${HOST} -s ${SN} -m ${SOC_MODEL}

    Note:
    This test is expected to run on target device.
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 21, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19716

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit eff7a0f with merge base 64684c7 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 21, 2026
@jethroqti
Copy link
Copy Markdown
Contributor Author

@pytorchbot label "release notes: qualcomm"

@pytorch-bot pytorch-bot Bot added the release notes: qualcomm Changes to the Qualcomm backend delegate label May 21, 2026
@jethroqti
Copy link
Copy Markdown
Contributor Author

@psiddh
Already added protection, based on #19224, when test on x86 machine. Please take a look.
Sorry for your inconvenience.

@shewu-quic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: qualcomm Changes to the Qualcomm backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant