Skip to content

Commit 430e559

Browse files
authored
Merge pull request #15611 from guoshengCS/fix-beam-search-size
To make CUDA_LAUNCH_KERNEL_HELPER support large size.
2 parents 46a6cac + b6c3b69 commit 430e559

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

paddle/fluid/platform/cuda_device_function.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ inline static int RoundToPowerOfTwo(int dim) {
5353
__VA_ARGS__; \
5454
} break
5555

56-
#define CUDA_LAUNCH_KERNEL_HELPER(...) \
57-
CUDA_LAUNCH_KERNEL_BASE(256, ##__VA_ARGS__); \
58-
CUDA_LAUNCH_KERNEL_BASE(128, ##__VA_ARGS__); \
59-
CUDA_LAUNCH_KERNEL_BASE(64, ##__VA_ARGS__); \
56+
#define CUDA_LAUNCH_KERNEL_HELPER(...) \
57+
CUDA_LAUNCH_KERNEL_BASE(1024, ##__VA_ARGS__); \
58+
CUDA_LAUNCH_KERNEL_BASE(512, ##__VA_ARGS__); \
59+
CUDA_LAUNCH_KERNEL_BASE(256, ##__VA_ARGS__); \
60+
CUDA_LAUNCH_KERNEL_BASE(128, ##__VA_ARGS__); \
61+
CUDA_LAUNCH_KERNEL_BASE(64, ##__VA_ARGS__); \
6062
CUDA_LAUNCH_KERNEL_BASE(32, ##__VA_ARGS__);
6163

6264
template <typename T>

0 commit comments

Comments
 (0)