From c8c24460313f03028beded94fdf26d2af5b7dd8c Mon Sep 17 00:00:00 2001 From: Wilber Date: Fri, 18 Feb 2022 10:07:36 +0800 Subject: [PATCH] fix compile error in jetson (#39669) --- paddle/fluid/platform/device/gpu/gpu_launch_config.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/platform/device/gpu/gpu_launch_config.h b/paddle/fluid/platform/device/gpu/gpu_launch_config.h index d07ef73a49..cb0173fd6d 100644 --- a/paddle/fluid/platform/device/gpu/gpu_launch_config.h +++ b/paddle/fluid/platform/device/gpu/gpu_launch_config.h @@ -63,8 +63,9 @@ static inline int RoundToPowerOfTwo(int n) { #ifdef WITH_NV_JETSON // The number of threads cannot be assigned 1024 in some cases when the device // is nano or tx2 . -inline void ChangeThreadNum(const platform::CUDADeviceContext& context, - int* num_thread, int alternative_num_thread = 512) { +template +inline void ChangeThreadNum(const CUDADeviceContext& context, int* num_thread, + int alternative_num_thread = 512) { if (context.GetComputeCapability() == 53 || context.GetComputeCapability() == 62) { *num_thread = alternative_num_thread; -- GitLab