-
Notifications
You must be signed in to change notification settings - Fork 22k
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
[cpp_extension][inductor] Fix sleef windows depends. (#128770) #128811
[cpp_extension][inductor] Fix sleef windows depends. (#128770) #128811
Conversation
@pytorchbot rebase -b release/2.4 |
@pytorchbot started a rebase job onto refs/remotes/origin/release/2.4. Check the current status here |
Do we have any testing for the feature? |
@pytorchmergebot rebase -b release/2.4 |
@pytorchbot started a rebase job onto refs/remotes/origin/release/2.4. Check the current status here |
Successfully rebased |
3026516
to
7e87d87
Compare
|
@pytorchmergebot rebase -b release/2.4 |
@pytorchbot started a rebase job onto refs/remotes/origin/release/2.4. Check the current status here |
# Issue: During I'm working on enable inductor on PyTorch Windows, I found the sleef lib dependency issue. <img width="1011" alt="image" src="https://github.com/pytorch/pytorch/assets/8433590/423bd854-3c5f-468f-9a64-a392d9b514e3"> # Analysis: After we enabled SIMD on PyTorch Windows(pytorch#118980 ), the sleef functions are called from VEC headers. It bring the sleef to the dependency. Here is a different between Windows and Linux OS. ## Linux : Linux is default export its functions, so libtorch_cpu.so static link to sleef.a, and then It also export sleef's functions. <img width="647" alt="image" src="https://github.com/pytorch/pytorch/assets/8433590/00ac536c-33fc-4943-a435-25590508840d"> ## Windows: Windows is by default not export its functions, and have many limitation to export functions, reference: pytorch#80604 We can't package sleef functions via torch_cpu.dll like Linux. # Solution: Acturally, we also packaged sleef static lib as a part of release. We just need to help user link to sleef.lib, it should be fine. 1. Add sleef to cpp_builder for inductor. 2. Add sleef to cpp_extension for C++ extesion. Pull Request resolved: pytorch#128770 Approved by: https://github.com/jgong5, https://github.com/jansel
Successfully rebased |
7e87d87
to
f0189bd
Compare
@atalman Any comments? |
Issue:
During I'm working on enable inductor on PyTorch Windows, I found the sleef lib dependency issue.
Analysis:
After we enabled SIMD on PyTorch Windows(#118980 ), the sleef functions are called from VEC headers. It bring the sleef to the dependency.
Here is a different between Windows and Linux OS.
Linux :
Linux is default export its functions, so libtorch_cpu.so static link to sleef.a, and then It also export sleef's functions.
Windows:
Windows is by default not export its functions, and have many limitation to export functions, reference: #80604 We can't package sleef functions via torch_cpu.dll like Linux.
Solution:
Acturally, we also packaged sleef static lib as a part of release. We just need to help user link to sleef.lib, it should be fine.
Pull Request resolved: #128770
Approved by: https://github.com/jgong5, https://github.com/jansel
cc @peterjc123 @mszhanyi @skyline75489 @nbcsm @vladimir-aubrecht @iremyux @Blackhex @cristianPanaite @malfet @zou3519 @jbschlosser @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @voznesenskym @penguinwu @EikanWang @Guobing-Chen @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang