未验证 提交 c8c24460 编写于 作者: W Wilber 提交者: GitHub

fix compile error in jetson (#39669)

上级 229ec32a
...@@ -63,8 +63,9 @@ static inline int RoundToPowerOfTwo(int n) { ...@@ -63,8 +63,9 @@ static inline int RoundToPowerOfTwo(int n) {
#ifdef WITH_NV_JETSON #ifdef WITH_NV_JETSON
// The number of threads cannot be assigned 1024 in some cases when the device // The number of threads cannot be assigned 1024 in some cases when the device
// is nano or tx2 . // is nano or tx2 .
inline void ChangeThreadNum(const platform::CUDADeviceContext& context, template <typename CUDADeviceContext>
int* num_thread, int alternative_num_thread = 512) { inline void ChangeThreadNum(const CUDADeviceContext& context, int* num_thread,
int alternative_num_thread = 512) {
if (context.GetComputeCapability() == 53 || if (context.GetComputeCapability() == 53 ||
context.GetComputeCapability() == 62) { context.GetComputeCapability() == 62) {
*num_thread = alternative_num_thread; *num_thread = alternative_num_thread;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册