Skip to content

Qualcomm AI Engine Direct - Adding QNN backend support for acos core ATen Op#18743

Merged
abhinaykukkadapu merged 1 commit intopytorch:mainfrom
CodeLinaro:acos
Apr 7, 2026
Merged

Qualcomm AI Engine Direct - Adding QNN backend support for acos core ATen Op#18743
abhinaykukkadapu merged 1 commit intopytorch:mainfrom
CodeLinaro:acos

Conversation

@qti-horodnic
Copy link
Copy Markdown
Contributor

Summary

Adding support for the acos ATen op by a decomposition pass using the identity:
acos(x) = π/2 - asin(x)

Also fixed a small bug in decompose_log_variants caused by calling get_const_node multiple times in a loop with the same attr_name, creating multiple constant nodes redundantly which point to the same buffer. Added a unit test for that scenario as well.

Test plan

python backends/qualcomm/tests/test_qnn_delegate.py -k TestQNNQuantizedOperator.test_qnn_backend_acos --model SM8750 --host aisw-vm15-labsd --device 545ee4aa --build_folder build-android
python backends/qualcomm/tests/test_qnn_delegate.py -k TestQNNFloatingPointOperator.test_qnn_backend_acos --model SM8750 --host aisw-vm15-labsd --device 545ee4aa --build_folder build-android
python backends/qualcomm/tests/test_qnn_delegate.py -k TestQNNFloatingPointOperator.test_qnn_backend_acos_multi_node --model SM8750 --host aisw-vm19-labsd --device b3bf37fe --build_folder build-android
python backends/qualcomm/tests/test_qnn_delegate.py -k TestQNNQuantizedOperator.test_qnn_backend_acos_multi_node --model SM8750 --host aisw-vm19-labsd --device b3bf37fe --build_folder build-android

For the decompose_log_variants bug fix:

python backends/qualcomm/tests/test_qnn_delegate.py -k TestQNNQuantizedOperator.test_qnn_backend_log1p --model SM8750 --host aisw-vm19-labsd --device 8afa1dd9 --build_folder build-android
python backends/qualcomm/tests/test_qnn_delegate.py -k TestQNNQuantizedOperator.test_qnn_backend_log10 --model SM8750 --host aisw-vm19-labsd --device 8afa1dd9 --build_folder build-android
python backends/qualcomm/tests/test_qnn_delegate.py -k TestQNNQuantizedOperator.test_qnn_backend_log2 --model SM8750 --host aisw-vm19-labsd --device 8afa1dd9 --build_folder build-android

python backends/qualcomm/tests/test_qnn_delegate.py -k TestQNNFloatingPointOperator.test_qnn_backend_log1p --model SM8750 --host aisw-vm19-labsd --device 8afa1dd9 --build_folder build-android
python backends/qualcomm/tests/test_qnn_delegate.py -k TestQNNFloatingPointOperator.test_qnn_backend_log10 --model SM8750 --host aisw-vm19-labsd --device 8afa1dd9 --build_folder build-android
python backends/qualcomm/tests/test_qnn_delegate.py -k TestQNNFloatingPointOperator.test_qnn_backend_log2 --model SM8750 --host aisw-vm19-labsd --device 8afa1dd9 --build_folder build-android

python backends/qualcomm/tests/test_qnn_delegate.py -k TestQNNFloatingPointOperator.test_qnn_backend_log_variants_multi_node --model SM8750 --host aisw-vm19-labsd --device b3bf37fe --build_folder build-android
python backends/qualcomm/tests/test_qnn_delegate.py -k TestQNNQuantizedOperator.test_qnn_backend_log_variants_multi_node --model SM8750 --host aisw-vm19-labsd --device b3bf37fe --build_folder build-android

@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 Apr 7, 2026
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 7, 2026

🔗 Helpful Links

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

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

⏳ No Failures, 131 Pending

As of commit 8fc5595 with merge base fcccda3 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@qti-horodnic
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 Apr 7, 2026
@qti-horodnic qti-horodnic changed the title Qualcomm AI Engine Direct - Adding QNN backend support for atan2 core ATen Op Qualcomm AI Engine Direct - Adding QNN backend support for acos core ATen Op Apr 7, 2026
@qti-horodnic qti-horodnic reopened this Apr 7, 2026
@abhinaykukkadapu
Copy link
Copy Markdown
Contributor

Thanks for adding the support.

@abhinaykukkadapu abhinaykukkadapu merged commit 4c67d96 into pytorch:main Apr 7, 2026
152 of 157 checks passed
jpiat pushed a commit to jpiat/executorch that referenced this pull request Apr 14, 2026
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.

2 participants