-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[cmake治理]Compile ddim as separate dynamic library #58899
[cmake治理]Compile ddim as separate dynamic library #58899
Conversation
b392caf
to
d7ba4dd
Compare
d7ba4dd
to
d901433
Compare
paddle/common/dim.h
Outdated
namespace framework { | ||
template <int D> | ||
using Dim = common::Dim<D>; | ||
|
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.
commom中为什么还要添加 paddle::framework::Dim?
paddle/common/ddim.h
Outdated
namespace paddle { | ||
namespace framework { | ||
|
||
using DDim = common::DDim; |
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.
commom中为什么还要添加 paddle::framework::Dim?
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.
应该删掉的,马上修改
paddle/common/enforce.h
Outdated
__COMMON_BINARY_COMPARE(__VAL0, __VAL1, <=, >, __VA_ARGS__) | ||
|
||
} // namespace enforce | ||
using namespace enforce; // NOLINT |
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.
这有什么意义?
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.
已经删掉
paddle/common/exception.h
Outdated
#include <sstream> | ||
#include <string> | ||
|
||
namespace paddle { |
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.
common?
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.
对,应该改成common
@@ -69,6 +69,11 @@ if(WIN32) | |||
list(APPEND EAGER_CODEGEN_DEPS ${eager_generator_path}/ir.dll) | |||
endif() | |||
|
|||
add_custom_command( | |||
OUTPUT ${eager_generator_path}/common.dll | |||
COMMAND ${CMAKE_COMMAND} -E copy ${COMMON_LIB} ${eager_generator_path}) |
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.
有必要添加这个 dll 到eager_generator_path么?
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.
我删掉看看可以编的过吗
6e38346
to
136a7bd
Compare
paddle/fluid/pybind/CMakeLists.txt
Outdated
@@ -361,6 +362,10 @@ if(WITH_PYTHON) | |||
list(APPEND EAGER_OP_IMPL_DEPS ${op_impl_path}/ir.dll) | |||
endif() | |||
|
|||
add_custom_command( |
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.
这个需要么?
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.
已经删掉
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.
LGTM
* refine * add common direcotry * fix codestyle * compile ddim.cc in common direcotry * fix windows compile bug * fix windows bug * fix windows bug * fix windows bug * fix windows bug * fix windows bug * fix bug * fix mac bug * fix windows test * fix bug * delete some invalid code * delete some unvalid code --------- Co-authored-by: Wang Huan <wanghuan29@baidu.com>
PR types
Others
PR changes
Others
Description
在paddle下新建目录common,将一些基础组件放在此目录,并编译成libcommon.so/dll,此PR下沉ddim.cc和enforce.cc,解除pir依赖phi里的ddim。
To do:
彻底清除phi下的ddim.cc和enforce.cc,后续phi和pir均用paddle/common下的libcommon,so/dll,([cmake治理]fix can't find libcommon.so bug #58998)
最终状态
Pcard-67010