-
Notifications
You must be signed in to change notification settings - Fork 5.9k
add shared mkl lib in whl #3461
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
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
fb61512
add for test, revert me when function done
tensor-tang b430c23
Merge remote-tracking branch 'upstream/develop' into mklso
tensor-tang 6f045f9
add mkl shared lib into whl
tensor-tang 07fdaf7
1. use local lib as runtime path of paddle for mkl shared libs.
tensor-tang d9ea904
Revert "add for test, revert me when function done"
tensor-tang c737225
open MKLDNN and MKLML as default
tensor-tang 075a972
Merge remote-tracking branch 'upstream/develop' into mklso
tensor-tang 9638c14
refine
tensor-tang 2be3d32
use shared lib when mkl
tensor-tang 318fee8
refine cblas
tensor-tang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,21 @@ with open('@PADDLE_SOURCE_DIR@/python/requirements.txt') as f: | |
| if '${CMAKE_SYSTEM_PROCESSOR}' not in ['arm', 'armv7-a', 'aarch64']: | ||
| setup_requires+=["opencv-python"] | ||
|
|
||
| # the prefix is sys.prefix which should always be usr | ||
| paddle_bin_dir = 'local/opt/paddle/bin' | ||
| paddle_bins = ['${PADDLE_BINARY_DIR}/paddle/scripts/paddle_usage', | ||
| '${PADDLE_BINARY_DIR}/paddle/trainer/paddle_trainer', | ||
| '${PADDLE_BINARY_DIR}/paddle/trainer/paddle_merge_model', | ||
| '${PADDLE_BINARY_DIR}/paddle/pserver/paddle_pserver_main'] | ||
|
|
||
| paddle_rt_lib_dir = 'local/lib' | ||
| paddle_rt_libs = [] | ||
|
|
||
| mkl_shared_libs='${MKL_SHARED_LIBS}' | ||
| if mkl_shared_libs != '': | ||
| paddle_rt_libs += mkl_shared_libs.split(';') | ||
| print paddle_rt_libs | ||
|
||
|
|
||
| setup(name='paddlepaddle', | ||
| version='${PADDLE_VERSION}', | ||
| description='Parallel Distributed Deep Learning', | ||
|
|
@@ -42,9 +57,6 @@ setup(name='paddlepaddle', | |
| }, | ||
| scripts=['${PADDLE_BINARY_DIR}/paddle/scripts/paddle'], | ||
| distclass=BinaryDistribution, | ||
| data_files=[('/usr/local/opt/paddle/bin', | ||
| ['${PADDLE_BINARY_DIR}/paddle/scripts/paddle_usage', | ||
| '${PADDLE_BINARY_DIR}/paddle/trainer/paddle_trainer', | ||
| '${PADDLE_BINARY_DIR}/paddle/trainer/paddle_merge_model', | ||
| '${PADDLE_BINARY_DIR}/paddle/pserver/paddle_pserver_main'])] | ||
| data_files=[(paddle_bin_dir, paddle_bins), | ||
| (paddle_rt_lib_dir, paddle_rt_libs)] | ||
| ) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! This is the best way to fix installation dir issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in docker which will install under
/usr/local/local/opt/paddle/bin/paddle_usageif python's main path is under/usr/local, should this beopt/paddle/bin?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about not in docker? Still like
local/local?Or could you set --prefix=/usr when setup docker.
Because I thought outside docker, it should be default as /usr. I tried on my machine and just found that in @luotao1 's machine the path is still look right to me:
Her case is under
/home/luotao/.jumbo.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought
paddlecommand is installed byscripts=['${PADDLE_BINARY_DIR}/paddle/scripts/paddle'], so it's installed to where python installed at. When running pip install without setting--prefixpaddlecommand will try to find binaries relatively, whether in docker or not.In @luotao1 's case, is it working if binaries are installed under
/home/luotao/.jumbo/opt/paddle/bin/? If so, can using paddle_bin_dir = 'opt/paddle/bin'` solve all the cases?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@typhoonzero
/home/luotao/Paddle/build/opt/paddle/bin下home/luotao/Paddle/build/opt/paddle/share/wheels/paddlepaddle-0.10.0-cp27-cp27mu-linux_x86_64.whl/home/luotao/.jumbo/local/opt/paddle/bin下,所有python相关都在/home/luotao/.jumbo/lib/python2.7/site-packages/paddle和/home/luotao/.jumbo/lib/python2.7/site-packages/py_paddle下。