Skip to content

Link xnn_executor_runner with optimized op library #8901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Mar 4, 2025
Merged

Conversation

swolchok
Copy link
Contributor

@swolchok swolchok commented Mar 3, 2025

Doesn't seem to be any reason not to allow optimized ops for this one.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@swolchok
Copy link
Contributor Author

swolchok commented Mar 3, 2025

Copy link

pytorch-bot bot commented Mar 3, 2025

🔗 Helpful Links

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

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

⏳ No Failures, 2 Pending

As of commit 18c64ad with merge base 09ad20a (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-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 Mar 3, 2025
swolchok added a commit that referenced this pull request Mar 3, 2025
Doesn't seem to be any reason not to allow optimized ops for this one.

ghstack-source-id: aaf66178b1902763ebaaaa2f0b3a312505722ea8
ghstack-comment-id: 2695738759
Pull Request resolved: #8901
swolchok added 3 commits March 3, 2025 15:31
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@swolchok swolchok changed the base branch from gh/swolchok/302/head to gh/swolchok/299/head March 3, 2025 23:41
@kirklandsign
Copy link
Contributor

Thanks @swolchok!

Ideally in OSS world we also have a executor_runner with optimized kernels, and use it as a test runner for all models. Maybe we can promote xnn_executor_runner to be this general runner.

BTW this PR has diff from other commits?

@swolchok
Copy link
Contributor Author

swolchok commented Mar 4, 2025

I'm having trouble exporting my stack; getting GitHub rate limits. Hopefully folks will review the bottom PR or two soon.

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Mar 4, 2025
Doesn't seem to be any reason not to allow optimized ops for this one.

ghstack-source-id: 85e31ee40499f7858fb8ff4c3e42ec453ff88948
ghstack-comment-id: 2695738759
Pull Request resolved: #8901
@swolchok
Copy link
Contributor Author

swolchok commented Mar 4, 2025

this PR has diff from other commits?

fixed, please review

@swolchok swolchok force-pushed the gh/swolchok/299/head branch from 7cbe7a1 to 7bc4529 Compare March 4, 2025 00:28
[ghstack-poisoned]
@swolchok swolchok force-pushed the gh/swolchok/299/head branch from 7bc4529 to 764977b Compare March 4, 2025 16:11
@@ -139,7 +139,7 @@ if(NOT CMAKE_TOOLCHAIN_FILE MATCHES ".*(iOS|ios\.toolchain)\.cmake$")
endif()

target_link_libraries(
xnn_executor_runner gflags portable_ops_lib ${xnn_executor_runner_libs}
xnn_executor_runner gflags optimized_native_cpu_ops_lib ${xnn_executor_runner_libs}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! So many perf cliffs because of this.

swolchok added 7 commits March 4, 2025 09:43
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@swolchok swolchok changed the base branch from gh/swolchok/299/head to main March 4, 2025 17:47
@swolchok swolchok added the release notes: devtools Changes to dev tooling, for example the debugger & profiler label Mar 4, 2025
[ghstack-poisoned]
@@ -119,6 +118,12 @@ target_include_directories(
target_compile_options(xnnpack_backend PUBLIC ${_common_compile_options})
target_link_options_shared_lib(xnnpack_backend)

if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed build when XNNPACK is on but optimized lib is off. everything else (except corresponding change to line 149 below) is just cmake-format.

@swolchok swolchok merged commit 6caefc3 into main Mar 4, 2025
50 checks passed
@swolchok swolchok deleted the gh/swolchok/304/head branch March 4, 2025 19:17
zonglinpeng pushed a commit that referenced this pull request Mar 6, 2025
Doesn't seem to be any reason not to allow optimized ops for this one.
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: devtools Changes to dev tooling, for example the debugger & profiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants