未验证 提交 abad724e 编写于 作者: H HongyuJia 提交者: GitHub

fix windows copysign error (part2) (#50468)

上级 c364f41d
......@@ -15,6 +15,10 @@
#pragma once
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include "paddle/fluid/eager/autograd_meta.h"
#include "paddle/fluid/eager/grad_node_info.h"
......
......@@ -15,6 +15,10 @@ limitations under the License. */
#include "paddle/fluid/pybind/communication.h"
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include <pybind11/chrono.h>
#include <pybind11/complex.h>
#include <pybind11/functional.h>
......
......@@ -15,6 +15,10 @@ limitations under the License. */
#pragma once
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include "pybind11/chrono.h"
#include "pybind11/complex.h"
......
......@@ -15,6 +15,10 @@ limitations under the License. */
#include "paddle/fluid/pybind/communicator_py.h"
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include <map>
#include <memory>
......
......@@ -15,6 +15,10 @@ limitations under the License. */
#pragma once
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include "pybind11/chrono.h"
#include "pybind11/complex.h"
......
......@@ -14,6 +14,10 @@ limitations under the License. */
#pragma once
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include "paddle/fluid/platform/enforce.h"
#include "pybind11/pybind11.h"
......
......@@ -15,6 +15,10 @@ limitations under the License. */
#include "paddle/fluid/pybind/gloo_context_py.h"
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include <pybind11/chrono.h>
#include <pybind11/complex.h>
#include <pybind11/functional.h>
......
......@@ -14,6 +14,10 @@ limitations under the License. */
#pragma once
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include "pybind11/pybind11.h"
#include "pybind11/stl.h"
......
......@@ -15,6 +15,11 @@ limitations under the License. */
#include "paddle/fluid/pybind/imperative.h"
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include <pybind11/chrono.h>
#include <pybind11/complex.h>
#include <pybind11/functional.h>
......
......@@ -14,6 +14,10 @@ limitations under the License. */
#pragma once
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include "pybind11/pybind11.h"
#include "pybind11/stl.h"
......
......@@ -14,6 +14,10 @@ limitations under the License. */
#pragma once
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include "pybind11/pybind11.h"
#include "pybind11/stl.h"
......
......@@ -13,6 +13,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include <algorithm>
#include <cctype>
......
......@@ -13,6 +13,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include <algorithm>
#include <cctype>
......
......@@ -13,6 +13,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include <algorithm>
#include <cctype>
......
......@@ -15,6 +15,10 @@
#pragma once
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include "paddle/fluid/framework/convert_utils.h"
#include "paddle/fluid/framework/scope_guard.h"
......
......@@ -13,6 +13,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include <algorithm>
#include <cctype>
......
......@@ -15,6 +15,10 @@ limitations under the License. */
#pragma once
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include <algorithm>
#include <memory>
......
......@@ -15,6 +15,10 @@
#pragma once
#include <Python.h>
// Avoid a problem with copysign defined in pyconfig.h on Windows.
#ifdef copysign
#undef copysign
#endif
#include "paddle/fluid/operators/utils.h"
#include "paddle/phi/common/data_type.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册