已合并
fix: initialize broadcast workspace to zero #1007
zhang-song-rui创建于 23 天前
fix: initialize broadcast workspace to zero #1007
已合并
共 2 个文件变更+2-4
| @@ -174,10 +174,7 @@ public: | |||
| 174 | // set workspace | 174 | // set workspace |
| 175 | size_t* workspaces = context_->GetWorkspaceSizes(1); | 175 | size_t* workspaces = context_->GetWorkspaceSizes(1); |
| 176 | OP_CHECK_NULL_WITH_CONTEXT(context_, workspaces); | 176 | OP_CHECK_NULL_WITH_CONTEXT(context_, workspaces); |
| 177 | - auto platformInfo = context_->GetPlatformInfo(); | 177 | + workspaces[0] = DEFAULT_TILING_WORKSPACE_SIZE; |
| 178 | - OP_CHECK_NULL_WITH_CONTEXT(context_, platformInfo); | ||
| 179 | - auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfo); | ||
| 180 | - workspaces[0] = ascendcPlatform.GetLibApiWorkSpaceSize(); | ||
| 181 | 178 | ||
| 182 | return ge::GRAPH_SUCCESS; | 179 | return ge::GRAPH_SUCCESS; |
| 183 | } | 180 | } |
| @@ -44,6 +44,7 @@ constexpr int32_t HIGH_PERF_RANK = 4; | |||
| 44 | constexpr int32_t DEFAULT_ADD_VALUE = 9; | 44 | constexpr int32_t DEFAULT_ADD_VALUE = 9; |
| 45 | constexpr int64_t VALUE_TWO = 2; | 45 | constexpr int64_t VALUE_TWO = 2; |
| 46 | constexpr int64_t MAX_IN_OUT_ARGS_NUMBER = 4; | 46 | constexpr int64_t MAX_IN_OUT_ARGS_NUMBER = 4; |
| 47 | +constexpr uint64_t DEFAULT_TILING_WORKSPACE_SIZE = 0; | ||
| 47 | constexpr int64_t PER_CORE_MIN_UB_BYTE = 8 * 1024; | 48 | constexpr int64_t PER_CORE_MIN_UB_BYTE = 8 * 1024; |
| 48 | constexpr uint64_t HALF_CORE_NUM_DIVIDE = 2; | 49 | constexpr uint64_t HALF_CORE_NUM_DIVIDE = 2; |
| 49 | constexpr int64_t CACHE_LINE = 128; | 50 | constexpr int64_t CACHE_LINE = 128; |