Skip to content

Commit 445fff2

Browse files
committed
add the bigobj option to NVCC compile
fix code style
1 parent 81bd7ee commit 445fff2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

cmake/cuda.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
200200
endif()
201201
else(NOT WIN32)
202202
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
203-
list(APPEND CUDA_NVCC_FLAGS "-g -G")
203+
list(APPEND CUDA_NVCC_FLAGS "-g -G --compiler-options;/bigobj")
204204
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
205-
list(APPEND CUDA_NVCC_FLAGS "-O3 -DNDEBUG")
205+
list(APPEND CUDA_NVCC_FLAGS "-O3 -DNDEBUG --compiler-options;/bigobj")
206206
else()
207207
message(FATAL "Windows only support Release or Debug build now. Please set visual studio build type to Release/Debug, x64 build.")
208208
endif()

paddle/fluid/operators/beam_search_op_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ void CreateInput(LoDTensor* ids, LoDTensor* scores) {
4545
auto* ids_data = ids->mutable_data<int64_t>(place);
4646
auto* scores_data = scores->mutable_data<float>(place);
4747
vector<int64_t> _ids({4, 2, 5, 2, 1, 3, 3, 5, 2, 8, 2, 1});
48-
vector<float> _scores({0.5f, 0.3f, 0.2f, 0.6f, 0.3f, 0.1f,
49-
0.9f, 0.5f, 0.1f, 0.7f, 0.5f, 0.1f});
48+
vector<float> _scores(
49+
{0.5f, 0.3f, 0.2f, 0.6f, 0.3f, 0.1f, 0.9f, 0.5f, 0.1f, 0.7f, 0.5f, 0.1f});
5050

5151
for (int i = 0; i < 12; i++) {
5252
ids_data[i] = _ids[i];

paddle/fluid/platform/stream_callback_manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
#pragma once
1616

17+
#include <ThreadPool.h>
1718
#include <cuda.h>
1819
#include <cuda_runtime.h>
1920
#include <functional>
2021
#include <memory>
21-
#include <ThreadPool.h>
2222
#include "paddle/fluid/platform/enforce.h"
2323

2424
namespace paddle {

0 commit comments

Comments
 (0)