Skip to content
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

[PHI decoupling] move "macros.h" from fluid to phi #48069

Merged
merged 1 commit into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions paddle/fluid/platform/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,4 @@ limitations under the License. */

#pragma once

// Disable the copy and assignment operator for a class.
#ifndef DISABLE_COPY_AND_ASSIGN
#define DISABLE_COPY_AND_ASSIGN(classname) \
private: \
classname(const classname&) = delete; \
classname(classname&&) = delete; \
classname& operator=(const classname&) = delete; \
classname& operator=(classname&&) = delete
#endif

#ifndef PADDLE_WITH_MUSL
#if defined(__FLT_MAX__)
#define FLT_MAX __FLT_MAX__
#endif // __FLT_MAX__
#endif // PADDLE_WITH_MUSL
#include "paddle/phi/core/macros.h"
6 changes: 6 additions & 0 deletions paddle/phi/core/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,10 @@ namespace phi {
#define PADDLE_RESTRICT
#endif

#ifndef PADDLE_WITH_MUSL
#if defined(__FLT_MAX__)
#define FLT_MAX __FLT_MAX__
#endif // __FLT_MAX__
#endif // PADDLE_WITH_MUSL

} // namespace phi
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/pooling.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ limitations under the License. */
#include <string>
#include <vector>

#include "paddle/fluid/platform/macros.h" // import FLT_MAX
#include "paddle/phi/common/amp_type_traits.h"
#include "paddle/phi/core/dense_tensor.h"
#include "paddle/phi/core/hostdevice.h"
#include "paddle/phi/core/macros.h" // import FLT_MAX

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
#include "paddle/phi/backends/gpu/gpu_decls.h"
Expand Down