-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[SOT] rewrite eval frame in C-lang #57653
[SOT] rewrite eval frame in C-lang #57653
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -94,9 +94,9 @@ repos: | |||
description: Check C++ code style using cpplint.py. | |||
entry: bash ./tools/codestyle/cpplint_pre_commit.hook | |||
language: system | |||
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx)$ | |||
files: \.(cc|cxx|cpp|cu|h|hpp|hxx)$ |
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.
eval_frame.c
是 Paddle 唯一现存的 C 代码,cpplint 里有大量的 C 写法检查,这些是不正确的(比如 NULL
-> nullptr
),也是没有办法修改的,添加大量 NOLINT
也是不建议的,鉴于所有 C 代码应当都有同样的问题,因此将其从 cpplint 监控列表移除
clang-format 不应禁掉,我们仍然需要代码格式化
clang-tidy 理应禁掉,但是目前并没有发现报错,也许是对 .c
后缀进行了特判,需要之后进一步观察
PR types
Bug fixes
PR changes
Others
Description
修复 3.11 编译问题
使用 C 编译 eval_frame,否则因为 eval_frame 中所 include 的部分 Python internal library 使用了 C++ 所不兼容的写法,会导致编译失败,如果不使用 C 的话就需要将相关代码 copy 出来,并使用 C++ 兼容的写法重写一遍,成本巨大,且不易维护
因为无法使用 VLOG,所以原来 VLOG 相关位置暂时注释掉,之后可能寻找合适的方式 log
另外修复了下创建 Function 时候没有 copy closure 的问题
以及修复了 test_pylayer 无法直接 run 的问题
PCard-66972