File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed
paddle/fluid/platform/dynload Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ extern void *cupti_dso_handle;
45
45
std::call_once (cupti_dso_flag, []() { \
46
46
cupti_dso_handle = paddle::platform::dynload::GetCUPTIDsoHandle (); \
47
47
}); \
48
- void *p_##__name = dlsym (cupti_dso_handle, #__name); \
48
+ static void *p_##__name = dlsym (cupti_dso_handle, #__name); \
49
49
return reinterpret_cast <cuptiFunc>(p_##__name)(args...); \
50
50
} \
51
51
}; \
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ extern void *curand_dso_handle;
34
34
std::call_once (curand_dso_flag, []() { \
35
35
curand_dso_handle = paddle::platform::dynload::GetCurandDsoHandle (); \
36
36
}); \
37
- void *p_##__name = dlsym (curand_dso_handle, #__name); \
37
+ static void *p_##__name = dlsym (curand_dso_handle, #__name); \
38
38
return reinterpret_cast <curandFunc>(p_##__name)(args...); \
39
39
} \
40
40
}; \
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ extern void* nccl_dso_handle;
37
37
std::call_once (nccl_dso_flag, []() { \
38
38
nccl_dso_handle = paddle::platform::dynload::GetNCCLDsoHandle (); \
39
39
}); \
40
- void * p_##__name = dlsym (nccl_dso_handle, #__name); \
40
+ static void * p_##__name = dlsym (nccl_dso_handle, #__name); \
41
41
return reinterpret_cast <nccl_func>(p_##__name)(args...); \
42
42
} \
43
43
}; \
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ extern void* tensorrt_dso_handle;
40
40
paddle::platform::dynload::GetTensorRtDsoHandle (); \
41
41
PADDLE_ENFORCE (tensorrt_dso_handle, " load tensorrt so failed" ); \
42
42
}); \
43
- void * p_##__name = dlsym (tensorrt_dso_handle, #__name); \
43
+ static void * p_##__name = dlsym (tensorrt_dso_handle, #__name); \
44
44
PADDLE_ENFORCE (p_##__name, " load %s failed" , #__name); \
45
45
return reinterpret_cast <tensorrt_func>(p_##__name)(args...); \
46
46
} \
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ extern void* warpctc_dso_handle;
40
40
std::call_once (warpctc_dso_flag, []() { \
41
41
warpctc_dso_handle = paddle::platform::dynload::GetWarpCTCDsoHandle (); \
42
42
}); \
43
- void * p_##_name = dlsym (warpctc_dso_handle, #__name); \
43
+ static void * p_##_name = dlsym (warpctc_dso_handle, #__name); \
44
44
return reinterpret_cast <warpctcFunc>(p_##_name)(args...); \
45
45
} \
46
46
}; \
You can’t perform that action at this time.
0 commit comments