-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add StringTensor #39830
Add StringTensor #39830
Conversation
Thanks for your contribution! |
Conflicts: cmake/phi.cmake paddle/phi/CMakeLists.txt paddle/phi/api/CMakeLists.txt paddle/phi/api/lib/CMakeLists.txt paddle/phi/api/lib/utils/CMakeLists.txt paddle/phi/common/data_type.h paddle/phi/core/kernel_utils.h paddle/phi/tests/api/CMakeLists.txt paddle/phi/tests/kernels/CMakeLists.txt
958b18b
to
05043fc
Compare
05043fc
to
a9928ca
Compare
… add_string_tensor
… add_string_tensor
… add_string_tensor
… add_string_tensor
2. Add StringTensor debug info 3. Rename case_convert_kernel to strings_lower_upper 4. Remove serialize derialize strings kernel
… add_string_tensor
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
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
@@ -0,0 +1,112 @@ | |||
/* Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. |
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.
细节,还有几个文件的license没有换行
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
6856986
to
bef8cbe
Compare
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
This reverts commit 0695e1a.
PR types
New features
PR changes
OPs
Describe
该PR仅修改C++层的代码,暂时不涉及Python API的修改
TODO:
Optimize the build size
背景
该PR Coverage CI生成的build目录的大小为140GB,增量为4GB,超过了该CI的阈值3GB,需要优化build目录的生成大小。
优化方法
经过分析发现,在生成strings_api.cc的时候,引入了不必要的头文件
paddle/phi/kernels/declarations.h
,该头文件会把Paddle所有kernel的声明引入,并在链接时将其实现链接,形成一个超大的可执行文件。通过去除该头文件,在本地编译时,单测可执行文件test_strings_empty_api
与test_strings_lower_upper_api
的大小从241MB
下降到10MB
,与其他单测可执行文件大小相仿。而Coverage CI生成的build目录大小也从140GB
下降到137GB
,增量从4GB
下降到1GB
。