Merged
fix: isolate MC2 HCOMM initialization symbols #5326
izanaamiAdd on Aug 25
fix: isolate MC2 HCOMM initialization symbols #5326
Merged
Total: 6 files changed+10-10
| @@ -13,7 +13,7 @@ | |||
| 13 | namespace mc2_ops_hccl { | 13 | namespace mc2_ops_hccl { |
| 14 | void CompatSymInit(void) | 14 | void CompatSymInit(void) |
| 15 | { | 15 | { |
| 16 | - HcommDeviceDlInit(); // 增加强制依赖 | 16 | + Mc2HcommDeviceDlInit(); // 增加强制依赖 |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | __attribute__((constructor)) void InitCompat() | 19 | __attribute__((constructor)) void InitCompat() |
| @@ -22,7 +22,7 @@ static void* gLibHandle = nullptr; | |||
| 22 | static bool gInitialized = false; | 22 | static bool gInitialized = false; |
| 23 | 23 | ||
| 24 | // 初始化 | 24 | // 初始化 |
| 25 | -void HcommDeviceDlInit(void) { | 25 | +void Mc2HcommDeviceDlInit(void) { |
| 26 | if (gInitialized) { | 26 | if (gInitialized) { |
| 27 | return; | 27 | return; |
| 28 | } | 28 | } |
| @@ -34,7 +34,7 @@ void HcommDeviceDlInit(void) { | |||
| 34 | 34 | ||
| 35 | dlerror(); | 35 | dlerror(); |
| 36 | 36 | ||
| 37 | - HcommPrimitivesDlInit(gLibHandle); | 37 | + Mc2HcommPrimitivesDlInit(gLibHandle); |
| 38 | HcommDeviceProfilingDlInit(gLibHandle); | 38 | HcommDeviceProfilingDlInit(gLibHandle); |
| 39 | HcommDiagDlInit(gLibHandle); | 39 | HcommDiagDlInit(gLibHandle); |
| 40 | gInitialized = true; | 40 | gInitialized = true; |
| @@ -14,11 +14,11 @@ | |||
| 14 | extern "C" { | 14 | extern "C" { |
| 15 | #endif | 15 | #endif |
| 16 | 16 | ||
| 17 | -// 动态库管理接口(大驼峰命名) | 17 | +// MC2动态库管理接口(大驼峰命名) |
| 18 | -void HcommDeviceDlInit(void); | 18 | +void Mc2HcommDeviceDlInit(void); |
| 19 | 19 | ||
| 20 | #ifdef __cplusplus | 20 | #ifdef __cplusplus |
| 21 | } | 21 | } |
| 22 | #endif | 22 | #endif |
| 23 | 23 | ||
| 24 | -#endif // HCOMM_DEVICE_DLSYM_H | 24 | +#endif // HCOMM_DEVICE_DLSYM_H |
| @@ -65,7 +65,7 @@ void HcommDlInit(void) { | |||
| 65 | 65 | ||
| 66 | HcclResDlInit(gLibHandle); | 66 | HcclResDlInit(gLibHandle); |
| 67 | HcclRankGraphDlInit(gLibHandle); | 67 | HcclRankGraphDlInit(gLibHandle); |
| 68 | - HcommPrimitivesDlInit(gLibHandle); | 68 | + Mc2HcommPrimitivesDlInit(gLibHandle); |
| 69 | HcclInnerDlInit(gLibHandle); | 69 | HcclInnerDlInit(gLibHandle); |
| 70 | HcommProfilingDlInit(gLibHandle); | 70 | HcommProfilingDlInit(gLibHandle); |
| 71 | -} | 71 | +} |
| @@ -43,7 +43,7 @@ DEFINE_WEAK_FUNC(HcclResult, HcclCommSymWinGet, HcclComm comm, void *ptr, size_t | |||
| 43 | HcclCommSymWindow *winHandle, size_t *offset); | 43 | HcclCommSymWindow *winHandle, size_t *offset); |
| 44 | 44 | ||
| 45 | // ---------- 初始化函数 ---------- | 45 | // ---------- 初始化函数 ---------- |
| 46 | -void HcommPrimitivesDlInit(void* libHcommHandle) { | 46 | +void Mc2HcommPrimitivesDlInit(void* libHcommHandle) { |
| 47 | INIT_SUPPORT_FLAG(libHcommHandle, HcommWriteWithNotifyOnThread); | 47 | INIT_SUPPORT_FLAG(libHcommHandle, HcommWriteWithNotifyOnThread); |
| 48 | INIT_SUPPORT_FLAG(libHcommHandle, HcommWriteReduceWithNotifyOnThread); | 48 | INIT_SUPPORT_FLAG(libHcommHandle, HcommWriteReduceWithNotifyOnThread); |
| 49 | INIT_SUPPORT_FLAG(libHcommHandle, HcommWriteNbiOnThread); | 49 | INIT_SUPPORT_FLAG(libHcommHandle, HcommWriteNbiOnThread); |
| @@ -27,7 +27,7 @@ DECL_WEAK_FUNC(HcclResult, HcclSymWinGetPeerPointer, HcclCommSymWindow winHandle | |||
| 27 | DECL_WEAK_FUNC(HcclResult, HcclCommSymWinGet, HcclComm comm, void *ptr, size_t size, | 27 | DECL_WEAK_FUNC(HcclResult, HcclCommSymWinGet, HcclComm comm, void *ptr, size_t size, |
| 28 | HcclCommSymWindow *winHandle, size_t *offset); | 28 | HcclCommSymWindow *winHandle, size_t *offset); |
| 29 | 29 | ||
| 30 | -void HcommPrimitivesDlInit(void* libHcommHandle); // 本模块独立初始化 | 30 | +void Mc2HcommPrimitivesDlInit(void* libHcommHandle); // 本模块独立初始化 |
| 31 | 31 | ||
| 32 | #ifdef __cplusplus | 32 | #ifdef __cplusplus |
| 33 | } | 33 | } |