[CustomOp]Support MacOS platform and Remove libpaddle_custom_op.so dependency#31976
Merged
Aurelius84 merged 13 commits intoPaddlePaddle:developfrom Apr 9, 2021
Merged
[CustomOp]Support MacOS platform and Remove libpaddle_custom_op.so dependency#31976Aurelius84 merged 13 commits intoPaddlePaddle:developfrom
Aurelius84 merged 13 commits intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
chenwhql
reviewed
Apr 8, 2021
| self.build_lib = self.output_dir | ||
|
|
||
| def build_extensions(self): | ||
| if OS_NAME.startswith("darwin"): |
Contributor
There was a problem hiding this comment.
why only need to check mac compiler
Contributor
Author
There was a problem hiding this comment.
Because self.compiler will use gcc on some mac devices.
| # create symbol link | ||
| if not os.path.exists(new_lib_core_path): | ||
| try: | ||
| os.symlink(core_path, new_lib_core_path) |
Contributor
There was a problem hiding this comment.
Will it be impossible to create symlnik here due to permission issues?
Contributor
Author
There was a problem hiding this comment.
If users can install paddle, there will be no permission issues.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR types
New features
PR changes
Others
Describe
What's New?
Custom Op supports to compile on MacOS platform
1. Remove libpaddle_custom_op.so
After this PR, we no long link
libpaddle_custom_op.soon Linux andlibpaddle_custom_op.dylibon Mac platform. Of course, we don't need tocc_librarythem and inlcude into bdist whl. The main benefit is to decrease the size of Paddle whl package.2. Only Need core_(no)avx.so
We finally decouple the third DSO lib and only rely on
core_(no)avx.so. According our experiment, the cost time is almost same as before.zh doc: PaddlePaddle/docs#3413