CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[3.8] Remove undef copysign
macros
#72856
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
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.
Pull Request Overview
This PR removes the redundant undefines of the copysign macro from multiple files in the pybind and eager code, cleaning up legacy workarounds.
- Removed unnecessary macro undefinitions that were used to address Windows issues with pyconfig.h.
- Uniformly cleaned duplicated code segments across various files in the project.
Reviewed Changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
paddle/fluid/pybind/exception.h | Removed copysign macro undef blocks. |
paddle/fluid/pybind/eager_utils.h | Removed copysign macro undef blocks. |
paddle/fluid/pybind/eager_utils.cc | Removed copysign macro undef blocks. |
paddle/fluid/pybind/eager_py_layer.cc | Removed copysign macro undef blocks. |
paddle/fluid/pybind/eager_properties.cc | Removed copysign macro undef blocks. |
paddle/fluid/pybind/eager_method.cc | Removed copysign macro undef blocks. |
paddle/fluid/pybind/eager_math_op_patch.cc | Removed copysign macro undef blocks. |
paddle/fluid/pybind/eager_functions.cc | Removed copysign macro undef blocks. |
paddle/fluid/pybind/eager.h | Removed copysign macro undef blocks. |
paddle/fluid/pybind/eager.cc | Removed copysign macro undef blocks. |
paddle/fluid/pybind/const_value.h | Removed copysign macro undef blocks. |
paddle/fluid/pybind/compiled_program.cc | Removed copysign macro undef blocks. |
paddle/fluid/pybind/communicator_py.h | Removed copysign macro undef blocks. |
paddle/fluid/pybind/communicator_py.cc | Removed copysign macro undef blocks. |
paddle/fluid/pybind/communication.h | Removed copysign macro undef blocks. |
paddle/fluid/pybind/communication.cc | Removed copysign macro undef blocks. |
paddle/fluid/pir/dialect/op_generator/python_c_gen.py | Removed copysign macro undef blocks. |
paddle/fluid/framework/io/shell.h | Removed copysign macro undef blocks. |
paddle/fluid/eager/pylayer/py_layer_node.h | Removed copysign macro undef blocks. |
paddle/fluid/eager/auto_code_generator/generator/python_c_gen.py | Removed copysign macro undef blocks. |
Comments suppressed due to low confidence (20)
paddle/fluid/pybind/exception.h:16
- Removal of the copysign undef macros improves code clarity. Please ensure that these changes do not adversely affect Windows builds that might have relied on this workaround.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/eager_utils.h:18
- Uniform removal of the copysign undef macros enhances maintainability. Confirm that the Windows compatibility is not impacted by this cleanup.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/eager_utils.cc:9
- The removal of the copysign undef block cleans up the file. Verify that any dependent code does not require this workaround on Windows.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/eager_py_layer.cc:10
- Removing these lines improves clarity; please ensure that omitting the copysign undef does not introduce platform-specific issues.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/eager_properties.cc:10
- The removal streamlines the header; just double-check that this change does not impact builds on Windows.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/eager_method.cc:18
- Consistent removal of the copysign workaround improves maintainability. Ensure that no Windows-specific issues arise from this change.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/eager_math_op_patch.cc:18
- Removing the copysign undef block helps declutter the file. Please confirm that this removal is safe for Windows environments.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/eager_functions.cc:18
- The cleanup of redundant copysign macro undefinitions is noted. Verify that the change does not affect any Windows-specific functionality.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/eager.h:13
- The removal in this header improves overall clarity. Please ensure that no dependent modules require the previous workaround.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/eager.cc:14
- Cleaning up the copysign undef macros is beneficial; just confirm that there are no unintended side-effects on Windows builds.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/const_value.h:16
- Removing this workaround streamlines the header file. Verify that the change does not introduce any issues on Windows platforms.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/compiled_program.cc:15
- The removal enhances clarity in this compilation unit. Ensure that removing the macro undef does not break any Windows-specific behavior.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/communicator_py.h:17
- The cleanup of the redundant copysign macro undef block is consistent. Please verify that this change does not impact platform-specific compatibility.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/communicator_py.cc:17
- Removal of the copysign workaround is applied uniformly; ensure that any Windows-specific dependencies are addressed elsewhere.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/communication.h:17
- The removal in this header simplifies the code. Confirm that this change does not affect any Windows-specific builds.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pybind/communication.cc:17
- This cleanup removes unnecessary macro undefinitions; please ensure that platform-specific code continues to function correctly.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/pir/dialect/op_generator/python_c_gen.py:31
- Removing the copysign undef block here aligns with the rest of the codebase. Ensure that this removal is safe with respect to any Python header dependencies.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/framework/io/shell.h:21
- The removal of the copysign macro undef block cleans up this header. Please verify that this does not interfere with Windows-specific macros in included libraries.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/eager/pylayer/py_layer_node.h:17
- The removal of the copysign workaround here is consistent with other files. Verify that this change does not impact any legacy Windows behavior.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
paddle/fluid/eager/auto_code_generator/generator/python_c_gen.py:291
- The removal of the copysign undef block in this generator script is clear. Please ensure that the auto-generated code remains compatible across platforms.
// Avoid a problem with copysign defined in pyconfig.h on Windows.
skip-reason: code cleanup only |
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.
PR Category
Execute Infrastructure
PR Types
Deprecations
Description
清理
copysign
宏, #50387 (他们都说能安全删除,让我看看是不是真的[旺柴])