-
Notifications
You must be signed in to change notification settings - Fork 537
Reuse GELU implementation from PyTorch core #8322
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/8322
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 5 PendingAs of commit 2c10b96 with merge base 89dc36c ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Updated the base to main |
I discovered one typo during conflict resolution already, waiting for at least unittest jobs to come back |
I cannot repro the build failures on this PR with a linux machine. |
trying to see if the following workflow reproduces:
|
nope. install_executorch.py uninstalls torch installed this way. also getting |
I haven't been able to connect the dots yet, but let me take a closer look |
While debugging the build issue on #8322 w.r.t mkl, I undercover a complex interaction between #8322, #8248 (to install mkl), and https://github.com/pytorch/pytorch/blob/main/cmake/public/mkl.cmake from PyTorch. The error is as follows: ``` CMake Error at /opt/conda/envs/py_3.10/lib/cmake/mkl/MKLConfig.cmake:744 (add_library): <-- This file comes from conda mkl add_library cannot create imported target "MKL::MKL" because another target with the same name already exists. Call Stack (most recent call first): /opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/share/cmake/Caffe2/public/mkl.cmake:1 (find_package) <-- this is from PyTorch /opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:106 (include) /opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package) CMakeLists.txt:753 (find_package) ``` The conclusion is that, with mkl installed, there should be just one `find_package(Torch)` call because the mkl target is defined globally. The `torch` target, on the other hand, is only defined locally. So, this change adds `if(NOT TARGET torch)` check to only call `find_package(Torch)` if needed. ### Testing The change on top of #8322 looks like this f705b01 https://github.com/pytorch/executorch/actions/runs/13278590926?pr=8399
d7c261d
to
0d95292
Compare
rebased the branch locally, fixed conflicts, and force-pushed. hopefully we should acutlaly have picked up #8407 and will be able to land soon. |
Pull Request resolved: #7041 kernels/optimized doesn't need to support embedded systems, so it can just take a header-only dep on PyTorch. Note that, because we will pick up Sleef internally and ignore it externally thanks to ATen vec, this PR gets to enable optimized GELU in OSS. Testing: CI to make sure this doesn't break mobile build modes; happy to take advice on anything not currently covered that might break. ghstack-source-id: 265190627 @exported-using-ghexport Differential Revision: [D66335522](https://our.internmc.facebook.com/intern/diff/D66335522/)
b9e7ddb
to
2c10b96
Compare
This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #7041
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/swolchok/120/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/swolchok/120/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/swolchok/124/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/swolchok/120/orig
@diff-train-skip-merge