Skip to content
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
2 changes: 2 additions & 0 deletions cmake/external/glog.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

include(ExternalProject)

add_definitions(-DGLOG_NO_ABBREVIATED_SEVERITIES)

set(GLOG_PREFIX_DIR ${THIRD_PARTY_PATH}/glog)
set(GLOG_INSTALL_DIR ${THIRD_PARTY_PATH}/install/glog)
set(GLOG_INCLUDE_DIR
Expand Down
2 changes: 0 additions & 2 deletions paddle/common/enforce.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
#include <execinfo.h>
#endif

// msvc conflict logging with windows.h
#define GLOG_NO_ABBREVIATED_SEVERITIES
#include "paddle/utils/string/printf.h"
#include "paddle/utils/string/to_string.h"
#include "paddle/utils/variant.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/io/shell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#include <array>
#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h

#include "paddle/fluid/framework/io/shell.h"

#include "paddle/common/enforce.h"
Expand Down
3 changes: 1 addition & 2 deletions paddle/fluid/framework/op_registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ limitations under the License. */
#include <unordered_map>
#include <unordered_set>

#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#include "glog/logging.h" // For VLOG()
#include "glog/logging.h" // For VLOG()
#include "paddle/common/flags.h"
#include "paddle/common/macros.h"
#include "paddle/fluid/framework/attribute.h"
Expand Down
1 change: 0 additions & 1 deletion paddle/fluid/platform/enforce.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ limitations under the License. */
#include <execinfo.h>
#endif

#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#include "glog/logging.h"
#include "paddle/common/errors.h"
#include "paddle/common/flags.h"
Expand Down
2 changes: 0 additions & 2 deletions paddle/phi/common/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include <string>
#include "paddle/utils/test_macros.h"

#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h

#if !defined(_WIN32)
#include <dlfcn.h> // dladdr
#include <sys/time.h>
Expand Down
1 change: 0 additions & 1 deletion paddle/phi/core/memory/allocation/system_allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
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. */
#define GLOG_NO_ABBREVIATED_SEVERITIES

#include "paddle/phi/core/memory/allocation/system_allocator.h"

Expand Down
1 change: 0 additions & 1 deletion paddle/phi/core/platform/profiler/cpu_utilization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#include "paddle/phi/core/platform/profiler/cpu_utilization.h"
#include <array>
#include "glog/logging.h"
Expand Down
15 changes: 13 additions & 2 deletions paddle/phi/kernels/funcs/shuffle_batch.cu.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ struct write_output_op_fixed {
std::uint64_t m;
InputIterT in;
OutputIterT out;
// flag contains inclusive scan of valid keys
// perform gather using valid keys
// flag contains inclusive scan of valid keys
// perform gather using valid keys
#if CUDA_VERSION < 12060
__thrust_exec_check_disable__ __host__ __device__ std::size_t operator()(
key_flag_tuple_fixed x) {
if (x.key < m) {
Expand All @@ -159,6 +160,16 @@ struct write_output_op_fixed {
}
return 0; // Discarded
}
#else
_CCCL_EXEC_CHECK_DISABLE
_CCCL_HOST_DEVICE std::size_t operator()(key_flag_tuple_fixed x) {
if (x.key < m) {
// -1 because inclusive scan
out[x.flag - 1] = in[x.key];
}
return 0; // Discarded
}
#endif
};

template <typename ExecutionPolicy,
Expand Down
1 change: 0 additions & 1 deletion test/cpp/fluid/platform/bfloat16_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ limitations under the License. */

#include "paddle/phi/kernels/funcs/eigen/extensions.h"

#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#include "gtest/gtest.h"
#include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/fluid/platform/enforce.h"
Expand Down
1 change: 0 additions & 1 deletion test/cpp/fluid/platform/bfloat16_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ limitations under the License. */

#include "paddle/phi/common/bfloat16.h"

#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#include <glog/logging.h>
#include <gtest/gtest.h>

Expand Down
1 change: 0 additions & 1 deletion test/cpp/fluid/platform/complex_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include "paddle/phi/kernels/funcs/eigen/extensions.h"

#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#include "gtest/gtest.h"
#include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/fluid/platform/enforce.h"
Expand Down
1 change: 0 additions & 1 deletion test/cpp/fluid/platform/complex_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#include "paddle/phi/common/complex.h"

#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#include <glog/logging.h>
#include <gtest/gtest.h>
#include <thrust/complex.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ 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. */

#define GLOG_NO_ABBREVIATED_SEVERITIES
#define GOOGLE_GLOG_DLL_DECL

#include <gtest/gtest.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ 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. */

#define GLOG_NO_ABBREVIATED_SEVERITIES
#define GOOGLE_GLOG_DLL_DECL

#include <gtest/gtest.h>
Expand Down
1 change: 0 additions & 1 deletion test/cpp/fluid/platform/float16_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ limitations under the License. */

#include "paddle/phi/common/float16.h"

#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#include "gtest/gtest.h"
#include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/fluid/platform/enforce.h"
Expand Down
1 change: 0 additions & 1 deletion test/cpp/fluid/platform/float16_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ limitations under the License. */

#include "paddle/phi/common/float16.h"

#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#include <glog/logging.h>
#include <gtest/gtest.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License. */
#include <io.h>
#include <process.h>
#endif
#define GLOG_NO_ABBREVIATED_SEVERITIES

#include <glog/logging.h>
#include <gtest/gtest.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License. */
#include <io.h>
#include <process.h>
#endif
#define GLOG_NO_ABBREVIATED_SEVERITIES

#include <glog/logging.h>
#include <gtest/gtest.h>

Expand Down
Loading